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
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
I found a Jira issue regarding this, where this issue is addressed and
apparently fixed in an earlier version:
This fix has been rolled back, however, so this issue is present in version
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
View this message in context:
Sent from the drools - user mailing list archive at Nabble.com