[rules-users] java.lang.LinkageError

Wolfgang Laun wolfgang.laun at gmail.com
Fri Aug 17 11:33:48 EDT 2012


On 17/08/2012, David Minor <daveminor at gmail.com> wrote:
> That was the root error, the rest is just drools firing its rules.
>
> So does this mean there's some sort of incompatibility in the class
> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50? I assume
> this is a class that's auto-generated by drools. Is it possible that
> serializing the rule Package is leading to an incompatible class
> definition?

It does contain compiled Java code. So if the DRL/Java compilation
environment compared to the deployment environment differs w.r.t. to
JDK version, you're in for trouble.
-W

>
> On Thu, Aug 16, 2012 at 10:41 PM, Wolfgang Laun <wolfgang.laun at gmail.com>
> wrote:
>> Javadoc: Subclasses of LinkageError indicate that a class has some
>> dependency on another class; however, the latter class has
>> incompatibly changed after the compilation of the former class.
>>
>> Looks like some incompatibility between your development and
>> deployment environment.
>>
>> Did you truncate any helpful message from the stack trace?
>>
>> -W
>>
>> On 17/08/2012, David Minor <daveminor at gmail.com> wrote:
>>> Hi,
>>>
>>> We're in the process of moving our web apps from Java 5 to Java 7 and
>>> Drools 3 to Drools 5.4.0. Our rule base is compiled and serialized to
>>> the db by one app, and read from the db and fired by another.
>>>
>>> Everything went fine during testing, but when we tried to switch to
>>> production we got this when firing the rule base:
>>>
>>> Caused by: java.lang.LinkageError:
>>> ShoppingCart/Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50
>>>         at
>>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0InvokerGenerated.evaluate(Unknown
>>> Source)
>>>         at
>>> ShoppingCart.Rule_CSMEGBUL_b996907c25e3495a94b6b041c1c08c50Eval0Invoker.evaluate(Unknown
>>> Source)
>>>         at
>>> org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
>>>         at
>>> org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
>>> [snip]
>>>
>>> Does anyone have any ideas as to what might cause this?
>>>
>>> Here is the rule in question if that helps:
>>>
>>> rule "CSMEGBUL"
>>>         salience -1
>>>         agenda-group "SubtotalDependent"
>>>         when
>>>                 delegate: PromotionRuleDelegate ( )
>>>                 cart: ShoppingCart ( )
>>>                 eval (
>>> delegate.checkDateRange("1181718000000","1497337200000") )
>>>                 eval ( delegate.checkEnabled("false") )
>>>                 eval ( delegate.cartHasPromoCode(cart, "CSMEGBUL") )
>>>                 eval ( delegate.checkUsage(1,100027) )
>>>         then
>>>                 delegate.applyOrderDiscountAmount(cart, 100027, "10.0");
>>>                 delegate.promoCodeApplied(cart, "CSMEGBUL");
>>> end
>>>
>>>
>>> --
>>> _____________
>>> David Minor
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> --
> _____________
> David Minor
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list