[rules-users] Guvnor Cache Error with Seam
Robert Morse
rmorse at mdesignz.com
Thu Oct 22 11:16:07 EDT 2009
Not sure if this is a Seam or Drools issue, but....
Under Seam 2.2.0.GA, JBoss 5.1.0.GA, and Drools 5.0.1.GA and Guvnor,
changes to rules within Guvnor followed by a rule build within Guvnor
doesn't seem to be reflected back to Seam or the associated cache
directory.
Under Seam, I've defined one rule agent as:
<drools:rule-agent name="securityRules"
url="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/cdmsSecurity/LATEST
"
local-cache-dir="/usr/local/jboss/server/default/data/guvnor/cache/"
poll="30"/>
<drools:managed-working-memory
name="securityWorkingMemory" auto-create="true"
rule-base="#{securityRules}" />
Clearing the cache and starting up JBoss, everything works fine. If I
make a rule change in Guvnor, and rebuild the rules, I'll typically get:
08:34:24,343 ERROR [STDERR] RuleAgent(default) INFO (Thu Oct 22
08:34:24 MDT 2009): Applying changes to the rulebase.
08:34:24,343 ERROR [STDERR] RuleAgent(default) EXCEPTION (Thu Oct 22
08:34:24 MDT 2009): null. Stack trace should follow.
08:34:24,343 ERROR [STDERR] java.lang.NullPointerException
08:34:24,343 ERROR [STDERR] at
org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:235)
08:34:24,344 ERROR [STDERR] at
org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
08:34:24,344 ERROR [STDERR] at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:712)
08:34:24,344 ERROR [STDERR] at
org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:
640)
08:34:24,344 ERROR [STDERR] at
org.drools.agent.PackageProvider.removePackage(PackageProvider.java:44)
08:34:24,344 ERROR [STDERR] at
org.drools.agent.PackageProvider.applyChanges(PackageProvider.java:80)
08:34:24,344 ERROR [STDERR] at
org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:397)
08:34:24,344 ERROR [STDERR] at org.drools.agent.RuleAgent$2.run
(RuleAgent.java:516)
08:34:24,344 ERROR [STDERR] at java.util.TimerThread.mainLoop
(Timer.java:512)
08:34:24,344 ERROR [STDERR] at java.util.TimerThread.run(Timer.java:
462)
The application will hang indefinitely when calling fireAllRules().
Restarting the server fixes the problem. If I never rebuild the
rules, or restart the server after rebuilding the rules, this problem
never surfaces.
Changing the poll value doesn't appear to alter anything.
The human mind is an iterative processor, it never does anything right
the first time. What it does well is to make improvements on every
iteration (deMarco)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091022/d9a61d5e/attachment.html
More information about the rules-users
mailing list