0 Replies Latest reply on Apr 25, 2016 10:50 AM by Vasanth Kumar

    InvocationTargetException on creating StatefulKnowledgeSession.  BitronixTransactionManager.getTransaction() returns null

    Vasanth Kumar Newbie

      Hello All,


               Im new to jBPM . Trying to start process from my Web Application.


                Im trying to create newStatefulKnowledgeSession to start the process. TransactionManagerServices.getTransactionManager() returns null while setting it in

      org.kie.api.runtime.Environment for EnvironmentName.TRANSACTION_MANAGER.



          Im using Tomcat 7 server configured in Eclipse Kepler. Here is the code snippet and attached persistence.xml .


      Code Snippet:


                EntityManagerFactory emf = Persistence




                     Environment env = KnowledgeBaseFactory



                     env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);



      // BitronixTransactionManager transactionManager = TransactionManagerServices.getTransactionManager();

      // transactionManager.getTransaction() : return null .


                     return JPAKnowledgeService

                                 .newStatefulKnowledgeSession(kbase, null, env);


      Kindly help me to resolve this. Should jndi.properties to be configured? If yes where to place it in web application?