users@glassfish.java.net

Re: Problem accessing data from EJB 3.0 session bean: EntityManagerSetupExc

From: <glassfish_at_javadesktop.org>
Date: Sat, 10 Feb 2007 14:51:44 PST

[i]Sorry for bringing in confusion.

I can successfully instantiate EntityManager for OrderPU, but execution fails when I try to make a query:[/i]
    
@PersistenceContext(unitName="OrderPU")
 EntityManager em;
...
public List findAll() {
    Query q = em.createQuery("select object(o) from Line as o");
...
}
               

[i]with the following exception:[/i]

Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.persistence.PersistenceException: Exception [TOPLINK-28013] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: Attempted to deploy PersistenceUnit [OrderPU] for which predeploy method either had not called or had failed
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3588)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3436)
        at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(StatefulSessionContainer.java:2583)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
        ... 30 more

[i]Thanks a lot for help, I need it most desperately ![/i]
[Message sent by forum member 'cyvan' (cyvan)]

http://forums.java.net/jive/thread.jspa?messageID=203147