Hi,
I am using Drools Kbase stateful sessions and using "changeset.xml" file to
dynamically load resources (DRL files) from a folder.
The KnowledgeAgent configuration property 'drools.agent.newInstance' is set
to false.
And the 'drools.resource.scanner.interval' property is set to 1.
As I am using Spring, these properties are passed-in to the agent from
spring-beans.xml.
Now, when I start tomcat, everything works fine (some rules also get fired),
But when I remove a DRL rule from my resource folder following exception is
thrown:
Exception in thread "Thread-8" java.lang.NullPointerException
at
org.drools.reteoo.RuleTerminalNode$RTNCleanupAdapter.cleanUp(RuleTerminalNode.java:507)
at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:253)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at
org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:411)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at
org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
at
org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:432)
at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:831)
at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:809)
at
org.drools.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:206)
at
org.drools.agent.impl.KnowledgeAgentImpl.removeKnowledgeDefinitionFromBase(KnowledgeAgentImpl.java:842)
at
org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:763)
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:662)
Is there anything more that needs to be set for 'changeset' to work for
add/update/remove of resources?
FYI - I am using Drools 5.1.1
Thanks,
Prashant
--
View this message in context:
http://drools.46999.n3.nabble.com/Removing-rule-DRL-from-resource-throwin...
Sent from the Drools: User forum mailing list archive at
Nabble.com.