[jboss-user] [JBoss Seam] - EntityManager is null??

mladen.babic do-not-reply at jboss.com
Sat Aug 4 16:14:33 EDT 2007


Hi ,

I've tried to use entityQuery in my app but it trows me error:
  | SEVERE: Error Rendering View[/order/distributors/distributors.xhtml]
  | java.lang.IllegalStateException: entityManager is null
  |         at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:31)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  |         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
  |         at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  |         at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
  |         at org.jboss.seam.util.Work.workInTransaction(Work.java:39)
  |         at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  |         at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java

My components.xml file looks :
  | 
  | <core:managed-persistence-context name="entityManager"
  | 		auto-create="true"
  | 		persistence-unit-jndi-name="java:/private.eOrderEntityManagerFactory" />
  | 
  |                    . . .
  | 	 
  | 	<framework:entity-query name="distributors" 
  | 		ejbql="select d from DistributorEntity d"
  | 		order="name"/>
  | 
  | 
On page i get "EntityManager is null".What is the problem? I created project with seam-gen.
Best regards,
mb

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

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



More information about the jboss-user mailing list