Blocker-Issue when upgrading to drools 5.5

490 views
Skip to first unread message

Ajay Garg

unread,
Dec 2, 2014, 1:26:32 AM12/2/14
to drools...@googlegroups.com
Hi all.

We have been trying to upgrade to drools-5.5, and have been doing a run-debug-install-run-cycle upgrades of jars.
Unfortunately, this time we are stuck at a position, wherein there is absolutely no information as to what we need next.

On compiling the rules, we get the following stacktrace ::

java.lang.IncompatibleClassChangeError: Implementing class
  at java
.lang.ClassLoader.defineClass1(Native Method)
  at java
.lang.ClassLoader.defineClass(ClassLoader.java:643)
  at java
.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  at org
.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2836)
  at org
.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
  at org
.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1668)
  at org
.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
  at org
.drools.rule.builder.RuleBuildContext.<init>(RuleBuildContext.java:73)
  at org
.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:2825)
  at org
.drools.compiler.PackageBuilder.compileRules(PackageBuilder.java:970)
  at org
.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:879)
  at org
.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:871)
  at org
.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:447)
  at org
.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:711)
  at org
.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)



Note that we have already ,

1)
Upgraded to mvel2-2.2.0.Final.jar

2)
Removed "drools-api.jar" altogether, and instead deployed "knowledge-api.jar".

3)
Upgraded drools-core, drools-compiler, drools-jsr94, drools-decisiontables, drools-templates to 5.5.




We will be grateful if some of the experts might lead us to know as to what we should upgrade/replace next :)

Looking earnestly for a reply.



Thanks and Regards,
Ajay

Ajay Garg

unread,
Dec 3, 2014, 1:31:46 AM12/3/14
to drools...@googlegroups.com
Any ideas anyone, please ...  ?

Mark Proctor

unread,
Dec 3, 2014, 1:41:48 AM12/3/14
to drools...@googlegroups.com
Somehow it's picking up the wrong jar, that will be on a different version. It will be almost impossible for someone not onsite to debug this.

The stack trace exits at line 73 on this class, where it tried to load the Rule class. Indicating either api, core or compiler has a miss matched version.
https://github.com/droolsjbpm/drools/blob/5.5.0.Final/drools-compiler/src/main/java/org/drools/rule/builder/RuleBuildContext.java#L73

Can you first get this running outside of a web container?

Also you should be trying 5.6 not 5.5.

Mark

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/da636f16-f977-468e-ae41-c58b24c79d8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Davide Sottara

unread,
Dec 3, 2014, 1:43:47 AM12/3/14
to drools...@googlegroups.com
Also, drools 5.5 did not use mvel 2.2.2, which is almost certainly incompatible due
to the upgrade in some key internal components (ASM just to cite one)

Ajay Garg

unread,
Dec 3, 2014, 2:15:09 AM12/3/14
to drools...@googlegroups.com
Thanks Mark and Davide for the helpful replies.
I will retry with 5.6 binaries.


@Davide, @All,

I will be really grateful if you guys could let me know what mvel/mvel2 version to use with 5.6?
This would save a lot of head-banging for me :)


Thanks and Regards,
Ajay


--
You received this message because you are subscribed to a topic in the Google Groups "Drools Usage" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drools-usage/iTGHif6puJI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drools-usage...@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
Ajay

Mark Proctor

unread,
Dec 3, 2014, 2:17:57 AM12/3/14
to drools...@googlegroups.com

Ajay Garg

unread,
Dec 3, 2014, 3:37:35 AM12/3/14
to drools...@googlegroups.com
Thanks guys ... I could move forward by leaps and bounds...
Seems all jar-version-mismatches have gone (I hope so) :)


Now, it seems that there is some change required in defining the rules in the XLS file, as I am getting ::

############################################################################
Unable to resolve ObjectType 'Eval' : [Rule name='xx-yyy-zzzz']
############################################################################


Will be grateful to know the procedure to resolve this :)


Thanks and Regards,
Ajay


For more options, visit https://groups.google.com/d/optout.



--
Regards,
Ajay

Davide Sottara

unread,
Dec 3, 2014, 3:57:13 AM12/3/14
to drools...@googlegroups.com
Something may have changed in the way "free-form" expressions are handled.
You may have an "eval(...)" expression in your DT and the "eval" may no longer be necessary,
just use the expression.

@Michael, any idea/confirmation?



Michael Anstis

unread,
Dec 3, 2014, 4:09:28 AM12/3/14
to drools...@googlegroups.com
I suspect the spreadsheet application has "kindly" capitalized "eval" to "Eval".

Dumping the DRL generated from the decision table would probably furnish "Eval(..)" and Drools is then trying to resolve this to a type.

Ajay Garg

unread,
Dec 4, 2014, 8:47:50 AM12/4/14
to drools...@googlegroups.com
Hi all.

I removed all occurrences of "eval" and "Eval" keywords (along with their corresponding parenthesis of course), and now I get the error ::

############################################################################
[ERR 102] Line 45:45 mismatched input '>=' in rule "xxxx-yyyy-zzzz"
[0,0]: Parser returned a null Package
############################################################################



I'll now try retaining all occurrences of "eval" and "Eval", but converting all "eval" to "Eval".
Keeping my fingers crossed for tasting success !!!


Thanks and Regards,
Ajay


For more options, visit https://groups.google.com/d/optout.



--
Regards,
Ajay

Ajay Garg

unread,
Dec 5, 2014, 2:05:08 AM12/5/14
to drools...@googlegroups.com
Hi all.

I re-tried, this time replacing all occurrences of "eval" with "Eval".
I get

##########################################################################
Unable to resolve ObjectType 'Eval' : [Rule name='xxxxx-yyyyy-zzzzzzz']

Unable to resolve ObjectType 'Eval' : [Rule name='xxxxx-yyyyy-zzzzzzz']

Unable to resolve ObjectType 'Eval' : [Rule name=''xxxxx-yyyyy-zzzzzzz]

Unable to resolve ObjectType 'Eval' : [Rule name='xxxxx-yyyyy-zzzzzzz']

##########################################################################



I am at loss of ideas :(
Has anyone managed to get rules-compilation working with drools-5.6?



Thanks and Regards,
Ajay
--
Regards,
Ajay

Davide Sottara

unread,
Dec 5, 2014, 2:07:17 AM12/5/14
to drools...@googlegroups.com
There was probably a misunderstanding here.. "eval" should be lowercase.

Mark Proctor

unread,
Dec 5, 2014, 2:07:37 AM12/5/14
to drools...@googlegroups.com
You misread. eval is correct, Eval is not. But Also you may no longer need eval at all any more.

Mark

Ajay Garg

unread,
Dec 5, 2014, 2:13:27 AM12/5/14
to drools...@googlegroups.com
Thanks everyone.
Replacing all occurrences of "Eval" with "eval" caused the rules to be compiled successfully.

Thanks and Regards,
Ajay


For more options, visit https://groups.google.com/d/optout.



--
Regards,
Ajay
Reply all
Reply to author
Forward
0 new messages