[
https://issues.jboss.org/browse/JBRULES-2734?page=com.atlassian.jira.plug...
]
Esteban Aliverti commented on JBRULES-2734:
-------------------------------------------
What are the steps to reproduce the error? It is enough to have the change-set pointing to
a rule flow? Or does it only fail when the rule flow is using rules?
I see 2 different errors in the stack trace:
1.- Binary Diff Mechanism doesn't support WorkFlowProcess instances (RuleFlowProcess
is an instance of it). The quickest solution could be to always mark rule flows as new
when the binary diff is performed.
2.- A NPE when the Binary Diff mechanism tries to compare the LHS of the mentioned rule.
The piece of code where the error occurs is this:
if (!r1.getLhs().equals(r2.getLhs())){
listener.debug("BinaryResourceDiffProducerImpl: The rules have different
LHS");
return false;
}
NPE loading changeset
---------------------
Key: JBRULES-2734
URL:
https://issues.jboss.org/browse/JBRULES-2734
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.1.1.FINAL
Reporter: Tommy Odom
Assignee: Esteban Aliverti
Fix For: 5.2.0.CR1
We are receiving a NPE when drools is attempting to load the deltas from guvnor in our
webapp. This used to work fine in 5.0 but we recently upgraded to 5.1 and started
receiving this error after we create a new snapshot in guvnor.
The output from our application server log is:
KnowledgeAgent applying ChangeSet
KnowledgeAgent performing an incremental build of the ChangeSet
no visitor implementation for : class org.drools.ruleflow.core.RuleFlowProcess :
org.drools.ruleflow.core.RuleFlowProcess@30012e
Exception in thread "Thread-36"
org.drools.RuntimeDroolsException: java.lang.reflect.InvocationTargetException : [R
ule name=Project Part Custom Finishing Cost, 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(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597) at
org.drools.core.util.ReflectiveVisitor.visit(ReflectiveVisitor.java:47)
... 6 more
Caused by: java.lang.NullPointerException at
org.drools.rule.EvalCondition.equals(EvalCondition.java:169)
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 that it mentions in the error is:
dialect "java"
ruleflow-group "finishing-price"
when
$pp : ProjectPart(finishTime > 0)
eval(salesChannelId != 4 && includeFinishing)
then
double finishingRate = 1;
double customFinishingCost = $pp.getQuantity() * $pp.getFinishTime() * finishingRate;
addToProjectFinishingCost($pp.getProject(), customFinishingCost);
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira