[jboss-user] [JBoss Seam] - NPE with component's entity-query

trouby do-not-reply at jboss.com
Tue Jul 3 06:22:40 EDT 2007


Hey,

With Seam ver 1.2 I used <framework:entity-query> a lot and it worked perfectly,


After migrating to Seam v2, I get a NPE exception,

I have a persistence managed context declared in components.xml as:

  | <core:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:comp/env/edm_acc_em"/>
  | 

where in web.xml I have a 'persistence-unit-ref' reference,



Please note that I am using Glassfish V2 as an Appserver.


Following is a part of the NPE stuck trace:

  | Caused by: java.lang.NullPointerException
  | 	at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:140)
  | 	at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:60)
  | 	at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:52)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | ...
  | 


Thanks,

Asaf.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059864#4059864

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059864



More information about the jboss-user mailing list