This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Machine Learning with R: Expert techniques for predictive modeling and have Brett Lantz on-line!
See this thread for details.
Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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
  • 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: -


 
Sheriff
Posts: 21805
104
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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
 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!