Edson,
even though removing the incompatible mvel.jar fixed one issue, some
remain. For instance, this file:
---
package test;
import java.lang.Integer;
dialect "mvel"
rule "Rule #1"
when
then
System.out.println("now computing 1+1...");
Integer two = new Integer(2);
System.out.println(two);
end
---
produces:
now computing 1+1...
org.mvel.CompileException: unable to resolve property: two
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:288)
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:109)
at
org.mvel.ast.ContextDeepPropertyNode.getReducedValueAccelerated(ContextDeepPropertyNode.java:26)
at org.mvel.ast.PropertyASTNode.initializePropertyNode(PropertyASTNode.java:116)
at
org.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:24)
at org.mvel.ExecutableAccessor.getValue(ExecutableAccessor.java:45)
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:521)
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:260)
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:109)
at
org.mvel.ast.LiteralDeepPropertyNode.getReducedValueAccelerated(LiteralDeepPropertyNode.java:26)
at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
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:47)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:43
- Godmar
On Feb 13, 2008 4:01 PM, Edson Tirelli <tirelli(a)post.com> wrote:
Godmar,
I copied and pasted your rule and run a simple test using the same
version of jars you mentioned bellow, but I can't reproduce the problem you
are having. If it is still a problem for you, can you zip a sample test
showing the problem and send us?
Thanks,
Edson
2008/2/13, Godmar Back <godmar(a)gmail.com>:
>
>
>
> Hi,
>
> I've recently upgraded to Drools 4.0.4 with mvel14-1.2.21.jar, and I'm
> having severe issues with its parser.
> For instance, this simple .drl file:
>
> --
> package test;
>
> rule "Rule #1"
> dialect "mvel"
> when
> then
> /* a single-line comment */
> System.out.println("hello world");
> end
> --
>
> results in:
> org.mvel.PropertyAccessException: unable to resolve property: ;
> at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:285)
> at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:107)
> at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:185)
> at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
> at
org.mvel.CompiledExpression.getValue(CompiledExpression.java:107)
> at org.mvel.MVEL.executeExpression(MVEL.java:223)
> at
org.drools.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:47)
> at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:550)
> at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:514)
> at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:471)
> at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
>
> --
> Switching to dialect "java," or removing the /* single-line comment
> */, helps. So does replacing the comment with a // style comment.
> There are many more weirdnesses I'm encountering (I've filed a number
> of bugs already), but I'm wondering if something else isn't amiss
> here. I also tried mvel16-1.2.22.jar, same effect. On the other hand,
> running just the RHS in mvelsh works just fine.
>
> In this context, I'd like to voice the wish that Drools include a
> command-line driver that can load and execute .drl files for testing.
>
> - Godmar
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users