users@glassfish.java.net

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

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 12 Feb 2007 12:15:53 -0800

What is the structure of your ear file? How many persistence.xml files does it have?

thanks,
-marina


glassfish_at_javadesktop.org wrote:
> [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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>