[
https://issues.jboss.org/browse/DROOLS-376?page=com.atlassian.jira.plugin...
]
RH Bugzilla Integration commented on DROOLS-376:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> changed the Status of [bug
1040889|https://bugzilla.redhat.com/show_bug.cgi?id=1040889] from NEW to ASSIGNED
NullPointerException on
JPAKnowledgeService.loadStatefulKnowledgeSession() when Collection is modified
------------------------------------------------------------------------------------------------------
Key: DROOLS-376
URL:
https://issues.jboss.org/browse/DROOLS-376
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 6.0.0.Final
Reporter: Toshiya Kobayashi
Assignee: Mark Proctor
- Using JPAKnowledgeService
- Add two or more elements to Collection property which is referred by 'from' in
a rule.
{noformat}
package org.drools.test
import org.drools.compiler.Person
import org.drools.compiler.Address
rule rule1
when
$p: Person($list : addresses)
$a: Address(street == "y") from $list
then
$list.add( new Address("z") );
$list.add( new Address("w") );
end
{noformat}
- Call JPAKnowledgeService.loadStatefulKnowledgeSession()
Then NullPointerException is thrown
{noformat}
2013-12-12 18:03:31,329 [main] |org.drools.persistence.SingleSessionCommandService| WARN
Could not commit session
java.lang.RuntimeException: Unable to load session snapshot
at
org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:88)
~[classes/:na]
at
org.drools.persistence.SingleSessionCommandService.initExistingKnowledgeSession(SingleSessionCommandService.java:264)
~[classes/:na]
at
org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:196)
~[classes/:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.7.0_13]
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[na:1.7.0_13]
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[na:1.7.0_13]
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [na:1.7.0_13]
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:101)
[classes/:na]
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadKieSession(KnowledgeStoreServiceImpl.java:84)
[classes/:na]
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadKieSession(KnowledgeStoreServiceImpl.java:1)
[classes/:na]
at
org.kie.internal.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(JPAKnowledgeService.java:130)
[kie-internal-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
at
org.drools.persistence.session.JpaPersistentStatefulSessionTest.testFromNodeWithModifiedCollection(JpaPersistentStatefulSessionTest.java:562)
[test-classes/:na]
...
Caused by: java.lang.NullPointerException: null
at org.drools.core.reteoo.FromNode.createRightTuple(FromNode.java:152) ~[classes/:na]
at org.drools.core.phreak.PhreakFromNode.doLeftInserts(PhreakFromNode.java:96)
~[classes/:na]
at org.drools.core.phreak.PhreakFromNode.doNode(PhreakFromNode.java:49) ~[classes/:na]
at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:348)
~[classes/:na]
at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
~[classes/:na]
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
~[classes/:na]
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:200)
~[classes/:na]
at
org.drools.core.marshalling.impl.ProtobufInputMarshaller$PBActivationsFilter.fireRNEAs(ProtobufInputMarshaller.java:813)
~[classes/:na]
at
org.drools.core.reteoo.LeftInputAdapterNode.doInsertObject(LeftInputAdapterNode.java:258)
~[classes/:na]
at
org.drools.core.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:199)
~[classes/:na]
at
org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:60)
~[classes/:na]
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
~[classes/:na]
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
~[classes/:na]
at
org.drools.core.marshalling.impl.ProtobufInputMarshaller.assertHandleIntoOTN(ProtobufInputMarshaller.java:499)
~[classes/:na]
at
org.drools.core.marshalling.impl.ProtobufInputMarshaller.readFactHandles(ProtobufInputMarshaller.java:476)
~[classes/:na]
at
org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:250)
~[classes/:na]
at
org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:157)
~[classes/:na]
at
org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:116)
~[classes/:na]
at
org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:1)
~[classes/:na]
at
org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:83)
~[classes/:na]
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira