In the past, it's typically been caused by some misspell of the JNDI name between the <Resource ..../> element and the <resource-ref>...</resource-ref> in the WEB-INF/web.xml. I'd have to go back to the original post to tell if that's the case here or not. Either that or the resource was declared as a global resource without the requisite <ResourceLink /> in the context. Either way, it's typically a disconnect between the <Resource .../> and it's use in the jsp/servlet code.
Having said all that, I'm certain there are a few cases that blow what I just wrote out of the water. :-) --David Christopher Schultz wrote: > Chuck, > > On 7/14/2009 8:31 AM, Caldarale, Charles R wrote: > > The fact that the JDBC-ODBC bridge shows up in the stack trace says > > that your published <Resource> config is not the one being used. > > Actually, I think it's the driver registration that's failing. Since the > DriverManager is being asked to get an appropriate driver for a > particular URL, all available drivers will be queried, including the > JdbcOdbcDriver. It's presence in the stack trace is misleading, but not > particularly troubling. > > What /is/ interesting is that this is the /first time ever/ I've seen a > complete stack trace including all the "Caused by" elements from someone > getting this error. I'll quote it because I think it's important: > > Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create > JDBC driver of class '' for connect URL 'null' > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourcejava:880) > at > com.wirefast.wsam.service.WMSSubmissionService.getConnection(WMSSubmissionService.java:208) > at > com.wirefast.wsam.service.WMSSubmissionService.submitMessage(WMSSubmissionService.java:570) > ... 25 more > Caused by: java.lang.NullPointerException > at > sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507) > at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476) > at > sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307) > at java.sql.DriverManager.getDriver(DriverManager.java:253) > at > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143) > ... 28 more > > > The root cause is a NullPointerException within the > JdbcOdbcDriver.acceptsURL call: basically, this driver is not properly > checking its arguments for null (it's probably doing something like > if(url.startsWith("jdbc:odbc:")) which means it'll blow up if the URL is > null. > > The URL may or may not be null, in spite of this error message. I wonder > if the message itself is inaccurate. I haven't traced through the code, > but it would be nice to know what's going on. > > This error has come up over and over on this list and the solution > usually ends up being that you just have to throw out your configuration > and start over again, and everything seems to work out just fine. It > would be nice to know what the real problem is. > > -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org