MVEL
  1. MVEL
  2. MVEL-263

Compiler bug while running Drools rule: "Expecting to find integer on stack"

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Drools 5.2.0 final with mvel2-2.1.0.drool2.jar
    • Number of attachments :
      0

      Description

      Excerpt from application log (DateUtils there is 'org.apache.commons.lang.time.DateUtils'):

            • COMPILER BUG! REPORT THIS IMMEDIATELY AT http://jira.codehaus.org/browse/mvel2
              Expression: DateUtils.addDays(new Date(), -2)
              2011-11-03 17:24:05 JobRunShell [ERROR] Job DEFAULT.XXXXXXXJob threw an unhandled Exception:
              java.lang.VerifyError: (class: ASMAccessorImpl_7529044951320333845290, method: getValue signature: (Ljava/lang/Object;Ljava/lang/Object;Lorg/mvel2/integration/VariableResolverFactory;)Ljava/lang/Object Expecting to find integer on stack
              at java.lang.Class.getDeclaredConstructors0(Native Method)
              at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
              at java.lang.Class.getConstructor0(Class.java:2699)
              at java.lang.Class.getConstructor(Class.java:1657)
              at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer._initializeAccessor(ASMAccessorOptimizer.java:719)
              at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:846)
              at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:240)
              at org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:90)
              at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:64)
              at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:110)
              at org.mvel2.MVELRuntime.execute(MVELRuntime.java:89)
              at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:125)
              at org.mvel2.MVEL.executeExpression(MVEL.java:928)
              at org.drools.base.mvel.MVELReturnValueExpression.evaluate(MVELReturnValueExpression.java:104)
              at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:248)
              at org.drools.rule.VariableConstraint.isAllowed(VariableConstraint.java:107)
              at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
              at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
              at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
              at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
              at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:193)
              at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:191)
              at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:332)
              at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:293)
              at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
              at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
              at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
              ...
              at org.quartz.core.JobRunShell.run(JobRunShell.java:206)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:548)
              org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.VerifyError: (class: ASMAccessorImpl_7529044951320333845290, method: getValue signature: (Ljava/lang/Object;Ljava/lang/Object;Lorg/mvel2/integration/VariableResolverFactory;)Ljava/lang/Object;) Expecting to find integer on stack]
              at org.quartz.core.JobRunShell.run(JobRunShell.java:217)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:548)
              Caused by: java.lang.VerifyError: (class: ASMAccessorImpl_7529044951320333845290, method: getValue signature: (Ljava/lang/Object;Ljava/lang/Object;Lorg/mvel2/integration/VariableResolverFactory;)Ljava/lang/Object Expecting to find integer on stack
              at java.lang.Class.getDeclaredConstructors0(Native Method)
              at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
              at java.lang.Class.getConstructor0(Class.java:2699)
              at java.lang.Class.getConstructor(Class.java:1657)
              at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer._initializeAccessor(ASMAccessorOptimizer.java:719)
              at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:846)
              at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:240)
              at org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:90)
              at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:64)
              at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:110)
              at org.mvel2.MVELRuntime.execute(MVELRuntime.java:89)
              at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:125)
              at org.mvel2.MVEL.executeExpression(MVEL.java:928)
              at org.drools.base.mvel.MVELReturnValueExpression.evaluate(MVELReturnValueExpression.java:104)
              at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:248)
              at org.drools.rule.VariableConstraint.isAllowed(VariableConstraint.java:107)
              at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
              at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
              at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
              at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
              at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:193)
              at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:191)
              at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:332)
              at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:293)
              at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
              at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
              at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
              ...

        Activity

        Hide
        Mike Brock added a comment -

        I am going to need a bit more information than this. The stack trace tells me the JVM verifier was upset by MVEL's bytecode but it does not tell me about what the input into MVEL was that led to that bad output. =)

        Show
        Mike Brock added a comment - I am going to need a bit more information than this. The stack trace tells me the JVM verifier was upset by MVEL's bytecode but it does not tell me about what the input into MVEL was that led to that bad output. =)

          People

          • Assignee:
            Mike Brock
            Reporter:
            Yuriy Ishchuk
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: