Hello all,

I get an exception while last line of below method executed :

    public StatefulKnowledgeSession createSession() throws Exception {
       
        /*
         * Create the knowledgebase using the required bpmn and drl files
         */
        KnowledgeBase kbase = readKnowledgeBase("HumanTask.bpmn");
        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.GLOBALS, new MapGlobalResolver() );
       
        Properties properties = new Properties();
        properties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
        properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
        KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
   
        return JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);
           
    }
 
its stack-trace is :

14:26:13,111 WARN  [JtaTransactionManager] Participating in existing JTA transaction, but no JTA TransactionManager or TransactionSychronizationRegistry available:
java.lang.NullPointerException
    at org.drools.persistence.jta.JtaTransactionManager.registerTransactionSynchronization(JtaTransactionManager.java:221)
    at org.drools.persistence.SingleSessionCommandService.registerRollbackSync(SingleSessionCommandService.java:333)
    at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:123)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)...

Can anyone help me to solve this problem ?
Thanks in advance
S.M.H.Jamali