[rules-users] Exception on at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300) drools 5.0.1
Joana Lopes
joanpl at gmail.com
Fri May 18 07:14:19 EDT 2012
Hi There,
I'm new to drools and i'm having a problem with a rule which has an OR:
/* Rule 25_OFF
--------------------------------------------------------------------------------
*/
rule "25_OFF"
when
$p1:InferenceFactValue( param!=null, param.parameterName == "sonar_8_cm",
$v1:param.valueFloat >= 10 ) or
$p2:InferenceFactValue( param!=null, param.parameterName == "sonar_8_cm",
$v2:param.valueFloat >= 10 )
then
InferenceUtils.log( LogLevel.DEBUG, InferenceUtils.DROOLS_RULE, "Global
Clock: " + InferenceDateUtils.dateString( globalClock, false ), true, false
);
InferenceUtils.log( LogLevel.DEBUG, InferenceUtils.DROOLS_RULE,
"\t\tRegra 25_OFF " + "25", true, false );
InferenceFactValue[] params = {$p1, $p2};
RuleFire.addEndAlarm( inferenceAgent, droolsEngine, "AlarmPackage",
"25", "25", params, globalClock );
end
No errors in knowledge builder
What happens is:
org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183)
at
pt.holos.dva.agents.inference.process.DroolsInferenceEngine.fireAllRules(DroolsInferenceEngine.java:644)
at
pt.holos.dva.agents.inference.process.DroolsInferenceEngine.receiveDataFromBuffer(DroolsInferenceEngine.java:342)
at
pt.holos.dva.agents.inference.process.BufferedDataReceiver.sendDataToDrools(BufferedDataReceiver.java:454)
at
pt.holos.dva.agents.inference.process.BufferedDataReceiver.run(BufferedDataReceiver.java:68)
Caused by: java.lang.NullPointerException
at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300)
at
AlarmPackage.Rule_25_OFF_0ConsequenceInvoker.evaluate(Rule_25_OFF_0ConsequenceInvoker.java:15)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934)
... 9 more
I've tried to see the source code and the declaration
in org.drools.reteoo.LeftTuple.get(LeftTuple.java:300) is null. Can you
give me some pointers please?
Thank you,
Joana P Lopes
--
LinkedIn - http://pt.linkedin.com/in/joanpl
My Bla Bla Bla: http://joanpl.blogspot.com
.......................................................
The intuitive mind is a sacred gift and the rational mind is a faithful
servant. We have created a society that honors the servant and has
forgotten the gift. Albert Einstein.
"Doubt is not a pleasant condition, but certainty is absurd."
Voltaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120518/fe60bfcb/attachment.html
More information about the rules-users
mailing list