0 Replies Latest reply on Mar 6, 2007 9:23 AM by abdelhadi Nasseh

    icant get EntityManager in my Action Class implements Action

    abdelhadi Nasseh Newbie

      hi,


      public class CallGetMNIdimplements ActionHandler {
      
       @PersistenceContext
       private EntityManager em;
       public void execute(ExecutionContext executionContext) throws Exception {
      
      /*line 80 -->*/ PivotMap pivotMap = (PivotMap ) em.
      
       createQuery("....");
      
      }
      
      




      14:12:27,484 ERROR [STDERR] java.lang.NullPointerException
      14:12:27,484 ERROR [STDERR] at org.test.action.CallGetMNId.execute(CallGetMNId.java:80)
      14:12:27,484 ERROR [STDERR] at org.jbpm.graph.def.Action.execute(Action.java:123)
      14:12:27,484 ERROR [STDERR] at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
      14:12:27,484 ERROR [STDERR] at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
      14:12:27,500 ERROR [STDERR] at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
      14:12:27,500 ERROR [STDERR] at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
      14:12:27,500 ERROR [STDERR] at org.jbpm.graph.def.Node.enter(Node.java:301)
      14:12:27,500 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
      14:12:27,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      14:12:27,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      14:12:28,000 ERROR [STDERR] at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
      14:12:28,000 ERROR [STDERR] at org.jbpm.graph.def.Node_$$_javassist_48.enter(Node_$$_javassist_48.java)
      14:12:28,000 ERROR [STDERR] at org.jbpm.graph.def.Transition.take(Transition.java:119)
      14:12:28,000 ERROR [STDERR] at org.jbpm.graph.def.Node.leave(Node.java:383)
      14:12:28,000 ERROR [STDERR] at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:136)
      14:12:28,500 ERROR [STDERR] at org.jbpm.graph.node.Decision.execute(Decision.java:146)
      14:12:28,500 ERROR [STDERR] at org.jbpm.graph.def.Node.enter(Node.java:316)
      14:12:28,500 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
      14:12:28,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      14:12:28,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      14:12:28,500 ERROR [STDERR] at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
      14:12:29,000 ERROR [STDERR] at org.jbpm.graph.def.Node_$$_javassist_48.enter(Node_$$_javassist_48.java)
      14:12:29,000 ERROR [STDERR] at org.jbpm.graph.def.Transition.take(Transition.java:119)
      14:12:29,000 ERROR [STDERR] at org.jbpm.graph.def.Node.leave(Node.java:383)
      14:12:29,000 ERROR [STDERR] at org.jbpm.graph.node.StartState.leave(StartState.java:70)
      14:12:29,000 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:12:29,000 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      14:12:29,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      14:12:29,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      14:12:29,500 ERROR [STDERR] at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
      14:12:29,500 ERROR [STDERR] at org.jbpm.graph.def.Node_$$_javassist_48.leave(Node_$$_javassist_48.java)
      14:12:29,500 ERROR [STDERR] at org.jbpm.graph.exe.Token.signal(Token.java:178)
      14:12:29,500 ERROR [STDERR] at org.jbpm.graph.exe.Token.signal(Token.java:123)
      14:12:29,500 ERROR [STDERR] at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
      14:12:29,500 ERROR [STDERR] at org.test.service.ManagerBean.vnaDemande(ManagerBean.java:124)
      14:12:29,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:12:29,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      14:12:29,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      14:12:29,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      14:12:29,500 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      14:12:29,500 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:263)
      14:12:29,500 ERROR [STDERR] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
      14:12:29,500 ERROR [STDERR] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      14:12:29,500 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
      14:12:29,500 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
      14:12:29,500 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
      14:12:29,500 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
      14:12:29,500 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
      
      


      :)