aspose file tools*
The moose likes Object Relational Mapping and the fly likes Load Persistent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Load Persistent" Watch "Load Persistent" New topic
Author

Load Persistent

Olivier Scalbert
Greenhorn

Joined: May 07, 2004
Posts: 25
Hello,

With Netbeans and Glassfish, I have created some stateless sessions beans that use some entites via JPA.
Everything works fine. But now I want to do some entitties tests with JUnit (so out of the container).
So , I have write this little code and add a lot of jars lib in my testing project


When I start my JUnit tets, lots of things happened. Binding seems ok, but after that I have this exception:

There is something around JNDI, but I do no know what to do ...
How can I create an EntityManagerFactory ?
Do you have any idea ?
Thanks,

Olivier
Olivier Scalbert
Greenhorn

Joined: May 07, 2004
Posts: 25
Sorry for the title of my post.
Should have been:
how to create an EntityManagerFactory from JUnit !

Sorry for that, I do not know if it is possible to change this
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Load Persistent
 
Similar Threads
No Persistent Classes found for Query Class
some internal library in Hibernate logs even though logging is set to error.
SEVERE: Duplicate entry '1' for key 'PRIMARY'
Not binding factory to JNDI, no JNDI name configured
Anyone know how to create a JUnit test for an EJB service?