<div dir="ltr">hi,
<br>I&#39;m using Drools <a href="http://4.0.7.">4.0.7.</a> Using BRMS, I created a package which
consists of a technical drl rule and a function. As the performance
best practice suggestion goes, I&#39;m caching the Rulebase instance that
is obtained from the RuleAgent. However, I&#39;m facing a problem when I&#39;m
doing this. The rules execute just fine if I call fireAllRules() just
once. However, I get a ClassNotFoundException for the functions in my
package when I fire the rules for the second time using the cached
Rulebase. However, this problem does not occur if I create the Rulebase
every time without caching. Could this be a possible bug?
<br>Thanks,
<br>Seema
<br><br>Here is the stack trace
(the package name is Test and the function name is TestMe)<br><br>01:23:33,359 ERROR [[InsuranceServlet]] Servlet.service() for servlet InsuranceServlet threw exception
<br>java.lang.ClassNotFoundException: Test.TestMe
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.ClassLoader.loadClassInternal(Unknown Source)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at ASMAccessorImpl_91782341221162783340.getValue(Unknown Source)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:174)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.mvel.MVEL.executeExpression(MVEL.java:235)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:48)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:518)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:475)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:439)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.acme.insurance.web.DroolsBusiness.execute(DroolsBusiness.java:122)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.acme.insurance.web.InsuranceServlet.doGet(InsuranceServlet.java:38)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
<br>&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.Thread.run(Unknown Source)
</div>