Hello,
I'm just trying to install jUDDI within our Tomcat server, but I can't
get the database connection working. I'm getting the following error
message on "happyjuddi.jsp":
- DB connection was not aquired. (Cannot create JDBC driver of class ''
for connect URL 'null')
- SELECT COUNT(*) FROM PUBLISHER failed (null)
I checked Google and found various solution proposals for this problem
(like re-installation of the JDBC driver, manipulation of the
juddi.properties), but none of them worked.
I'm especially confused because jUDDI obviously can't even find the
JDBC driver class, but other JSPs at the same Tomcat use Database
connections without any problem.
Anyone of you got an idea? Thanks a lot in advance.
CU, Patrick
Daniel Rohe - 21 Feb 2006 16:02 GMT
patrick.holz@uni-koeln.de schrieb:
> Hello,
>
[quoted text clipped - 17 lines]
>
> CU, Patrick
Could you post some more information:
Which JDBC driver?
Where have you copied the driver common/lib, shared/lib, WEB-INF/lib?
Which Tomcat version?
Kind regards,
Daniel
patrick.holz@uni-koeln.de - 22 Feb 2006 09:03 GMT
Hi,
thanks for your answer. I'm using Tomcat 5.5.9 and the JDBC driver from
"mysql-connector-java-3.0.1-beta-bin.jar". This file is placed at
{Tomcat_Home}/common/lib/. The server.xml says within "<ResourceParams
name="jdbc/juddiDB">":
<value>jdbc:mysql://localhost/juddi</value>
<value>com.mysql.jdbc.Driver</value>
CU, Patrick
Daniel Rohe - 22 Feb 2006 15:24 GMT
patrick.holz@uni-koeln.de schrieb:
> Hi,
>
[quoted text clipped - 7 lines]
>
> CU, Patrick
The problem is the link from jUDDI to the tomcat 5.0 description. In
Tomcat 5.5 was a change in the resource configuration so the following
XML snippet should help you. Replace your Resource and ResourceParams
snippet with the following snippet.
<Resource name="jdbc/juddiDB" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000"
username="juddiuser" password="******"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/juddi?autoReconnect=true" />
BTW don't put the web app configuration into the server.xml file.
Instead create a new XML file under (Tomcat_Home)/conf/localhost with
the name of the web app as filename and in this file configure the
Context. Something like
<Context docBase="..." antiResourceLocking="true" antiJARLocking="true">
<Resource ... />
</Context>
Kind regards,
Daniel
patrick.holz@uni-koeln.de - 22 Feb 2006 16:11 GMT
Wow, thanks a lot, now it's working. I was almost desperated about
this, you saved me a lot of guesswork.
CU, Patrick
france.nguyen22@gmail.com - 14 Mar 2006 00:15 GMT
This did not work for me, I still get the error:
jUDDI DataSource Validation
+ Got a JNDI Context!
+ Got a JDBC DataSource (dsname=java:comp/env/jdbc/juddiDB)
- DB connection was not aquired. (Cannot create JDBC driver of class ''
for connect URL 'null')
- SELECT COUNT(*) FROM PUBLISHER failed (null)
I am using Tomcat 5.0, and mySQL 5.
I've done all the steps previous to this and I still get this error. I
made a juddi.xml that contains:
<Context docBase="juddi" antiResourceLocking="true"
antiJARLocking="true">
<Resource name="jdbc/juddiDB" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30"
maxWait="10000"
username="juddi" password="juddi"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/juddi?autoReconnect=true"
/>
</Context>
and placed it in: C:\Program Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\localhost
Please help, I have been at this point for a week now.
> Wow, thanks a lot, now it's working. I was almost desperated about
> this, you saved me a lot of guesswork.
>
> CU, Patrick