[rules-users] issues with parser when using MVEL dialect
Edson Tirelli
tirelli at post.com
Wed Feb 13 16:01:04 EST 2008
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 at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080213/3582faf6/attachment.html
More information about the rules-users
mailing list