[rules-users] ClassNotFoundException for functions if cached Rulebase used

seemamani seemamani at gmail.com
Fri Sep 12 16:07:59 EDT 2008


I have something to add to my below post. I'm facing this problem only when
the dialect is "mvel". For "java" dialect, this works without any issues.
Can someone offer guidance or tips towards resolving this?

Thanks,
Seema

seemamani wrote:
> 
> hi,
> I'm using Drools 4.0.7. Using BRMS, I created a package which consists of
> a
> technical drl rule and a function. As the performance best practice
> suggestion goes, I'm caching the Rulebase instance that is obtained from
> the
> RuleAgent. However, I'm facing a problem when I'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?
> Thanks,
> Seema
> 
> Here is the stack trace (the package name is Test and the function name is
> TestMe)
> 
> 01:23:33,359 ERROR [[InsuranceServlet]] Servlet.service() for servlet
> InsuranceServlet threw exception
> java.lang.ClassNotFoundException: Test.TestMe
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
> 
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
> 
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>         at ASMAccessorImpl_91782341221162783340.getValue(Unknown Source)
>         at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:174)
>         at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
>         at
> org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
> 
>         at org.mvel.MVEL.executeExpression(MVEL.java:235)
>         at
> org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:48)
>         at
> org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:554)
>         at
> org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:518)
>         at
> org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:475)
> 
>         at
> org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:439)
> 
>         at
> org.acme.insurance.web.DroolsBusiness.execute(DroolsBusiness.java:122)
>         at
> org.acme.insurance.web.InsuranceServlet.doGet(InsuranceServlet.java:38)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 
>         at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> 
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> 
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 
>         at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
> 
>         at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
> 
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 
>         at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
> 
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 
>         at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
>         at java.lang.Thread.run(Unknown Source)
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: http://www.nabble.com/ClassNotFoundException-for-functions-if-cached-Rulebase-used-tp19448948p19463186.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list