[
https://issues.jboss.org/browse/DROOLS-492?page=com.atlassian.jira.plugin...
]
Charles Moulliard commented on DROOLS-492:
------------------------------------------
This is a old class created for Drools5 project and still available under the module
"drools-spring-legacy5". The code already refers to the new Class in the
initTransactionManager (line 270 - org.kie.spring.persistence.KieSpringTransactionManager)
of the class org.drools.persistence.SingleSessionCommandService but if for any reason,
when we create the TxManager of PersistenceContextManager, an exception occurs then the
code tries to load the old class.
This is what happen here. I have updated (this morning) drools-persistence and
jbpm-persistence to export the packages correctly and this error is not longer there.
Tested with this project on JBossFuse 6.1 -
https://github.com/cmoulliard/droolsjbpm-osgi-examples#jbpm-process-with-...
To use the example, you must install h2 on your machine and start it before to deploy the
bundles on Fuse
{code}
[ 132] [Active ] [ ] [ ] [ 60] KIE API (6.1.0.20140520-0313)
[ 133] [Active ] [ ] [ ] [ 60] KIE Internal (6.1.0.20140520-0944)
[ 134] [Active ] [ ] [ ] [ 60] Drools :: Core
(6.1.0.20140519-2048)
[ 135] [Active ] [ ] [ ] [ 60] Drools :: Compiler
(6.1.0.20140519-1832), Fragments: 136
[ 136] [Resolved ] [ ] [ ] [ 60] Drools :: OSGI Integration
(6.1.0.20140519-1502), Hosts: 135
[ 152] [Active ] [ ] [ ] [ 60] Drools :: Persistence :: JPA
(6.1.0.20140519-1922)
[ 153] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Specs ::
Scripting API 1.0 (2.4.0)
[ 154] [Active ] [ ] [ ] [ 60] Java Servlet 3.0 API (1.0.2.Final)
[ 155] [Active ] [ ] [ ] [ 60] JACC 1.5 API (1.0.0.Final)
[ 156] [Active ] [ ] [ ] [ 60] Joda-Time (1.6.2)
[ 157] [Active ] [ ] [ ] [ 60] Java(TM) EE Interceptors 1.2 API
(1.0.0.Final)
[ 158] [Active ] [ ] [ ] [ 60] Java(TM) Message Service (JMS) 1.1
API (1.0.1.Final)
[ 159] [Active ] [ ] [ ] [ 60] hibernate-jpa-2.1-api (1.0.0.Final)
[ 160] [Active ] [ ] [ ] [ 60] Java Transaction API (1.0.0.Final)
[ 161] [Active ] [ ] [ ] [ 60] Jackson JSON processor (1.9.9)
[ 162] [Active ] [ ] [ ] [ 60] jBPM :: Human Task Core
(6.1.0.20140519-1459)
[ 163] [Active ] [ ] [ ] [ 60] jBPM :: Human Task WorkItems
(6.1.0.20140519-1459)
[ 164] [Active ] [ ] [ ] [ 60] jBPM :: JPA Human Task Persistence
(6.1.0.20140519-1459)
[ 165] [Active ] [ ] [ ] [ 60] jBPM :: Flow Builder
(6.1.0.20140519-1459)
[ 166] [Active ] [ ] [ ] [ 60] jBPM :: Flow (6.1.0.20140519-1459)
[ 167] [Active ] [ ] [ ] [ 60] jBPM :: BPMN2 (6.1.0.20140519-1459)
[ 168] [Active ] [ ] [ ] [ 60] jBPM :: Audit (6.1.0.20140519-1459)
[ 169] [Active ] [ ] [ ] [ 60] jBPM :: RuntimeManager
(6.1.0.20140519-1459)
[ 170] [Active ] [ ] [ ] [ 60] jBPM :: JPA Persistence
(6.1.0.20140519-1459)
[ 175] [Active ] [ ] [ ] [ 60] Kie Spring (6.1.0.20140519-1502)
[ 180] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Bundles ::
antlr (2.7.7.5)
[ 181] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Bundles :: ant
(1.8.2.2)
[ 182] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Bundles ::
dom4j (1.6.1.5)
[ 183] [Active ] [ ] [ ] [ 60] Apache ServiceMix :: Bundles :: serp
(1.14.1.1)
[ 184] [Active ] [ ] [ ] [ 60] ClassMate (0.9.0)
[ 185] [Active ] [ ] [ ] [ 60] Javassist (3.18.1.GA)
[ 186] [Active ] [ ] [ ] [ 60] JACC 1.4 API (1.0.2.Final)
[ 187] [Active ] [ ] [ ] [ 60]
wrap_mvn_org.jboss_jandex_1.1.0.Final (0)
[ 188] [Active ] [ ] [ ] [ 60] JBoss Logging 3 (3.1.4.GA)
[ 189] [Active ] [ ] [ ] [ 60] hibernate-commons-annotations
(4.0.4.Final)
[ 190] [Active ] [ ] [ ] [ 100] hibernate-core (4.3.1.Final)
[ 191] [Active ] [ ] [ ] [ 100] hibernate-entitymanager
(4.3.1.Final)
[ 192] [Active ] [ ] [ ] [ 100] hibernate-osgi (4.3.1.Final)
[ 193] [Active ] [ ] [ ] [ 60] H2 Database Engine (1.4.178)
[ 194] [Active ] [ ] [ ] [ 60] jBPM-Spring-Hibernate-Example
(1.0.0.SNAPSHOT)
...
JBossFuse:karaf@root> features:addurl
mvn:org.drools.example/features/1.0.0-SNAPSHOT/xml/features
JBossFuse:karaf@root> features:install jbpm-spring-persistent
JBossFuse:karaf@root> Processing evaluation for employee UserId-12345
Executing work item WorkItem 1 [name=Human Task, state=0, processInstanceId=1,
parameters{NodeName=Two}]
Executing work item WorkItem 2 [name=RegisterRequest, state=0, processInstanceId=1,
parameters{employeeId=UserId-12345}]
{code}
As you see screenshot a sessionInfo has been created in the DB. Not yet sure until now how
I can verify if the steps are persisted ...
Changes necessary in drools-persistence-jpa for kie-spring
----------------------------------------------------------
Key: DROOLS-492
URL:
https://issues.jboss.org/browse/DROOLS-492
Project: Drools
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Affects Versions: 6.1.0.Beta3
Reporter: Marco Rietveld
Assignee: Marco Rietveld
Fix For: 6.1.0.Final
See [this
gist|https://gist.github.com/mrietveld/6d8606dc3e905088f337] for the complete
stack trace.
The issue is this, basically:
{noformat}
Caused by: java.lang.ClassNotFoundException:
org.drools.container.spring.beans.persistence.DroolsSpringTransactionManager not found by
org.drools.persistence.jpa [98]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at
org.drools.persistence.SingleSessionCommandService.initTransactionManager(SingleSessionCommandService.java:282)
... 27 more
{noformat}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)