This is strange. Could you isolate this behavior in a unit test?

Best,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Thu, Aug 12, 2010 at 12:22 PM, Stephen Mcgruer <s0840449@sms.ed.ac.uk> wrote:
Just moved to Drools 5.1, using a Guvnor package as the base for a
Knowledge Base with incremental updating enabled. Our resource is a
Guvnor PKG. We encounter the following error when a snapshot is made:

[2010:08:224 16:08:903:debug] KnowledgeAgent: Diffing: [UrlResource
path='http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/TEST/v0.1']
[2010:08:224 16:08:935:debug] BinaryResourceDiffProducerImpl:
Comparing [Rule name=Resource Null-Checker, agendaGroup=MAIN,
salience=0, no-loop=false] against [Rule name=Resource Null-Checker,
agendaGroup=MAIN, salience=0, no-loop=false]
Exception in thread "Thread-30" org.drools.RuntimeDroolsException:
java.lang.reflect.InvocationTargetException : [Rule name=Resource
Null-Checker, agendaGroup=MAIN, salience=0, no-loop=false]
       at org.drools.core.util.ReflectiveVisitor.visit(ReflectiveVisitor.java:56)
       at
org.drools.agent.impl.BinaryResourceDiffProducerImpl.diff(BinaryResourceDiffProducerImpl.java:63)
       at
org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:785)
       at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:586)
       at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
       at
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1106)
       at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.drools.core.util.ReflectiveVisitor.visit(ReflectiveVisitor.java:47)
       ... 6 more
Caused by: java.lang.RuntimeException: this MVELReturnValueExpression
must be compiled for equality
       at
org.drools.base.mvel.MVELReturnValueExpression.equals(MVELReturnValueExpression.java:123)
       at
org.drools.rule.ReturnValueRestriction.equals(ReturnValueRestriction.java:306)
       at
org.drools.rule.ReturnValueConstraint.equals(ReturnValueConstraint.java:121)
       at java.util.Arrays.equals(Unknown Source)
       at org.drools.rule.OrConstraint.equals(OrConstraint.java:132)
       at java.util.AbstractList.equals(Unknown Source)
       at org.drools.rule.Pattern.equals(Pattern.java:317)
       at org.drools.rule.GroupElement.equals(GroupElement.java:273)
       at
org.drools.agent.impl.BinaryResourceDiffProducerImpl.compareRules(BinaryResourceDiffProducerImpl.java:258)
       at
org.drools.agent.impl.BinaryResourceDiffProducerImpl.visitRule(BinaryResourceDiffProducerImpl.java:117)
       ... 11 more

The rule in question is quite straight-forward, works on the initial
load up and worked in 5.0.1 fine. It is not the rule that was just
changed. If I remove that rule, another is just substituted in its
place in the error message.

What might be causing this? If you need more information, please ask.

Stephen

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users