[rules-users] mvel bug ??
pentarious
cristiano.giuffrida at gmail.com
Fri Aug 31 12:25:25 EDT 2007
Hi,
I believe the following syntax is not supported in Drools:
list:Variable() from SOME_JAVA_CODE
You should use something like: "from $list" or "from collect" or "from
accumulate", and embed any Java code in an eval statement. Edson, am I
missing something?
Regards,
CG
hypnosat7 wrote:
>
> Hi,
>
> I have a variable declaration as bellow :
>
>>list:Variable() from ruleApp.getVariable("variableName")
>
> and this is the result :
> Exception in thread "AWT-EventQueue-0" org.mvel.CompileException: cannot
> invoke method
> at
> org.mvel.optimizers.impl.refl.MethodAccessor.getValue(MethodAccessor.java:54)
> at
> org.mvel.optimizers.impl.refl.VariableAccessor.getValue(VariableAccessor.java:39)
> at
> org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:26)
> at
> org.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:19)
> at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
> at org.mvel.CompiledExpression.getValue(CompiledExpression.java:99)
> at org.mvel.MVEL.executeExpression(MVEL.java:236)
> at
> org.drools.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:45)
> at org.drools.reteoo.FromNode.assertTuple(FromNode.java:61)
> at
> org.drools.reteoo.CompositeTupleSinkAdapter.createAndPropagateAssertTuple(CompositeTupleSinkAdapter.java:73)
> at
> org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:131)
> at
> org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:160)
> at org.drools.reteoo.Rete.assertObject(Rete.java:176)
> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
> at
> org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:164)
> at
> org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1260)
> at
> org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
> at
> org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:826)
> at
> org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:627)
> at
> mcmipih.rules.rules.integration.drools.ExecutionContext.executeRuleFlow(ExecutionContext.java:54)
> at
> mcmipih.rules.demo.service.DemoRuleService.validerRumList(DemoRuleService.java:50)
> at
> mcmipih.rules.demo.service.DemoRuleService$$FastClassByCGLIB$$beeddc5a.invoke(<generated>)
> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
> at
> org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:693)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
> at
> org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
> at
> mcmipih.rules.demo.service.DemoRuleService$$EnhancerByCGLIB$$961244c9.validerRumList(<generated>)
> at
> mcmipih.rules.demo.controller.ValidationAppController$ActionValiderSelectionLst.actionPerformed(ValidationAppController.java:185)
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
> Source)
> at java.awt.Component.processMouseEvent(Unknown Source)
> at javax.swing.JComponent.processMouseEvent(Unknown Source)
> at java.awt.Component.processEvent(Unknown Source)
> at java.awt.Container.processEvent(Unknown Source)
> at java.awt.Component.dispatchEventImpl(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Window.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.mvel.optimizers.impl.refl.MethodAccessor.getValue(MethodAccessor.java:46)
> ... 54 more
>
--
View this message in context: http://www.nabble.com/mvel-bug----tf4360199.html#a12429712
Sent from the drools - user mailing list archive at Nabble.com.
More information about the rules-users
mailing list