1 Reply Latest reply on Aug 23, 2012 11:05 AM by Andrey Svalov

    NPE when initiating StatefulKnowledgeSession

    Andrey Svalov Newbie

      Hi! I've been desperately trying to fix this code:

       

      Environment: JBOSS AS 7.1.1

      JBPM 5.3.0.Final

      trying to run in the production mode, so using JTA.

       

       

      public String getSomeText() {
                KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
                
                EntityManagerFactory emf =
                    Persistence.createEntityManagerFactory( "org.jbpm.persistence.jpa" );
                Environment env = KnowledgeBaseFactory.newEnvironment();          
                env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );
                
      //          env.set( EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager() );
                env.set( EnvironmentName.TRANSACTION_MANAGER, getTransactionManager() );
                
                StatefulKnowledgeSession ksession =
                    JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
                int sessionId = ksession.getId();
      
                ksession.startProcess( "MyProcess" );
                ksession.dispose();
                
                return "OK - new + " + sessionId;
           }
           
           public TransactionManager getTransactionManager() {
                try {
                     TransactionManager result = (TransactionManager) new InitialContext()
                               .lookup("java:jboss/TransactionManager");
                     logger.debug("Transaction Manager found: " + (result != null));
                     return result;                     // always returns NOT null, so this one is OK
                } catch (NamingException e) {
                     e.printStackTrace();
                     logger.error("failed!", e);
                     return null;
                }
           }
      

       

       

      The error looks like this:

       

       java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
      
          org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:143)
          org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:67)
          org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
          net.processmanager.DAO.bp.BusinessProcesses.getSomeText(BusinessProcesses.java:50)
          net.processmanager.viewcontroller.JBPMTestAction.populateText(JBPMTestAction.java:42)
          net.processmanager.viewcontroller.JBPMTestAction.list(JBPMTestAction.java:30)
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          java.lang.reflect.Method.invoke(Method.java:597)
          com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)
          com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)
          org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
          org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
          org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
          org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
          org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
          org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
          org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
          org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626)
          org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039)
          java.lang.Thread.run(Thread.java:662)
          
      
      java.lang.reflect.InvocationTargetException
      
          sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:129)
          org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:67)
          org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
          net.processmanager.DAO.bp.BusinessProcesses.getSomeText(BusinessProcesses.java:50)
          net.processmanager.viewcontroller.JBPMTestAction.populateText(JBPMTestAction.java:42)
          net.processmanager.viewcontroller.JBPMTestAction.list(JBPMTestAction.java:30)
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          java.lang.reflect.Method.invoke(Method.java:597)
          com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)
          com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)
          org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
          org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
          org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
          org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
          org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
          org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
          org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
          org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626)
          org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039)
          java.lang.Thread.run(Thread.java:662)
          
      
      java.lang.NullPointerException
      
          org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory.isJoinableJtaTransaction(CMTTransactionFactory.java:63)
          org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory.isJoinableJtaTransaction(CMTTransactionFactory.java:39)
          org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.isTransactionJoinable(TransactionCoordinatorImpl.java:295)
          org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1205)
          org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:178)
          org.hibernate.ejb.EntityManagerImpl.(EntityManagerImpl.java:89)
          org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:179)
          org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:174)
          org.drools.persistence.jpa.JpaPersistenceContextManager.getApplicationScopedPersistenceContext(JpaPersistenceContextManager.java:55)
          org.drools.persistence.SingleSessionCommandService.(SingleSessionCommandService.java:144)
          sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:129)
          org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:67)
          org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
          net.processmanager.DAO.bp.BusinessProcesses.getSomeText(BusinessProcesses.java:50)
          net.processmanager.viewcontroller.JBPMTestAction.populateText(JBPMTestAction.java:42)
          net.processmanager.viewcontroller.JBPMTestAction.list(JBPMTestAction.java:30)
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          java.lang.reflect.Method.invoke(Method.java:597)
          com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)
          com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)
          org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
          org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
          com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
          com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
          org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
          org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
          org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
          org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
          org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
          org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
          org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626)
          org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039)
          java.lang.Thread.run(Thread.java:662)
      
      

       

      If I run in USER_TRANSACTION (non-JTA) mode then the error looks more like here: https://community.jboss.org/thread/174386

       

      I attached pom.xml and persistence.xml

       

      Please help!