Hi,
We're having a problem with runtime rule administration; i.e. using
RuleBase.addRule and RuleBase.removeRule.
We're using Drools 4.0.7 on Sun JDK 1.4.2_11 and inside Weblogic 8.1 sp 6.
Typically we remove a few rules followed by adding a few rules. In some
cases, we receive a NoClassDefFoundError. Stacktrace is provided in attached
file.
http://www.nabble.com/file/p23657476/stacktrace.txt stacktrace.txt
The class referenced (i.e. the one not found) is the removed rule.
Has anyone else seen this behaviour?
This seems like such a basic error that we're wondering if we're doing
something wrong here. We have been unable to find anything about this
To make matters worse, this actually leads to a deadlock. This is because
lock / unlock in version 4.0.7 is not encapsuled in a try / finally block in
AbstractRuleBase.removeRule(), so whenever an error occurs, the lock is not
released.
I found a Jira issue regarding this, where this issue is addressed and
apparently fixed in an earlier version:
https://jira.jboss.org:8443/jira/browse/JBRULES-603
This fix has been rolled back, however, so this issue is present in version
4.0.7.
We found a workaround for the deadlock by performing lock / unlock
ourselves, since drools will not lock if it has been performed already.
In addition, we encapsulate rulebase access with a read/write lock to ensure
that whenever the rulebase is updated, no other operation towards it is
performed.
Regards,
Steinar Haugen
--
View this message in context:
http://www.nabble.com/RuleBase.removeRule-leads-to-NoClassDefFoundError-t...
Sent from the drools - user mailing list archive at
Nabble.com.