[rules-users] InvocationTargetException in KnowledgeStoreServiceImpl

odelyaholiday odelyay at sintecmedia.com
Wed Mar 16 06:22:19 EDT 2011


Hi!

I get InvocationTargetException  after the following:

 return constructor.newInstance( kbase,  conf, env );

in KnowledgeStoreServiceImpl.

I see that in return (T) constructorAccessor.newInstance(initargs) of
Constructor class it throws the InvocationTargetException.

The exception is null so I can't see what it the problem!

I call the code from this:

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 define the transaction manager in my spring beans like this:


	
		
		
		
		
		
		
		
			
				username
				username
				myurl
				oracle.jdbc.OracleDriver
			
		
	


	
		
	


	


	
		
		
	
	

I see that bitronix is up via the debugging messages. (2011-03-16
12:14:53,399 DEBUG (        PoolingDataSource.java:84)     - building XA
pool for java/DS1 with 0 connection(s) etc..)

in persistence.xml I have:


                    org.hibernate.ejb.HibernatePersistence
                    java/DS1
                    persistenceorm.xml
                    org.drools.persistence.info.SessionInfo
                    org.jbpm.persistence.processinstance.ProcessInstanceInfo
                    org.drools.persistence.info.WorkItemInfo
                    true
                    
                              
                              
                              
                              
                              
                               
                              
                    
          

What could cause the problem?

When I defined the btm with tomcat and not with spring - it worked fine.
(but I had context reloading problems). when I define it only with spring -
it get this weird exception.




--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/InvocationTargetException-in-KnowledgeStoreServiceImpl-tp2686763p2686763.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list