I bump into this kind of error while running my apps.
It happens occasionally so i dont know what exactly in my code this error originates.
The exception does not tell any clear details.
A piece of the stacktrace.
java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@c74ff1
at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:330)
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:720)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:362)
at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:155)
at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97)
Is there anybody who encounetered this error before please help.
Im using jboss 6, seam 2, jsf 2 and richfaces 3.
This is answered in the JBoss wiki. Here’s a cite of relevance: