glassfish « EntityManager « JPA Q&A





1. How can one debug/fix an everlasting null return from EntityManager's find?    stackoverflow.com

I am following this example . I keep getting this error whenever calling upon find: java.lang.NullPointerException at LoginAction.service(LoginAction.java:41) at Dispatcher.doWork(Dispatcher.java:82) at Dispatcher.doGet(Dispatcher.java:64) ...

2. How to safely read related Entities from a detached Entity in JPA    stackoverflow.com

I am trying to attach a related persisted entity to a transient entity. This works fine in GlassFish V2 but not in GlassFish V3. This is a very simple scenario. Please ...

3. Glassfish JPA: Problems injecting EntityManager    stackoverflow.com

I am new to Java EE. I tried to get some first examples running (JPA). I am using Glassfish v3. The trouble is that I don't get the App Server injecting ...

4. Accessing Hibernate Session from EJB using EntityManager    stackoverflow.com

Is it possible to obtain the Hibernate Session object from the EntityManager? I want to access some hibernate specific API... I already tried something like:

org.hibernate.Session hSession =
   ( (EntityManagerImpl) em.getDelegate() ...

5. Inject EntityManager with EJB    stackoverflow.com

I'm trying to inject EntityManager in my DAO using EJB

@Entity
public class Book {
    @Id
    @GeneratedValue
    private int id;
    private ...

6. Need help with Glassfish, hibernate entitymanager and netbeans    java.net

Netbeans project4: com.mycompany.webservice (glassfish web app) attached you can find the persistence.xml file of the netbeans glassfish project I added all jar libs in the properties -> libraries of the netbeans project and chose to package those in the final war file, ran build, verify, deploy and get the following when trying to make a object creation