[
http://jira.jboss.com/jira/browse/JBRULES-1484?page=all ]
Mark Proctor updated JBRULES-1484:
----------------------------------
Fix Version/s: 4.0.5
(was: 4.0.6)
Mvel, constructor and package access
------------------------------------
Key: JBRULES-1484
URL:
http://jira.jboss.com/jira/browse/JBRULES-1484
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.5
Reporter: Delbart Vincent
Assigned To: Mark Proctor
Fix For: 5.0.0-M1, 4.0.5
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
This rule doesn't work :
#created on: 29 août 2007
package example
#list any import classes here.
import type.*;
rule "Mvel constructor"
dialect "mvel"
when
then
new TypeOne(new TypeTwo());
end
the error :
Caused by: java.lang.ClassNotFoundException: TypeTwo
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:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.mvel.util.ParseTools.createClass(ParseTools.java:358)
at org.mvel.util.ParseTools.findClass(ParseTools.java:655)
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileConstructor(ReflectiveAccessorOptimizer.java:750)
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeObjectCreation(ReflectiveAccessorOptimizer.java:682)
but this two rules work :
#created on: 29 août 2007
package example
#list any import classes here.
import type.TypeOne;
import type.TypeTwo;
rule "Mvel constructor"
dialect "mvel"
when
then
new TypeOne(new TypeTwo());
end
#created on: 29 août 2007
package example
#list any import classes here.
import type.*;
rule "Mvel constructor"
dialect "java"
when
then
new TypeOne(new TypeTwo());
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira