• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: -


 
Marshal
Posts: 22441
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic