[JBoss JIRA] Created: (JBRULES-2734) NPE loading changeset
by Tommy Odom (JIRA)
NPE loading changeset
---------------------
Key: JBRULES-2734
URL: https://jira.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: Mark Proctor
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.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months
[JBoss JIRA] Created: (JBRULES-2589) running HonestPolitician from a Maven created eclipse project for drools-examples-drl => NoClassDefFoundError: XStream
by Jean-Marc Vanel (JIRA)
running HonestPolitician from a Maven created eclipse project for drools-examples-drl => NoClassDefFoundError: XStream
----------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2589
URL: https://jira.jboss.org/browse/JBRULES-2589
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: FUTURE
Environment: % uname -a
Linux jmv-desktop 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux
% java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
Reporter: Jean-Marc Vanel
Assignee: Mark Proctor
I made an eclipse project using Maven from drools-trunk/drools-examples/drools-examples-drl , and when running the class HonestPoliticianExample,
I have a NoClassDefFoundError: com/thoughtworks/xstream/XStream
The stack is :
Exception in thread "main" java.lang.NoClassDefFoundError: com/thoughtworks/xstream/XStream
at org.drools.audit.KnowledgeRuntimeLoggerProviderImpl.newFileLogger(KnowledgeRuntimeLoggerProviderImpl.java:10)
at org.drools.logger.KnowledgeRuntimeLoggerFactory.newFileLogger(KnowledgeRuntimeLoggerFactory.java:37)
at org.drools.examples.HonestPoliticianExample.main(HonestPoliticianExample.java:35)
The dependency com.thoughtworks.xstream is in drools-compiler/pom.xml , but only at the scope test !?!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months
[JBoss JIRA] Created: (JBRULES-2398) Rule not fired when using 'in (0)' condition and another rule with condition ' == null' exists
by Jaroslaw Wosik (JIRA)
Rule not fired when using 'in (0)' condition and another rule with condition ' == null' exists
----------------------------------------------------------------------------------------------
Key: JBRULES-2398
URL: https://jira.jboss.org/jira/browse/JBRULES-2398
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.0.1.FINAL
Environment: Windows Xp Pro, Java 1.5.07
Reporter: Jaroslaw Wosik
Assignee: Mark Proctor
When following package is used:
package BROKEN_TEST;
import pl.wosik.conversion.BrokenTest.Holder;
rule "_12"
salience 3
activation-group "BROKEN"
when
$a : Holder(value in (0))
then
System.out.println("setting 0");
$a.setOutcome("setting 0");
end
rule "_13"
salience 2
activation-group "BROKEN"
when
$a : Holder(value in (1))
then
System.out.println("setting 1");
$a.setOutcome("setting 1");
end
rule "_22"
salience 1
activation-group "BROKEN"
when
$a : Holder(value == null)
then
System.out.println("setting null");
$a.setOutcome("setting null");
end
Rule "_12" will not be fired even when Holder.value is 0 because some strange interference between it's and rule _22's condition (note that _22 won't be fired as expected).
When "Holder(value in (0))" is changed into "Holder(value == 0)" or "Holder(value in (0,9))" or the whole rule_22 is removed rule _12 will be fired.
This issue is important as such seemingly strange "in (0)" condition can be generated from a decision table (as was in my case).
I will attach a self-contained Test Case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months