Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1202365

Summary: NoSuchMethodError at runtime on a constraint concatenating a String and a Long
Product: [Retired] JBoss BRMS Platform 6 Reporter: Mario Fusco <mfusco>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: etirelli, mbaluch, rrajasek
Target Milestone: CR1   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 18:34:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mario Fusco 2015-03-16 13:30:19 UTC
When you write a LHS like this,

Person( name == "Elizabeth" + new Long(2L) )

you will face NoSuchMethodError after 20 times evaluation.

testJittedConstraintStringAndLong(org.drools.compiler.integrationtests.Misc2Test)  Time elapsed: 1.216 sec  <<< ERROR!

java.lang.NoSuchMethodError: java.lang.StringBuilder.append(Ljava/lang/Long;)Ljava/lang/StringBuilder;

	at ConditionEvaluator80a8832efb1646d488df2cde72963f02.evaluate(Unknown Source)

	at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:230)

	at org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:187)

	at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:141)

	at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:60)

	at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:294)

	at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:255)

	at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:277)

	at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:237)

	at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1495)

	at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1450)

	at org.drools.compiler.integrationtests.Misc2Test.testJittedConstraintStringAndLong(Misc2Test.java:7253)

Comment 1 Mario Fusco 2015-03-16 13:32:20 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/85407ae04

Comment 2 Edson Tirelli 2015-03-16 15:33:47 UTC
Setting back to ASSIGNED to wait for the blocker+ flag.

Comment 3 Mario Fusco 2015-03-16 16:53:33 UTC
Cherry-picked to 6.2.x branch with https://github.com/droolsjbpm/drools/commit/89b67dfb4

Comment 4 Marek Winkler 2015-03-26 16:41:23 UTC
Verified in BRMS 6.1.0 CR1.