[rules-users] NullPointerException while loading pkg by KnowledgeAgent

FlyingEagle elisabeth.wirth at wincor-nixdorf.com
Thu May 3 10:53:34 EDT 2012


Hello,

I have this exception in my Drools application and I don't know what's
happening.
I try to load a pkg by applying a defined change set by the KnowledgeAgent.
If I load the pkg by the KnowledgeBuilder, everything is fine, but I want to
use the KnowledgeAgent, so that changes are automatically recognized.

Can anybody help me?

Thx

http://drools.46999.n3.nabble.com/file/n3959482/CardTrapping.drl
CardTrapping.drl 
http://drools.46999.n3.nabble.com/file/n3959482/EngineStarter.java
EngineStarter.java 

java.lang.NullPointerException at
org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.getInterval(AfterEvaluatorDefinition.java:272)
        at
org.drools.rule.VariableRestriction.getInterval(VariableRestriction.java:132)
        at
org.drools.rule.VariableConstraint.getInterval(VariableConstraint.java:133)
        at
org.drools.reteoo.builder.BuildUtils.gatherTemporalRelationships(BuildUtils.java:334)
        at
org.drools.reteoo.builder.BuildUtils.calculateTemporalDistance(BuildUtils.java:298)
        at
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:108)
        at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
        at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:441)
        at
org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:821)
        at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:555)
        at
org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:458)
        at
org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150)
        at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1016)
        at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:785)
        at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:657)
        at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:190)
        at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:169)
        at
com.wn.fraud.droolstest.starter.EngineStarter.initializeKnowledgeBase(EngineStarter.java:67)
        at
com.wn.fraud.droolstest.starter.EngineStarter.<init>(EngineStarter.java:46)
        at
com.wn.fraud.droolstest.starter.EngineStarter.getInstance(EngineStarter.java:33)
        at
com.wn.fraud.droolstest.BaseFraudTest_UsingEngineStarter.createKnowledgeBase(BaseFraudTest_UsingEngineStarter.java:8)
        at
com.wn.fraud.droolstest.BaseFraudTest.initialize(BaseFraudTest.java:47)
        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
        at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) 

--
View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-while-loading-pkg-by-KnowledgeAgent-tp3959482.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list