[jboss-jira] [JBoss JIRA] Created: (JBRULES-2358) ClassNotFoundException when using "mvel" as a dialect
stephane Brossier (JIRA)
jira-events at lists.jboss.org
Mon Nov 30 16:14:29 EST 2009
ClassNotFoundException when using "mvel" as a dialect
-----------------------------------------------------
Key: JBRULES-2358
URL: https://jira.jboss.org/jira/browse/JBRULES-2358
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.0.1.FINAL
Environment: OS: Macos X and Linux
JVM 1.6.0_15 from sun
Reporter: stephane Brossier
Assignee: Mark Proctor
I get a ClassNotFoundexception when using a very simple rule and test. The test dowloads a binary package from guvnor, containing one trivial rule. Then it creates a StatefulKnowledgeSession and insert 500 facts. The drl file uploaded on guvnor is:
--------------------------
package mytest.debug.rules
declare PerUserCount
num : long
profile : String
end
rule "Event"
dialect "java"
when
e: PerUserCount()
then
System.out.println("Possible spammer [p=" + e.getProfile() + "] : count = " + e.getNum());
end
----------------------------
When calling fireAll, i get an exception. Note that:
1) The exception does not show up right away-- it only comes after some of those facts got processed
2) If i change the dialect from default 'mvel" to "java" it works fine:
Exception in thread "main" java.lang.NoClassDefFoundError: mytest/debug/rules/PerUserCount
at ASMAccessorImpl_7377369041259611028980.getValue(Unknown Source)
at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:66)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:99)
at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:102)
at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:102)
at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:102)
at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:41)
at ASMAccessorImpl_7157329411259611028970.getValue(Unknown Source)
at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:66)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:99)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:107)
at org.mvel2.MVEL.executeExpression(MVEL.java:978)
at org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:87)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183)
at com.drools.debug.Test.runIteration(Test.java:132)
at com.drools.debug.Test.startTest(Test.java:73)
at com.drools.debug.Test.main(Test.java:196)
Caused by: java.lang.ClassNotFoundException: mytest.debug.rules.PerUserCount
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402)
... 23 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list