JBoss Community

java.lang.reflect.InvocationTargetException

created by Odelya Holiday in jBPM - View the full discussion

Hi!

 

I made changes so my bitronix will only work with Spring and not with tomcat the application server.

 

However, now when I am using:

 

EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.persistence.jpa");
  Environment env = KnowledgeBaseFactory.newEnvironment();
  env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
  env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
  env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
  ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
 

 

I get for the last call for building statefulknowledge I get:

 

Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException

          at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:130)

          at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:54)

          at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:109)

 

I tried for a long time to debug it with drools source but cannot figure out what could cause it!

 

I see in bitronix log that it created connection data pooling.

 

What wen wrong?

Reply to this message by going to Community

Start a new discussion in jBPM at Community