java.sql.SQLException: Error in allocating a connection. Cause: java.lang.IllegalStateException: Wrong XAState: 3

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Oracle Community by cain05, 1 year ago
Error in allocating a connection. Cause: java.lang.IllegalStateException: Wrong XAState: 3
via toforge.com by Unknown author, 1 year ago
Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource
via blogspot.com by Unknown author, 1 year ago
Error in allocating a connection. Cause: No PasswordCredential found
via Oracle Community by hughacland, 1 year ago
Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
via Oracle Community by sol1001, 1 year ago
Error in allocating a connection. Cause: Connection could not be allocated because: Communications link failure Last packet sent to the server was 0 ms ago.
via Oracle Community by eligetiv, 1 year ago
Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
java.sql.SQLException: Error in allocating a connection. Cause: java.lang.IllegalStateException: Wrong XAState: 3
at com.sun.jts.jta.TransactionState.startAssociation(TransactionState.java:322)
at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:212)
at com.sun.enterprise.transaction.JavaEETransactionImpl.enlistResource(JavaEETransactionImpl.java:639)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.enlistDistributedNonXAResource(JavaEETransactionManagerJTSDelegate.java:301)
at com.sun.enterprise.resource.rm.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:152)
at com.sun.enterprise.resource.rm.ResourceManagerImpl.enlistResource(ResourceManagerImpl.java:112)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:208)
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at com.foo.dao.PersistenceManager.initConnection(PersistenceManager.java:203)
at com.foo.dao.PersistenceManager.persist(PersistenceManager.java:376)
at com.foo.ejb.message.PersistListenerEJB.onMessage(PersistListenerEJB.java:42)
at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4154)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5346)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5326)
at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1093)
at undefined.$Proxy383.onMessage(Unknown Source)
at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.