users@glassfish.java.net

java.sql.SQLException: Error in allocating a connection. Cause: null

From: <glassfish_at_javadesktop.org>
Date: Thu, 25 Jun 2009 22:30:51 PDT

This is really a JDBC issue probably, but it is also a 'what driver should I be using, then' question.

I start my application and it runs okay. Database connects etc.
Then I disable it, redeploy and then enable it.
Part of the application starts a thread and that thread asks for a connection to the database. It dies with this error:
...
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: null
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115) [appserv-rt.jar:9.1]
        at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) [spring-hibernate3-2.0.8.jar:2.0.8]
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) [hibernate-3.2.5.ga.jar:3.2.5.ga]


It looks like the appserver is calling the driver and getting a null response and it doesn't like it. Anyone know why? Am I using the right driver for this app server?

Appserver is SJSAS PE 9.1 and the jdbc driver is Oracle. I tried classes12.jar and ojdbc14.jar, copied them from Oracle where they are described as for 10g which is what I am using. Like I say they work most of the time.

Config of the jdbc pools is just accepting the defaults and oracle.jdbc.pool.OracleConnectionPoolDataSource.

I have seen this error referred to elsewhere with different drivers and the answer seemed to be either there is a bug in the app server see this (broken) link or to upgrade the driver. I followed the advice on http://docs.sun.com/app/docs/doc/819-3658/beamw?a=view when configuring, still get the error though.
[Message sent by forum member 'mrkimi' (mrkimi)]

http://forums.java.net/jive/thread.jspa?messageID=353068