I have encountered the same problem.

 

Running Drools  5.1.1 and after redeploying the rules activation behave differently than before. It is as if some of the rules are removed\non active  in the rules engine.

I have checked if this is indeed the case by printing all rules in the active memory, they all seem to be in place.

 

Any ideas?

 

Hezi

 

 

 

From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Amit Friedman
Sent: Thursday, June 16, 2011 9:58 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] rules doesn't run after redeploying my application EAR in Jboss

 

Hello,

I am running JBoss 5.1.0 GA with drools 5.1.1 (added run-time libraries).

I have several DRL files which resides outside my EAR in a 'rules' directory.

When the EAR loads, I am loading the DRLs using:

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

for(...) {

     kbuilder.add(ResourceFactory.newFileResource(file), ResourceType.DRL); 

}

That works fine.

When I do redeploy of the EAR, this code passed successfully, but the rules won't run anymore.

When I switch to drools 5.0.1 run-time libraries, it returns to work. 

I need to work with 5.1.1 since I use some of the new features.

 

I found an old post that was answered by Mark Proctor suggesting to use a single drools-all.jar: http://markmail.org/message/6yzc7c6ejdn6iekc#query:drools%20classloader%20problem+page:1+mid:6yzc7c6ejdn6iekc+state:results

unfortunately, I could find such file in the 5.1.1 release.

 Other ideas that was tested and failed: 1. Tell Tomcat not to lock resources (configuration properties in context.xml) 2. Put all drools 5.1.1 jars and dependencies in the lib

Any suggestion how to solve this issue?

 

Thanks,

Amit