[jboss-jira] [JBoss JIRA] (DROOLS-9) Exception in User-defined Java method when rules are optimized by the JIT compiler

Andreas Bentele (JIRA) jira-events at lists.jboss.org
Mon Jan 7 10:43:08 EST 2013


     [ https://issues.jboss.org/browse/DROOLS-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Bentele updated DROOLS-9:
---------------------------------

    Steps to Reproduce: 
- compile the attached project: open with Eclipse, or compile with maven
- start the java class /DroolsJITTestCase/src/main/java/com/sample/DroolsTest.java as an Application
- you will see this output:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Service.getAllTimers
Exception in thread "Thread-0" [Error: service.getTimePerStroke($service.getLongValue(service.workplaceIdForMachineId($machineId, $actionTimestamp), "RC.WORKPLACE_LEADING_OPERATION_ID")): null]
[Near : {... $service.getLongValue(service. ....}]
             ^
[Line: 1, Column: 1]
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:416)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:143)
	at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159)
	at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
	at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:108)
	at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
	at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
	at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
	at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:113)
	at org.mvel2.MVEL.executeExpression(MVEL.java:930)
	at org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:70)
	at org.drools.rule.constraint.MvelConditionEvaluator.ensureBranchEvaluation(MvelConditionEvaluator.java:117)
	at org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:102)
	at org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:90)
	at org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:82)
	at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:270)
	at org.drools.rule.constraint.MvelConstraint.access$200(MvelConstraint.java:51)
	at org.drools.rule.constraint.MvelConstraint$ConditionJitter.run(MvelConstraint.java:250)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:1104)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:987)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:377)
	... 20 more
Caused by: java.lang.RuntimeException
	at com.sample.Service.getTimePerStroke(Service.java:42)
	... 27 more


    
> Exception in User-defined Java method when rules are optimized by the JIT compiler 
> -----------------------------------------------------------------------------------
>
>                 Key: DROOLS-9
>                 URL: https://issues.jboss.org/browse/DROOLS-9
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Andreas Bentele
>            Assignee: Mark Proctor
>         Attachments: DroolsJITTestCase.zip
>
>
> I watched this issue after upgrading from Drools 5.3.1 to Drools 5.5.0.Final.
> I didn't find any trivial example, so I reproduced the error with a non-trivial test case, and attached the test case to this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list