• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB3 with JPA using MySQL (in Eclipse)

 
bee juth
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a EJB3 project using JBoss 7.1 and JPA - I am using MySQL 5.1 as by database. Eclipse Kepler is the IDE. I am able to successfully deploy my EJB project into JBoss; but while running the client, I am getting the following error: -



The error is thrown when code code is trying to access any method of EntityManager..

Am I missing some JARs from my classpath? I have included JBoss final JAR in the classpath for now - I have included MySQL connector 5.1.26 in JBosss with required module.xml.

Any susggestion please? I am new to J2EE.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bee,
Welcome to CodeRanch!

Eclipse can tell you if you are missing a jar. Try going to Navigate > Open Type and typing GenericJDBCException. Does anything get returned?

Also, what is the exact name of your JBoss jar?
 
Dieter Quickfend
Bartender
Posts: 543
4
Java Netbeans IDE Redhat
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're missing hibernate (likely hibernate3.jar). Are you using Maven? If so, make sure you have hibernate in your POM dependencies, even if it's provided.
 
bee juth
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I included hibernate3.jar in the build path and that solved the issue.

I tried Navigate --> Open Type and then typed "GenericJDBCException" but it did not find anything. I am using JBoss 7.1.1 and exact jar name is "jboss-client.jar". I am not using Maven

Thanks for all your help guys!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!