[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1397) org.mvel.CompileException: variable already defined within scope
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Tue Jan 1 08:05:43 EST 2008
[ http://jira.jboss.com/jira/browse/JBRULES-1397?page=all ]
Edson Tirelli closed JBRULES-1397.
----------------------------------
Resolution: Done
Fixed.
> org.mvel.CompileException: variable already defined within scope
> ----------------------------------------------------------------
>
> Key: JBRULES-1397
> URL: http://jira.jboss.com/jira/browse/JBRULES-1397
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.3
> Reporter: Edson Tirelli
> Assigned To: Edson Tirelli
> Fix For: 4.0.4, 4.1.0
>
>
> Reported by Alexander Bagerman.
> The following rule and code snippet raises the problem:
> rule "rule"
> dialect "mvel"
> when
> $p : Person( $likes : likes )
> then
> Cheese c = new Cheese( $likes );
> System.out.println( $p + " -> " + c );
> insert( c );
> end
> // snippet
> Person bob = new Person( "Bob", "stilton" );
> Person mark = new Person( "Mark", "brie" );
> workingMemory.insert( bob );
> workingMemory.insert( mark );
> workingMemory.fireAllRules();
> The exception is:
> Caused by: org.mvel.CompileException: variable already defined within scope: class com.sample.Cheese c
> at org.drools.base.mvel.DroolsMVELFactory.createVariable(DroolsMVELFactory.java:218)
> at org.mvel.ast.TypedVarNode.getReducedValueAccelerated(TypedVarNode.java:43)
> at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
> at org.mvel.CompiledExpression.getValue(CompiledExpression.java:108)
> 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)
--
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
More information about the jboss-jira
mailing list