Subject | 'Cannot provide new connection' error in EJB3 EAR app on Glassfish 2.1 (Sun) |
---|---|
Author | meinhardt.baer |
Post date | 2009-04-24T00:42:12Z |
Hi,
I am trying to develop EAR application (EJB3, web modulues) on Glassfish 2.1, NB6.5.1 and FB 1.5.x and Java Server Faces (actually ICEFaces, the best option, I guess). I managed to create EJB's from database, to compile applciation and to deploy on the server, but when I am trying to view the page that has query 'SELECT o from CUSTOMER', where customer is my EJB - mapped to customers tables, I am getting:
'Caused by: java.lang.IllegalStateException: Cannot provide new connection while old one is still in use.
at org.firebirdsql.pool.AbstractPingablePooledConnection.getConnection(AbstractPingablePooledConnection.java:345)
at com.sun.gjc.spi.ManagedConnection.getActualConnection(ManagedConnection.java:572)
at com.sun.gjc.spi.ManagedConnection.getConnection(ManagedConnection.java:326)
at com.sun.enterprise.resource.LocalTxConnectorAllocator.fillInResourceObjects(LocalTxConnectorAllocator.java:100)'
I can see this in the Jaybird code - here it is:
' /**
* Get JDBC connection corresponding to this pooled connection instance.
*
* @return instance of {@link Connection}
*
* @throws SQLException if some error happened.
*/
public
Connection getConnection() throws SQLException {
checkValidity();
checkInPool();
if (currentConnection != null) {
throw new IllegalStateException(
"Cannot provide new connection while old one is still in use.");
//currentConnection.close();
}
currentConnection = new PooledConnectionHandler(jdbcConnection, this);
Connection result = currentConnection.getProxy();
configureConnectionDefaults(result);
return result;
}'
Well - I cannot find now, but I have sense that I have read somewhere, that there can be support only for single connection in Jaybird or something like this, so - can I achieve my goal to use Firebird in J2EE EJB3.0 app with Jaybird?
I am trying to develop EAR application (EJB3, web modulues) on Glassfish 2.1, NB6.5.1 and FB 1.5.x and Java Server Faces (actually ICEFaces, the best option, I guess). I managed to create EJB's from database, to compile applciation and to deploy on the server, but when I am trying to view the page that has query 'SELECT o from CUSTOMER', where customer is my EJB - mapped to customers tables, I am getting:
'Caused by: java.lang.IllegalStateException: Cannot provide new connection while old one is still in use.
at org.firebirdsql.pool.AbstractPingablePooledConnection.getConnection(AbstractPingablePooledConnection.java:345)
at com.sun.gjc.spi.ManagedConnection.getActualConnection(ManagedConnection.java:572)
at com.sun.gjc.spi.ManagedConnection.getConnection(ManagedConnection.java:326)
at com.sun.enterprise.resource.LocalTxConnectorAllocator.fillInResourceObjects(LocalTxConnectorAllocator.java:100)'
I can see this in the Jaybird code - here it is:
' /**
* Get JDBC connection corresponding to this pooled connection instance.
*
* @return instance of {@link Connection}
*
* @throws SQLException if some error happened.
*/
public
Connection getConnection() throws SQLException {
checkValidity();
checkInPool();
if (currentConnection != null) {
throw new IllegalStateException(
"Cannot provide new connection while old one is still in use.");
//currentConnection.close();
}
currentConnection = new PooledConnectionHandler(jdbcConnection, this);
Connection result = currentConnection.getProxy();
configureConnectionDefaults(result);
return result;
}'
Well - I cannot find now, but I have sense that I have read somewhere, that there can be support only for single connection in Jaybird or something like this, so - can I achieve my goal to use Firebird in J2EE EJB3.0 app with Jaybird?