aspose file tools*
The moose likes Object Relational Mapping and the fly likes Simple JPA Program using Eclipselink 1.1 in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Simple JPA Program using Eclipselink 1.1 in Eclipse" Watch "Simple JPA Program using Eclipselink 1.1 in Eclipse" New topic
Author

Simple JPA Program using Eclipselink 1.1 in Eclipse

Pawan Choure
Greenhorn

Joined: May 11, 2008
Posts: 27

users.java

usertester.java

persistence.xml


orm.xml

I have created a JPAProject in Eclipse and above are code files i have used but when i am trying to run i am getting following error.


so please help me out to solve the above issue


Pawan Choure
James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
Odd, the error says you did not set your jdbc properties, but you do seem to be setting them in your persistence.xml.

Ensure that you are using the persistence.xml that you think you are (in META-INF), and you don't have any old ones on your classpath. Maybe try to run it outside of Eclipse so you know exactly what is on your classpath. Also ensure you have your JDBC driver on the classpath, and check your log for other errors.

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
Pawan Choure
Greenhorn

Joined: May 11, 2008
Posts: 27

Finally I got it working.I create a a new JPA Project from Scratch and was still facing the same issue but finally got it working my changing the name of Database to MySQL.

user class

usertester class

orm.xml

persistence.xml
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple JPA Program using Eclipselink 1.1 in Eclipse