users@glassfish.java.net

Bpel database on mysql - connection pool error

From: <glassfish_at_javadesktop.org>
Date: Fri, 08 Jan 2010 00:01:18 PST

Hello,

My company uses Glassfish server (we're using EJB 3 and Glassfish 2.1) with BPEL language to model business process.

We recently changed bpel process database from derby to mysql, according to instructions found here: http://wiki.open-esb.java.net/Wiki.jsp?page=BPELSEConfiguration

Configuration of mysql connection pool is the same as it was for derby connection pool, that is:
Pool settings:
Initial and Minimum Pool Size: 8 Connections
Maximum Pool Size: 200 Connections
Pool Resize Quantity: 2 Connections
Idle Timeout: 300 Seconds
Max Wait Time: 60000 Milliseconds

Connection validation:
Connection validation - not required
Validation method - auto commit
Allow non-component callers - enabled

Transaction:
Non Transactional Connections: not enabled
transaction isolation: read-commited
Isolation level: guaranteed enabled

For mysql database max_allowed_packet is set to 1G.


Soon after glassfish server starts following error starts to appear every few seconds in server.log file:


[#|2009-12-15T16:00:45.285+0100|SEVERE|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=69;_ThreadName=sun-bpel-engine-thread-0;_RequestID=72ee9e3e-7066-4d50-b448-451759534fb4;|RAR5027:Unexpected exception in resource
 pooling
javax.transaction.SystemException: java.lang.IllegalStateException
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.getTransaction(J2EETransactionManagerOpt.java:479)
        at com.sun.enterprise.resource.SystemResourceManagerImpl.getTransaction(SystemResourceManagerImpl.java:71)
        at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:173)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:337)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
        at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.createXAConnection(DBConnectionFactory.java:328)
        at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.isXAConnectionRestored(DBConnectionFactory.java:647)
        at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doXAConnectionRetry(DBConnectionFactory.java:490)
        at com.sun.jbi.engine.bpel.core.bpel.connection.DBConnectionFactory.doConnectionRetryForXA(DBConnectionFactory.java:419)
        at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.performDBTransactionForDBOs(StateManagerImpl.java:689)
        at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.updateState(StateManagerImpl.java:501)
        at com.sun.jbi.engine.bpel.core.bpel.persist.impl.StateManagerImpl.persistState(StateManagerImpl.java:449)
        at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.doXA(PersistenceManager.java:340)
        at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PersistenceManager.endXA(PersistenceManager.java:325)
        at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.InvokeUnitImpl.process(InvokeUnitImpl.java:707)
        at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.InvokeUnitImpl.doAction(InvokeUnitImpl.java:182)
        at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:162)
        at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98)
        at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1032)
        at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:292)
        at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1294)
        at com.sun.jbi.engine.bpel.BPELSEInOutThread.processResponse(BPELSEInOutThread.java:488)
        at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:264)
        at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:183)
|#]

[#|2009-12-15T16:00:45.286+0100|WARNING|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=69;_ThreadName=sun-bpel-engine-thread-0;bpelseXAPoolMySql;javax.transaction.SystemException: java.lang.IllegalStateException;_RequestID=72ee9e3e-7066-4d50-b448-451759534fb4;|RAR5117 : Failed to obtain/create connection from connection pool [ bpelseXAPoolMySql ]. Reason : javax.transaction.SystemException: java.lang.IllegalStateException|#]

[#|2009-12-15T16:00:45.286+0100|WARNING|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=69;_ThreadName=sun-bpel-engine-thread-0;Error in allocating a connection. Cause: javax.transaction.SystemException: java.lang.IllegalStateException;_RequestID=72ee9e3e-7066-4d50-b448-451759534fb4;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException: java.lang.IllegalStateException]|#]

...and eventually server crashes.
We can't figure out where the problem is. Any help is much appriciated.
[Message sent by forum member 'eddie26' (rkunta_at_wp.pl)]

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