Thanks for the response Steve. It is certainly a good thing to check, but unfortunately not the issue here. Actually I know I have the driver correctly configured because I have been using it successfully for a v. long time :). My problem is specifically that on *redeploy* of a war file, the Context loses the JNDI GlobalNamingResources specified in the server.xml file.
I have found some postings that also describe this problem:
http://mail-archives.apache.org/mod_mbox/jakarta-tomcat-user/200402.mbox/[EMAIL 
PROTECTED]

but they refer to a workaround solution of separating Resource out of GlobalNamingResources and specifying it in the Context. However, I wish to use the Resource Globally across Contexts, so would prefer a solution that didn't require duplication of Database Pools.

any help would be greatly appreciated.
:)


From the look of the stacktrace, which mentions
"org.postgresql.Driver.parseURL" as the point where the initial exception
was thrown, maybe the URL attribute in your <Context>'s <Resource> or
<ResourceParams> might either contain a wrong value or a typo.  This might
be leading to a parsing exception, even though the trace doesn't say so
explicitly.

My experience is that the exceptions in these cases do not always give you a
very precise clue as to the problem.  For example, very recently on 5.5.9, I
was getting a similar problem to you, where just because I had a leading
space in the url attribute value, the whole DBCP resource was rejected, with
the exception messages "Cannot create JDBC driver of class '' for connect
URL 'null'" caused by "no suitable driver".

Check that config *extremely* carefully....
-----Original Message-----
From: bob_b [mailto:[EMAIL PROTECTED] Sent: Tuesday 24 May 2005 22:28
To: [email protected]
Subject: redeploy of webapp loses GlobalNamingResource DataSource


I have a globally named db pool resource that I use across multiple
contexts to access a particular database. When I redeploy a webapp in
Tomcat 5.0.28, I am losing the DataSource and getting a pooled
connection fails with the following (truncated) message:


org.apache.commons.dbcp
.SQLNestedException: Cannot create JDBC driver
of class '' for connect URL 'null'
=09at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou=
rce.java:780)
=09at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource=
.java:540)
.....

Caused by: java.lang.NullPointerException
=09at org.postgresql.Driver.parseURL(Driver.java:269)
=09at org.postgresql.Driver.acceptsURL(Driver.java:177)
=09at java.sql.DriverManager.getDriver(DriverManager.java:232)
=09at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou=
rce.java:773)
=09... 44 more......



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to