Can you please verify your ear file? To verify, either:
select your project node, right click, verify
or run in command prompt,
$GLASSFISH_HOME/bin/verifier <path to your ear file>
I am surprised that em is null. Are you using <persistence-context-ref>
or @PersistenceContext in your war file?
Thanks,
Sahoo
Benjamin Graf wrote:
> Hi Ian,
>
> one problem is still there. How can I access this global defined persistence unit. I tried an lookup,
>
> Context ctx = new InitialContext();
> em = (EntityManager) ctx.lookup("java:comp/env/persistence/LogicalName");
> persistence/LogicalName registered in web.xml
>
> but the EntityManager was null.
>
> Greets, Benjamin
>