[rules-users] NPE after rule consequence executes

Scott Reed sreed at avacoda.com
Wed Apr 9 18:10:37 EDT 2008


I noticed one error in the build:
-------------------------------------------------------------------------------
Test set: org.drools.integrationtests.DynamicRulesTest
-------------------------------------------------------------------------------
Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.5 sec 
<<< FAILURE!
testDynamicFunction(org.drools.integrationtests.DynamicRulesTest)  Time 
elapsed: 0.062 sec  <<< ERROR!
java.lang.NoClassDefFoundError: org/drools/test/AddFive
    at 
org.drools.test.Rule_global_rule_test_0.consequence(Rule_global_rule_test_0.java:9)
    at 
org.drools.test.Rule_global_rule_test_0ConsequenceInvoker.evaluate(Rule_global_rule_test_0ConsequenceInvoker.java:20)
    at 
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
    at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
    at 
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:477)
    at 
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:439)
    at 
org.drools.integrationtests.DynamicRulesTest.testDynamicFunction(DynamicRulesTest.java:311)

Scott Reed's message received 4/9/2008 5:25 PM:
> I built it but can only find the core jar file, nothing for the 
> compiler. With just the core jar replaced, I still get the NPE.
>
> Edson Tirelli's message received 4/9/2008 2:24 PM:
>>
>>    Nope, only source code.
>>    Problem is 4.0.x will be released as 4.0.7, and if your specific 
>> problem is fixed and you are not able to test before the release, it 
>> will have to wait 4.0.8. <http://4.0.8.>
>>
>>    All you need to build drools is java, maven and ant. Can you set 
>> this up?
>>
>>    []s
>>    Edson
>>
>>
>> 2008/4/9 Scott Reed <sreed at avacoda.com <mailto:sreed at avacoda.com>>:
>>
>>     Glad to hear that. However, I am not set up to do my own drools
>>     build and it looks like the link you sent is for the source. Is
>>     there a set of jars for 4.0.x that I can test from? Here is what
>>     I am using now:
>>
>>         antlr-runtime-3.0.jar
>>         core-3.2.3.v_686_R32x.jar
>>         drools-compiler-4.0.4.jar
>>         drools-core-4.0.4.jar
>>         mvel14-1.2.21.jar
>>         xstream-1.2.2.jar
>>
>>     Thanks,
>>       Scott
>>
>>     Edson Tirelli's message received 4/9/2008 11:46 AM:
>>>
>>>        Scott,
>>>
>>>        I believe this is fixed already. Can you try it out and let
>>>     us know?
>>>
>>>     http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/
>>>
>>>        []s
>>>        Edson
>>>
>>>
>>>     2008/4/8 Scott Reed <sreed at avacoda.com <mailto:sreed at avacoda.com>>:
>>>
>>>         Sorry, the NPE is in ReteTuple.get(Declaration)
>>>
>>>         Scott Reed's message received 4/8/2008 7:38 PM:
>>>
>>>             Running Drools 4.0.3, on Win 2k sp4, JDK 1.6.0_03.
>>>
>>>             I am getting this exception after the debugger shows
>>>             execution has gone past the end of the rule. The
>>>             exception is occurring in ReteTuple.get(Descriptor). I
>>>             believe the descriptor argument is null. Can anyone
>>>             suggest why this might be happening and what I can do to
>>>             avoid it?
>>>             Thanks,
>>>              Scott
>>>
>>>             java.lang.NullPointerException
>>>               at org.drools.reteoo.ReteTuple.get(ReteTuple.java:97)
>>>               at
>>>             org.fp.findata.Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.evaluate(Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.java:19)
>>>
>>>               at
>>>             org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
>>>               at
>>>             org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
>>>               at
>>>             org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
>>>
>>>               at
>>>             org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
>>>
>>>               at
>>>             org.fp.rules.RuleEngineManager$RunTask.run(RuleEngineManager.java:225)
>>>             org.drools.spi.ConsequenceException:
>>>             java.lang.NullPointerException
>>>               at
>>>             org.drools.base.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:14)
>>>
>>>               at
>>>             org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
>>>               at
>>>             org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
>>>               at
>>>             org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
>>>
>>>               at
>>>             org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
>>>
>>>               at
>>>             org.fp.rules.RuleEngineManager$RunTask.run(RuleEngineManager.java:225)
>>>             Caused by: java.lang.NullPointerException
>>>               at org.drools.reteoo.ReteTuple.get(ReteTuple.java:97)
>>>               at
>>>             org.fp.findata.Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.evaluate(Rule_2MS__Calculate_now_scheduled_or_periodic_transaction_0ConsequenceInvoker.java:19)
>>>
>>>               at
>>>             org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
>>>               ... 4 more
>>>             _______________________________________________
>>>             rules-users mailing list
>>>             rules-users at lists.jboss.org
>>>             <mailto:rules-users at lists.jboss.org>
>>>             https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>         _______________________________________________
>>>         rules-users mailing list
>>>         rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>>>         https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>>
>>>
>>>     -- 
>>>     Edson Tirelli
>>>     JBoss Drools Core Development
>>>     Office: +55 11 3529-6000
>>>     Mobile: +55 11 9287-5646
>>>     JBoss, a division of Red Hat @ www.jboss.com <http://www.jboss.com>
>>>     ------------------------------------------------------------------------
>>>     _______________________________________________ rules-users
>>>     mailing list rules-users at lists.jboss.org
>>>     <mailto:rules-users at lists.jboss.org>
>>>     https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>     _______________________________________________
>>     rules-users mailing list
>>     rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>>     https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>>
>> -- 
>> Edson Tirelli
>> JBoss Drools Core Development
>> Office: +55 11 3529-6000
>> Mobile: +55 11 9287-5646
>> JBoss, a division of Red Hat @ www.jboss.com <http://www.jboss.com>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080409/234a3801/attachment.html 


More information about the rules-users mailing list