I am using Hibernate on a JBoss server. I get the error below.
The error happens when I try to connect to the database for the second time in the same sesssion.
This answer may actually too late since you asked this a year ago. but it will help those who will encounter this error in the future.
Your error may came from different source, but in my case its all about the transaction timeout, some of the query may take long so the timeout is reach and hibernate throws an exception. In my case what i did was set the transaction timeout to much higher value. Which solves my problem.
Here is a useful link. The transaction is not active!
Understanding JDBC internal timeouts config
-cheers