<br><font size=2 face="sans-serif">Robert,</font>
<br>
<br><font size=2 face="sans-serif">Try this:</font>
<br>
<ul>
<li><font size=2 face="sans-serif">create a directory called META-INF in
your classpath</font>
<li><font size=2 face="sans-serif">in that directory, add a file called
jndi.properties</font>
<li><font size=2 face="sans-serif">in that file, add the line: java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory</font></ul>
<br><font size=2 face="sans-serif">Does that fix things?<br>
</font>
<br><font size=2 face="sans-serif">Alan</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Robert &lt;robert.weissmann@web.de&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: rules-users-bounces@lists.jboss.org</font>
<p><font size=1 face="sans-serif">08/06/2010 13:22</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Rules Users List &lt;rules-users@lists.jboss.org&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&quot;Rules Users List&quot; &lt;rules-users@lists.jboss.org&gt;,
&quot;Mark Proctor&quot; &lt;mproctor@codehaus.org&gt;, &quot;PAYET, Manuel&quot;
&lt;manuel.payet@capgemini.com&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [rules-users] Exception using persistence</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>I did, but I get the same Exception as before, but
on this new line<br>
<br>
<br>
UserTransaction ut = (UserTransaction) new &nbsp;<br>
InitialContext().lookup(&quot;java:comp/UserTransaction&quot; );<br>
<br>
<br>
08.06.2010 14:10:58 org.eclipse.jetty.util.log.Slf4jLog info<br>
INFO: Logging to &nbsp;<br>
org.slf4j.impl.JDK14LoggerAdapter(org.eclipse.jetty.util.log) via &nbsp;<br>
org.eclipse.jetty.util.log.Slf4jLog<br>
Exception in thread &quot;main&quot; javax.naming.NameNotFoundException;
remaining &nbsp;<br>
name 'UserTransaction'<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:576)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:663)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:678)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at &nbsp;<br>
org.eclipse.jetty.jndi.java.javaRootURLContext.lookup(javaRootURLContext.java:110)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at javax.naming.InitialContext.lookup(InitialContext.java:392)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at com.rob.tests.AnyTest$.test2(AnyTest.scala:38)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at com.rob.tests.AnyTest$.main(AnyTest.scala:18)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
at com.rob.tests.AnyTest.main(AnyTest.scala)<br>
<br>
<br>
I still don't understand where the &quot;java:comp/UserTransaction&quot;
will be &nbsp;<br>
accessible/come-from/being-created ... ?<br>
<br>
<br>
Am 08.06.2010, 13:42 Uhr, schrieb PAYET, Manuel &nbsp;<br>
&lt;manuel.payet@capgemini.com&gt;:<br>
<br>
&gt; I've made the same mistake at the beginning:<br>
&gt;<br>
&gt;<br>
&gt; You'd probably want to replace:<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;val emf : EntityManagerFactory =<br>
&gt; Persistence.createEntityManagerFactory( &quot;org.drools.persistence.jpa&quot;
)<br>
&gt; &nbsp; &nbsp; &nbsp;val env : Environment = KnowledgeBaseFactory.newEnvironment()<br>
&gt; &nbsp; &nbsp; &nbsp;env.set( EnvironmentName.ENTITY_MANAGER_FACTORY,
emf )<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;val ksession : StatefulKnowledgeSession = &nbsp;<br>
&gt; JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env
)<br>
&gt; &nbsp; &nbsp; &nbsp;val sessionId = ksession.getId<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;ksession.startProcess( &quot;Process4&quot; )<br>
&gt; &nbsp; &nbsp; &nbsp;ksession.dispose();<br>
&gt;<br>
&gt; By:<br>
&gt;<br>
&gt; UserTransaction ut =<br>
&gt; &nbsp; (UserTransaction) new InitialContext().lookup( &nbsp;<br>
&gt; &quot;java:comp/UserTransaction&quot; );<br>
&gt; ut.begin();<br>
&gt;<br>
&gt;<br>
&gt; val emf : EntityManagerFactory =<br>
&gt; Persistence.createEntityManagerFactory( &quot;org.drools.persistence.jpa&quot;
)<br>
&gt; &nbsp; &nbsp; &nbsp;val env : Environment = KnowledgeBaseFactory.newEnvironment()<br>
&gt; &nbsp; &nbsp; &nbsp;env.set( EnvironmentName.ENTITY_MANAGER_FACTORY,
emf )<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;val ksession : StatefulKnowledgeSession = &nbsp;<br>
&gt; JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env
)<br>
&gt; &nbsp; &nbsp; &nbsp;val sessionId = ksession.getId<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;ksession.startProcess( &quot;Process4&quot; )<br>
&gt; &nbsp; &nbsp; &nbsp;ksession.dispose();<br>
&gt;<br>
&gt; Ut.commit();<br>
&gt;<br>
&gt;<br>
&gt; (you didn't open a transaction before ;))<br>
&gt;<br>
&gt;<br>
&gt; -----Message d'origine-----<br>
&gt; De : robert.weissmann@web.de [mailto:robert.weissmann@web.de]<br>
&gt; Envoyé : mardi 8 juin 2010 13:42<br>
&gt; À : Rules Users List; Mark Proctor; PAYET, Manuel<br>
&gt; Objet : Re: [rules-users] Exception using persistence<br>
&gt;<br>
&gt; Ok, let me start from what the drools doc descripes at<br>
&gt;<br>
&gt; http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html_single/index.html#d0e1458<br>
&gt;<br>
&gt; Here is my code<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;val kbuilder: KnowledgeBuilder =<br>
&gt; KnowledgeBuilderFactory.newKnowledgeBuilder<br>
&gt; &nbsp; &nbsp; &nbsp;kbuilder.add(ResourceFactory.newClassPathResource(&quot;processes/process4.rf&quot;),<br>
&gt; ResourceType.DRF);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;val kbase: KnowledgeBase = kbuilder.newKnowledgeBase<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;val ds : PoolingDataSource = new PoolingDataSource()<br>
&gt; &nbsp; &nbsp; &nbsp;ds.setUniqueName(&quot;jdbc/processInstanceDS&quot;)<br>
&gt; &nbsp; &nbsp; &nbsp;ds.setClassName(&quot;org.h2.jdbcx.JdbcDataSource&quot;)<br>
&gt; &nbsp; &nbsp; &nbsp;ds.setMaxPoolSize(3)<br>
&gt; &nbsp; &nbsp; &nbsp;ds.setAllowLocalTransactions(true)<br>
&gt; &nbsp; &nbsp; &nbsp;ds.getDriverProperties().put(&quot;user&quot;,
&quot;sa&quot;)<br>
&gt; &nbsp; &nbsp; &nbsp;ds.getDriverProperties().put(&quot;password&quot;,
&quot;sasa&quot;)<br>
&gt; &nbsp; &nbsp; &nbsp;ds.getDriverProperties().put(&quot;URL&quot;,<br>
&gt; &quot;jdbc:h2:file:/NotBackedUp/data/process-instance-db&quot;)<br>
&gt; &nbsp; &nbsp; &nbsp;ds.init<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;val emf : EntityManagerFactory =<br>
&gt; Persistence.createEntityManagerFactory( &quot;org.drools.persistence.jpa&quot;
)<br>
&gt; &nbsp; &nbsp; &nbsp;val env : Environment = KnowledgeBaseFactory.newEnvironment()<br>
&gt; &nbsp; &nbsp; &nbsp;env.set( EnvironmentName.ENTITY_MANAGER_FACTORY,
emf )<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;val ksession : StatefulKnowledgeSession = &nbsp;<br>
&gt; JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env
)<br>
&gt; &nbsp; &nbsp; &nbsp;val sessionId = ksession.getId<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;ksession.startProcess( &quot;Process4&quot; )<br>
&gt; &nbsp; &nbsp; &nbsp;ksession.dispose();<br>
&gt;<br>
&gt;<br>
&gt; and the persistence.xml:<br>
&gt;<br>
&gt;<br>
&gt; &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;persistence<br>
&gt; &nbsp; &nbsp;version=&quot;1.0&quot;<br>
&gt; &nbsp; &nbsp;xsi:schemaLocation=<br>
&gt; &nbsp; &nbsp; &nbsp;&quot;http://java.sun.com/xml/ns/persistence<br>
&gt; &nbsp; &nbsp; &nbsp; http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd<br>
&gt; &nbsp; &nbsp; &nbsp; http://java.sun.com/xml/ns/persistence/orm<br>
&gt; &nbsp; &nbsp; &nbsp; http://java.sun.com/xml/ns/persistence/orm_1_0.xsd&quot;<br>
&gt; &nbsp; &nbsp;xmlns:orm=&quot;http://java.sun.com/xml/ns/persistence/orm&quot;<br>
&gt; &nbsp; &nbsp;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>
&gt; &nbsp; &nbsp;xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot;&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp;&lt;persistence-unit name=&quot;org.drools.persistence.jpa&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;jta-data-source&gt;jdbc/processInstanceDS&lt;/jta-data-source&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;class&gt;org.drools.persistence.session.SessionInfo&lt;/class&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;class&gt;org.drools.persistence.processinstance.ProcessInstanceInfo&lt;/class&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;class&gt;org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo&lt;/class&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;class&gt;org.drools.persistence.processinstance.WorkItemInfo&lt;/class&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;properties&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;property name=&quot;hibernate.dialect&quot;<br>
&gt; value=&quot;org.hibernate.dialect.H2Dialect&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;property name=&quot;hibernate.max_fetch_depth&quot;
value=&quot;3&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;property name=&quot;hibernate.hbm2ddl.auto&quot;
value=&quot;update&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;property name=&quot;hibernate.show_sql&quot;
value=&quot;true&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;property name=&quot;hibernate.transaction.manager_lookup_class&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;value=&quot;org.hibernate.transaction.BTMTransactionManagerLookup&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;/properties&gt;<br>
&gt; &nbsp; &nbsp;&lt;/persistence-unit&gt;<br>
&gt; &lt;/persistence&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thats pretty much whats in the drools doc.<br>
&gt;<br>
&gt; But I get<br>
&gt;<br>
&gt;<br>
&gt; 08.06.2010 13:31:52 org.hibernate.cfg.annotations.Version &lt;clinit&gt;<br>
&gt; INFO: Hibernate Annotations 3.4.0.GA<br>
&gt; 08.06.2010 13:31:52 org.hibernate.cfg.Environment &lt;clinit&gt;<br>
&gt; INFO: Hibernate 3.3.0.SP1<br>
&gt; 08.06.2010 13:31:52 org.hibernate.cfg.Environment &lt;clinit&gt;<br>
&gt; INFO: hibernate.properties not found<br>
&gt; 08.06.2010 13:31:52 org.hibernate.cfg.Environment buildBytecodeProvider<br>
&gt; INFO: Bytecode provider name : javassist 08.06.2010 13:31:52 &nbsp;<br>
&gt; org.hibernate.cfg.Environment &lt;clinit&gt;<br>
&gt; INFO: using JDK 1.4 java.sql.Timestamp handling 08.06.2010 13:31:52
&nbsp;<br>
&gt; org.hibernate.annotations.common.Version &lt;clinit&gt;<br>
&gt; INFO: Hibernate Commons Annotations 3.1.0.GA 08.06.2010 13:31:52 &nbsp;<br>
&gt; org.hibernate.ejb.Version &lt;clinit&gt;<br>
&gt; INFO: Hibernate EntityManager 3.4.0.GA<br>
&gt; 08.06.2010 13:31:53 org.hibernate.cfg.AnnotationBinder bindClass<br>
&gt; INFO: Binding entity from annotated class:<br>
&gt; org.drools.persistence.session.SessionInfo<br>
&gt; 08.06.2010 13:31:53 org.hibernate.cfg.annotations.EntityBinder bindTable<br>
&gt; INFO: Bind entity org.drools.persistence.session.SessionInfo on table
&nbsp;<br>
&gt; SessionInfo 08.06.2010 13:31:53 org.hibernate.cfg.AnnotationBinder
&nbsp;<br>
&gt; bindClass<br>
&gt; INFO: Binding entity from annotated class:<br>
&gt; org.drools.persistence.processinstance.ProcessInstanceInfo<br>
&gt; 08.06.2010 13:31:53 org.hibernate.cfg.annotations.EntityBinder bindTable<br>
&gt; INFO: Bind entity<br>
&gt; org.drools.persistence.processinstance.ProcessInstanceInfo on table
&nbsp;<br>
&gt; ProcessInstanceInfo 08.06.2010 13:31:53 &nbsp;<br>
&gt; org.hibernate.cfg.AnnotationBinder bindClass<br>
&gt; INFO: Binding entity from annotated class:<br>
&gt; org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo<br>
&gt; 08.06.2010 13:31:53 org.hibernate.cfg.annotations.EntityBinder bindTable<br>
&gt; INFO: Bind entity<br>
&gt; org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo<br>
&gt; on table VariableInstanceInfo<br>
&gt; 08.06.2010 13:31:53 org.hibernate.cfg.AnnotationBinder bindClass<br>
&gt; INFO: Binding entity from annotated class:<br>
&gt; org.drools.persistence.processinstance.WorkItemInfo<br>
&gt; 08.06.2010 13:31:53 org.hibernate.cfg.annotations.EntityBinder bindTable<br>
&gt; INFO: Bind entity org.drools.persistence.processinstance.WorkItemInfo
on &nbsp;<br>
&gt; table WorkItemInfo 08.06.2010 13:31:54 &nbsp;<br>
&gt; org.hibernate.cfg.annotations.CollectionBinder<br>
&gt; bindOneToManySecondPass<br>
&gt; INFO: Mapping collection:<br>
&gt; org.drools.persistence.processinstance.ProcessInstanceInfo.variables
-&gt; &nbsp;<br>
&gt; VariableInstanceInfo 08.06.2010 13:31:54 &nbsp;<br>
&gt; org.hibernate.cfg.AnnotationConfiguration<br>
&gt; secondPassCompile<br>
&gt; INFO: Hibernate Validator not found: ignoring 08.06.2010 13:31:54
&nbsp;<br>
&gt; org.hibernate.cfg.search.HibernateSearchEventListenerRegister<br>
&gt; enableHibernateSearch<br>
&gt; INFO: Unable to find &nbsp;<br>
&gt; org.hibernate.search.event.FullTextIndexEventListener<br>
&gt; on the classpath. Hibernate Search is not enabled.<br>
&gt; 08.06.2010 13:31:54 org.hibernate.util.NamingHelper getInitialContext<br>
&gt; INFO: JNDI InitialContext properties:{}<br>
&gt; 08.06.2010 13:31:54 org.hibernate.connection.DatasourceConnectionProvider<br>
&gt; configure<br>
&gt; INFO: Using datasource: jdbc/processInstanceDS 08.06.2010 13:31:56
&nbsp;<br>
&gt; org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: RDBMS: H2, version: 1.0.77 (2008-08-16) 08.06.2010 13:31:56
&nbsp;<br>
&gt; org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: JDBC driver: H2 JDBC Driver, version: 1.0.77 (2008-08-16) &nbsp;<br>
&gt; 08.06.2010 13:31:56 org.hibernate.dialect.Dialect &lt;init&gt;<br>
&gt; INFO: Using dialect: org.hibernate.dialect.H2Dialect 08.06.2010 13:31:56
&nbsp;<br>
&gt; org.hibernate.transaction.TransactionFactoryFactory<br>
&gt; buildTransactionFactory<br>
&gt; INFO: Transaction strategy:<br>
&gt; org.hibernate.ejb.transaction.JoinableCMTTransactionFactory<br>
&gt; 08.06.2010 13:31:56<br>
&gt; org.hibernate.transaction.TransactionManagerLookupFactory<br>
&gt; getTransactionManagerLookup<br>
&gt; INFO: instantiating TransactionManagerLookup:<br>
&gt; org.hibernate.transaction.BTMTransactionManagerLookup<br>
&gt; 08.06.2010 13:31:56<br>
&gt; org.hibernate.transaction.TransactionManagerLookupFactory<br>
&gt; getTransactionManagerLookup<br>
&gt; INFO: instantiated TransactionManagerLookup 08.06.2010 13:31:56 &nbsp;<br>
&gt; org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Automatic flush during beforeCompletion(): disabled 08.06.2010
&nbsp;<br>
&gt; 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Automatic session close at end of transaction: disabled 08.06.2010
&nbsp;<br>
&gt; 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: JDBC batch size: 15<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: JDBC batch updates for versioned data: disabled 08.06.2010 &nbsp;<br>
&gt; 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Scrollable result sets: enabled<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: JDBC3 getGeneratedKeys(): enabled<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Connection release mode: auto<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Maximum outer join fetch depth: 3<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Default batch fetch size: 1<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Generate SQL with comments: disabled 08.06.2010 13:31:56 &nbsp;<br>
&gt; org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Order SQL updates by primary key: disabled 08.06.2010 13:31:56
&nbsp;<br>
&gt; org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Order SQL inserts for batching: disabled 08.06.2010 13:31:56
&nbsp;<br>
&gt; org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory<br>
&gt; INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory<br>
&gt; 08.06.2010 13:31:56 org.hibernate.hql.ast.ASTQueryTranslatorFactory
&nbsp;<br>
&gt; &lt;init&gt;<br>
&gt; INFO: Using ASTQueryTranslatorFactory<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Query language substitutions: {}<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: JPA-QL strict compliance: enabled<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Second-level cache: enabled<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Query cache: disabled<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory createRegionFactory<br>
&gt; INFO: Cache region factory :<br>
&gt; org.hibernate.cache.impl.NoCachingRegionFactory<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Optimize cache for minimal puts: disabled 08.06.2010 13:31:56
&nbsp;<br>
&gt; org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Structured second-level cache entries: disabled 08.06.2010 &nbsp;<br>
&gt; 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Echoing all SQL to stdout<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Statistics: disabled<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Deleted entity synthetic identifier rollback: disabled 08.06.2010
&nbsp;<br>
&gt; 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Default entity-mode: pojo<br>
&gt; 08.06.2010 13:31:56 org.hibernate.cfg.SettingsFactory buildSettings<br>
&gt; INFO: Named query checking : enabled<br>
&gt; 08.06.2010 13:31:56 org.hibernate.impl.SessionFactoryImpl &lt;init&gt;<br>
&gt; INFO: building session factory<br>
&gt; 08.06.2010 13:31:57 org.hibernate.impl.SessionFactoryObjectFactory<br>
&gt; addInstance<br>
&gt; INFO: Not binding factory to JNDI, no JNDI name configured 08.06.2010
&nbsp;<br>
&gt; 13:31:57 org.hibernate.tool.hbm2ddl.SchemaUpdate execute<br>
&gt; INFO: Running hbm2ddl schema update<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.SchemaUpdate execute<br>
&gt; INFO: fetching database metadata<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.SchemaUpdate execute<br>
&gt; INFO: updating schema<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: table found: PROCESS-INSTANCE-DB.PUBLIC.PROCESSINSTANCEINFO<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: columns: [externalvariables, startdate, lastreaddate, state,
&nbsp;<br>
&gt; processinstancebytearray, optlock, processid, lastmodificationdate,
&nbsp;<br>
&gt; processinstanceid] 08.06.2010 13:31:57 &nbsp;<br>
&gt; org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: foreign keys: []<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: indexes: [primary_key_4]<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: table found:<br>
&gt; PROCESS-INSTANCE-DB.PUBLIC.PROCESSINSTANCEINFO_EVENTTYPES<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: columns: [element, processinstanceinfo_processinstanceid]<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: foreign keys: [fk2fd59d8cbee4613c] 08.06.2010 13:31:57 &nbsp;<br>
&gt; org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: indexes: [fk2fd59d8cbee4613c_index_b] 08.06.2010 13:31:57 &nbsp;<br>
&gt; org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: table found: PROCESS-INSTANCE-DB.PUBLIC.SESSIONINFO<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: columns: [rulesbytearray, id, startdate, dirty, &nbsp;<br>
&gt; lastmodificationdate] 08.06.2010 13:31:57 &nbsp;<br>
&gt; org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: foreign keys: []<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: indexes: [primary_key_7]<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: table found: PROCESS-INSTANCE-DB.PUBLIC.VARIABLEINSTANCEINFO<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: columns: [id, persister, name, type, processid] 08.06.2010 &nbsp;<br>
&gt; 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: foreign keys: [fk7be49b9f9123c534] 08.06.2010 13:31:57 &nbsp;<br>
&gt; org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: indexes: [fk7be49b9f9123c534_index_2, primary_key_2] 08.06.2010
&nbsp;<br>
&gt; 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: table found: PROCESS-INSTANCE-DB.PUBLIC.WORKITEMINFO<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: columns: [workitembytearray, name, workitemid, state, optlock,
&nbsp;<br>
&gt; creationdate, processinstanceid] 08.06.2010 13:31:57 &nbsp;<br>
&gt; org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: foreign keys: []<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.TableMetadata &lt;init&gt;<br>
&gt; INFO: indexes: [primary_key_b]<br>
&gt; 08.06.2010 13:31:57 org.hibernate.tool.hbm2ddl.SchemaUpdate execute<br>
&gt; INFO: schema update complete<br>
&gt; 08.06.2010 13:31:57 bitronix.tm.BitronixTransactionManager logVersion<br>
&gt; INFO: Bitronix Transaction Manager version 1.3.2 08.06.2010 13:31:57
&nbsp;<br>
&gt; bitronix.tm.Configuration buildServerIdArray<br>
&gt; WARNUNG: cannot get this JVM unique ID. Make sure it is configured
and &nbsp;<br>
&gt; you only use ASCII characters. Will use IP address instead (unsafe
for &nbsp;<br>
&gt; production usage!).<br>
&gt; 08.06.2010 13:31:58 bitronix.tm.Configuration buildServerIdArray<br>
&gt; INFO: JVM unique ID: &lt;192.168.254.2&gt;<br>
&gt; 08.06.2010 13:31:58 bitronix.tm.journal.DiskJournal open<br>
&gt; WARNUNG: active log file is unclean, previous server crash ?<br>
&gt; 08.06.2010 13:31:58 bitronix.tm.recovery.Recoverer run<br>
&gt; INFO: recovery committed 0 dangling transaction(s) and rolled back
0 &nbsp;<br>
&gt; aborted transaction(s) on 1 resource(s) [jdbc/processInstanceDS] &nbsp;<br>
&gt; 08.06.2010 13:31:58 org.eclipse.jetty.util.log.Slf4jLog info<br>
&gt; INFO: Logging to<br>
&gt; org.slf4j.impl.JDK14LoggerAdapter(org.eclipse.jetty.util.log) via
&nbsp;<br>
&gt; org.eclipse.jetty.util.log.Slf4jLog<br>
&gt; Exception in thread &quot;main&quot; java.lang.RuntimeException: Could
not commit &nbsp;<br>
&gt; session<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.drools.persistence.session.SingleSessionCommandService.&lt;init&gt;(SingleSessionCommandService.java:133)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl.newStatefulKnowledgeSession(JPAKnowledgeServiceProviderImpl.java:44)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:93)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at com.rob.tests.AnyTest$.test2(AnyTest.scala:44)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at com.rob.tests.AnyTest$.main(AnyTest.scala:18)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at com.rob.tests.AnyTest.main(AnyTest.scala)<br>
&gt; Caused by: javax.naming.NameNotFoundException; remaining name &nbsp;<br>
&gt; 'UserTransaction'<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at &nbsp;<br>
&gt; org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:576)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at &nbsp;<br>
&gt; org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:663)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at &nbsp;<br>
&gt; org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:678)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.eclipse.jetty.jndi.java.javaRootURLContext.lookup(javaRootURLContext.java:110)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at javax.naming.InitialContext.lookup(InitialContext.java:392)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.drools.persistence.session.SingleSessionCommandService.&lt;init&gt;(SingleSessionCommandService.java:109)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 5 more<br>
&gt;<br>
&gt; (This test is in a class file called &quot;AnyTest.scala&quot;)<br>
&gt;<br>
&gt; Cheers, Rob<br>
&gt;<br>
&gt; P.S. Thanks for your patience and help.<br>
&gt;<br>
&gt;<br>
&gt; Am 08.06.2010, 09:44 Uhr, schrieb PAYET, Manuel<br>
&gt; &lt;manuel.payet@capgemini.com&gt;:<br>
&gt;<br>
&gt;&gt; Robert, what's your application server, or your transaction manager?<br>
&gt;&gt; I successfully tested with bitronix in my J2SE application, and
with<br>
&gt;&gt; the jboss application server transaction manager.<br>
&gt;&gt;<br>
&gt;&gt; I don't have any further idea for your problem, but, from my own
point<br>
&gt;&gt; of view, it's not so dirty to bind it to java:comp/UserTransaction,<br>
&gt;&gt; and is probably your only way to do things without patching the
code<br>
&gt;&gt; (as you seem to have seen in the source code<br>
&gt;&gt; &quot;java:comp/UserTransaction&quot; is not in a variable so...<br>
&gt;&gt;<br>
&gt;&gt; -----Message d'origine-----<br>
&gt;&gt; De : robert.weissmann@web.de [mailto:robert.weissmann@web.de]
Envoyé :<br>
&gt;&gt; lundi 7 juin 2010 20:50 À : Rules Users List; Mark Proctor; PAYET,<br>
&gt;&gt; Manuel Objet : Re: [rules-users] Exception using persistence<br>
&gt;&gt;<br>
&gt;&gt; For additional information:<br>
&gt;&gt;<br>
&gt;&gt; JPAKnowledgeService.newStatefulKnowledgeSession uses<br>
&gt;&gt;<br>
&gt;&gt; org.drools.persistence.session.SingleSessionCommandService<br>
&gt;&gt;<br>
&gt;&gt; where &quot;java:comp/UserTransaction&quot; is used (I checked
the drools source<br>
&gt;&gt; code). Looks like there is no way to change this.<br>
&gt;&gt;<br>
&gt;&gt; I just wonder that I am the only one having this problem.<br>
&gt;&gt;<br>
&gt;&gt; As I said &quot;comp/UserTransaction&quot; works, but &quot;java:comp/UserTransaction&quot;<br>
&gt;&gt; doesn't, but in the docs &quot;java:comp/UserTransaction&quot;
is used !?!?!?<br>
&gt;&gt;<br>
&gt;&gt; Cheers, Rob.<br>
&gt;&gt;<br>
&gt;&gt; Am 07.06.2010, 16:22 Uhr, schrieb PAYET, Manuel<br>
&gt;&gt; &lt;manuel.payet@capgemini.com&gt;:<br>
&gt;&gt;<br>
&gt;&gt;&gt; It's probably that your transaction manager, for an odd reason,<br>
&gt;&gt;&gt; doesn't bind with the good name; You can do the following
workaround:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Final InitialContext initContext = new InitialContext();<br>
&gt;&gt;&gt; initContext.bind(&quot;java:comp/UserTransaction&quot;,initContext.lookup(&quot;comp<br>
&gt;&gt;&gt; /<br>
&gt;&gt;&gt; UserTransaction&quot;));<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; And voila, those two jndi name should point to the same object.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I stress the fact that what I've written hasn't been tested.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; -----Message d'origine-----<br>
&gt;&gt;&gt; De : rules-users-bounces@lists.jboss.org<br>
&gt;&gt;&gt; [mailto:rules-users-bounces@lists.jboss.org] De la part de
Robert<br>
&gt;&gt;&gt; Envoyé : lundi 7 juin 2010 16:16 À : rules-users@lists.jboss.org;<br>
&gt;&gt;&gt; Mark Proctor Objet : Re: [rules-users] Exception using persistence<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; still struggling with this one (see below),<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; but I did a slide change in the test-code<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;try {<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;val env = new java.util.Hashtable[String,
String]<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;env.put(Context.INITIAL_CONTEXT_FACTORY,<br>
&gt;&gt;&gt; &quot;bitronix.tm.jndi.BitronixInitialContextFactory&quot;)<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;val ctx = new InitialContext(env)<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;val ut1 : UserTransaction = (ctx.lookup(<br>
&gt;&gt;&gt; &quot;java:comp/UserTransaction&quot;)).asInstanceOf[UserTransaction]<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;} catch {<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;case ex: Exception =&gt; ex.printStackTrace()<br>
&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;}<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; (Sorry, code is in Scala, but should not be a problem to read
it).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Instead of &quot;java:comp/UserTransaction&quot; (as written
in the docs) I<br>
&gt;&gt;&gt; wrote &quot;comp/UserTransaction&quot; and it works.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; But since this is some test-code and I am able to do the look-up
as I<br>
&gt;&gt;&gt; want (&quot;comp/UserTransaction&quot;), as soon as I use<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null,
env )<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I have no influence anymore (its drools-code ;-) and it looks
like<br>
&gt;&gt;&gt; its using internally &quot;java:comp/UserTransaction&quot;.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Is there any way to change this (setting it) ?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers, Rob<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Am 01.06.2010, 23:54 Uhr, schrieb Robert &lt;robert.weissmann@web.de&gt;:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Well, I tried this but it does not work.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Checking additionally the BitronixInitialContextFactory
API where it<br>
&gt;&gt;&gt;&gt; says:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ---------------------------------------------<br>
&gt;&gt;&gt;&gt; &quot;Implementation of InitialContextFactory that allows
lookup of<br>
&gt;&gt;&gt;&gt; transaction manager and registered resources.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; The easiest way to use this provider is to create a jndi.properties<br>
&gt;&gt;&gt;&gt; file in your classpath with this content:<br>
&gt;&gt;&gt;&gt; java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextF<br>
&gt;&gt;&gt;&gt; a c tory Alternatively, you can create a InitialContext
object with<br>
&gt;&gt;&gt;&gt; an environment pointing to this class:<br>
&gt;&gt;&gt;&gt; &nbsp; Hashtable env = new Hashtable();<br>
&gt;&gt;&gt;&gt; &nbsp; env.put(Context.INITIAL_CONTEXT_FACTORY,<br>
&gt;&gt;&gt;&gt; &quot;bitronix.tm.jndi.BitronixInitialContextFactory&quot;);<br>
&gt;&gt;&gt;&gt; &nbsp; Context ctx = new InitialContext(env);<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; The transaction manager can be looked up at the standard
URL<br>
&gt;&gt;&gt;&gt; java:comp/UserTransaction while resources can be looked
up using<br>
&gt;&gt;&gt;&gt; their unique name as set in ResourceBean.getUniqueName().
&quot;<br>
&gt;&gt;&gt;&gt; ---------------------------------------------<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; So, I tried the following ( Its in Scala, but shouldn't
be a problem<br>
&gt;&gt;&gt;&gt; to<br>
&gt;&gt;&gt;&gt; read):<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;try {<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;val env = new java.util.Hashtable[String,
String]<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;env.put(Context.INITIAL_CONTEXT_FACTORY,<br>
&gt;&gt;&gt;&gt; &quot;bitronix.tm.jndi.BitronixInitialContextFactory&quot;);<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;val ctx = new InitialContext(env);<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;val ut1 : UserTransaction = (ctx.lookup(<br>
&gt;&gt;&gt;&gt; &quot;java:comp/UserTransaction&quot;<br>
&gt;&gt;&gt;&gt; )).asInstanceOf[UserTransaction]<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;} catch {<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;case ex: Exception =&gt; ex.printStackTrace()<br>
&gt;&gt;&gt;&gt; &nbsp; &nbsp;}<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; But still getting the same problem as before at line &nbsp;
&quot;val ut1 : &nbsp;<br>
&gt;&gt;&gt;&gt; ...&quot;.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; What I do not get is that the Bitronix API says that the
standard<br>
&gt;&gt;&gt;&gt; URL is &quot;java:comp/UserTransaction&quot;, but its
somehow not found !?!?!?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Any ideas ?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Cheers, Rob.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Am 31.05.2010, 02:54 Uhr, schrieb Mark Proctor &nbsp;<br>
&gt;&gt;&gt;&gt; &lt;mproctor@codehaus.org&gt;:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On 30/05/2010 20:28, Robert wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt; Hi, I followed the instructions on setting up
the persistence in<br>
&gt;&gt;&gt;&gt;&gt;&gt; the drools flow doc, but I get the following exception:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Exception in thread &quot;main&quot; java.lang.RuntimeException:
Could not<br>
&gt;&gt;&gt;&gt;&gt;&gt; commit session<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.drools.persistence.session.SingleSessionCommandService.&lt;init&gt;(SingleSessionCommandService.java:133)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl.newStatefulKnowledgeSession(JPAKnowledgeServiceProviderImpl.java:44)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:93)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; com.rob.server.core.process.drools.tasks.DroolsProcessHandler.&lt;init&gt;(DroolsProcessHandler.scala:130)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; com.rob.server.core.process.drools.tasks.StartDroolsProcessHandler$.main(DroolsProcessHandler.scala:33)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; com.rob.server.core.process.drools.tasks.StartDroolsProcessHandler.<br>
&gt;&gt;&gt;&gt;&gt;&gt; m<br>
&gt;&gt;&gt;&gt;&gt;&gt; ain(DroolsProcessHandler.scala) Caused by:<br>
&gt;&gt;&gt;&gt;&gt;&gt; javax.naming.NameNotFoundException; remaining
name 'UserTransaction'<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:576)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:663)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:678)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.eclipse.jetty.jndi.java.javaRootURLContext.lookup(javaRootURLContext.java:110)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at javax.naming.InitialContext.lookup(InitialContext.java:392)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; at<br>
&gt;&gt;&gt;&gt;&gt;&gt; org.drools.persistence.session.SingleSessionCommandService.&lt;init&gt;(SingleSessionCommandService.java:109)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &nbsp; ... 5 more<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; I have no idea what this means. I guess<br>
&gt;&gt;&gt;&gt;&gt;&gt; SingleSessionCommandService is looking up for
&quot;UserTransaction&quot;, &nbsp;<br>
&gt;&gt;&gt;&gt;&gt;&gt; but whats the &quot;UserTransaction&quot;<br>
&gt;&gt;&gt;&gt;&gt;&gt; ?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; You need to configure JTA and JNDI, it uses the standard
JNDI<br>
&gt;&gt;&gt;&gt;&gt; lookup mechanism to find the UserTransaction it's
to be associated &nbsp;<br>
&gt;&gt;&gt;&gt;&gt; with.<br>
&gt;&gt;&gt;&gt;&gt; See javadocs example here:<br>
&gt;&gt;&gt;&gt;&gt; http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artif<br>
&gt;&gt;&gt;&gt;&gt; a<br>
&gt;&gt;&gt;&gt;&gt; c<br>
&gt;&gt;&gt;&gt;&gt; t/trunk/target/javadocs/stable/drools-api/org/drools/persistence/jp</font></tt>
<br><tt><font size=2>&gt;&gt;&gt;&gt;&gt; a<br>
&gt;&gt;&gt;&gt;&gt; /<br>
&gt;&gt;&gt;&gt;&gt; JPAKnowledgeService.html<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Each transaction framework has a different way to
be configured,<br>
&gt;&gt;&gt;&gt;&gt; some are simpler than others.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Mark<br>
&gt;&gt;&gt;&gt;&gt;&gt; Cheers, Rob.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; rules-users mailing list<br>
&gt;&gt;&gt;&gt;&gt; rules-users@lists.jboss.org<br>
&gt;&gt;&gt;&gt;&gt; https://lists.jboss.org/mailman/listinfo/rules-users<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Erstellt mit Operas revolutionärem E-Mail-Modul:<br>
&gt;&gt;&gt; http://www.opera.com/mail/<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; rules-users mailing list<br>
&gt;&gt;&gt; rules-users@lists.jboss.org<br>
&gt;&gt;&gt; https://lists.jboss.org/mailman/listinfo/rules-users<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This message contains information that may be privileged or<br>
&gt;&gt;&gt; confidential and is the property of the Capgemini Group. It
is<br>
&gt;&gt;&gt; intended only for the person to whom it is addressed. If you
are not<br>
&gt;&gt;&gt; the intended recipient, you are not authorized to read, print,<br>
&gt;&gt;&gt; retain, copy, disseminate, distribute, or use this message
or any<br>
&gt;&gt;&gt; part thereof. If you receive this message in error, please
notify the<br>
&gt;&gt;&gt; sender immediately and delete all copies of this message.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; rules-users mailing list<br>
&gt;&gt;&gt; rules-users@lists.jboss.org<br>
&gt;&gt;&gt; https://lists.jboss.org/mailman/listinfo/rules-users<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Erstellt mit Operas revolutionärem E-Mail-Modul: &nbsp;<br>
&gt; http://www.opera.com/mail/<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; This message contains information that may be privileged or confidential
&nbsp;<br>
&gt; and is the property of the Capgemini Group. It is<br>
&gt; intended only for the person to whom it is addressed. If you are not
the &nbsp;<br>
&gt; intended recipient, you are not authorized to<br>
&gt; read, print, retain, copy, disseminate, distribute, or use this message
&nbsp;<br>
&gt; or any part thereof. If you receive this message<br>
&gt; in error, please notify the sender immediately and delete all copies
of &nbsp;<br>
&gt; this message.<br>
&gt;<br>
<br>
<br>
-- <br>
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/<br>
_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
https://lists.jboss.org/mailman/listinfo/rules-users<br>
</font></tt>
<br>