Bug 1040007 - InstantiationError during condition evaluation
Summary: InstantiationError during condition evaluation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER6
: 6.0.0
Assignee: Mario Fusco
QA Contact: Tomas Schlosser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-10 13:46 UTC by Mario Fusco
Modified: 2014-08-06 20:16 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:16:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-372 0 Major Resolved InstantiationError during condition evaluation in Drools 6.0.0.Final 2014-03-13 10:52:38 UTC

Description Mario Fusco 2013-12-10 13:46:07 UTC
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:

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)

Comment 3 Tomas Schlosser 2014-01-03 10:36:06 UTC
Verified in BRMS 6.0.1-redhat-2


Note You need to log in before you can comment on or make changes to this bug.