• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 3.1 with JPA using MySQL in JBoss 7.1 - GenericJDBCException - could not open connection

 
bee juth
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJB; I am writing EJB (3.1) program in JBoss 7.1 - I am using MySQL DB with JPA. While executing the program, I am facing the GenericJDBCException: Could not open connection. It is happening only for certain tables in the database; but NOT for all tables. My code is able to access few of the tables in the same database. Please help me resolve the issue.

Here is my full stack trace: -


Here is my persistence.xml file:




My standalone.xml file from the JBoss server: -


 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The root cause is the most important here:
bee juth wrote:

I've encountered this issue before, and the cause is a transaction that has stopped working. Try to see if you have an exception that caused the transaction to rollback. If this hasn't occurred, check if your database transaction hasn't timed out.

If that still doesn't help you, this error has occurred quite a bit: Transaction is not active
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!