Loic Albertin created DROOLS-372:
------------------------------------
Summary: InstantiationError during condition evaluation in Drools
6.0.0.Final
Key: DROOLS-372
URL:
https://issues.jboss.org/browse/DROOLS-372
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 6.0.0.Final
Environment: reproduced on both jdk 6 and jdk 7
Reporter: Loic Albertin
Assignee: Mark Proctor
Kindly find bellow the initial discussion from rules-user(a)list.jboss.org
In addition I attach a sample project that reproduce the error.
To run it simply type 'mvn clean install exec:java'.
An interesting thing is that on my environment the issue always appears at the 21st
insertion.
{quote}
Hi all,
I'm migrating from an old Drools 5.1 version to 6.0.0.Final. Sometimes (I don't
really get under which conditions as sometimes it works), I'm facing an
InstantiationError exception when I insert a fact into a stateful kie session. This
exception is thrown by a generated class named ConditionEvaluator<UUID> which
doesn't help for debugging!
The inserted object is a basic POJO (named JasmineEventEB) except for an attribute named
"value" which accept any "Serializable" object and which is causing
the issue.
The rule condition is quite simple
$e : JasmineEventEB(probe == "Button:pris" && value == "1")
In debugging I found that it failed when evaluating the value == "1" part. I can
also confirm that the value for the actually inserted JasmineEventEB is a string.
The stacktrace is:
{noformat}
java.lang.InstantiationError: java.io.Serializable
at ConditionEvaluatorae1a73837e8146bda23004a0450e2e52.evaluate(Unknown Source)
at
org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:212)
at
org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:169)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:387)
at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:138)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:377)
at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288)
at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360)
at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279)
at
org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1149)
at
org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1093)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:308)
{noformat}
I tested both with the java and mvel dialect with the same result.
Does someone has already encountered this kind of error?
If you need more details or clarifications please let me know.
Thanks & regards,
Loïc
{quote}
--
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