MVEL
  1. MVEL
  2. MVEL-271

Mvel 2.2.0.19 run the expression logical.ifFunc(text.right(HBYWLB,1)=='B',-1,1) sometime error

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      hpux 64 jdk1.6
    • Number of attachments :
      1

      Description

      hi

      the expression is : logical.ifFunc(text.right(HBYWLB,1)=='B',-1,1)
      the logical and text in the expression are coustomize bean.
      I test the expr if run fast it will error every time.
      but when I sleep(10) the code every execute ,it's will be fine.

      if I run the expr with multi thread it also error.

      and if the expression set with bellow:
      logical.ifFunc(text.right(HBYWLB,1)=='B',-AAA,AAA)

      it's run fine.

      needs help.

      error message is:
      -------------
      java.util.concurrent.ExecutionException: java.lang.VerifyError: (class: ASMAccessorImpl_24162531328537580890, method: getValue signature: (Ljava/lang/Object;Ljava/lang/Object;Lorg/mvel2/integration/VariableResolverFactory;)Ljava/lang/Object Expecting to find integer on stack
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
      at java.util.concurrent.FutureTask.get(FutureTask.java:83)
      at com.bocom.tgs.component.base.expr.api.ExpressionTest.testDDDDE(ExpressionTest.java:1444)
      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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
      at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
      at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: java.lang.VerifyError: (class: ASMAccessorImpl_24162531328537580890, 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:705)
      at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:832)
      at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:239)
      at org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:83)
      at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:57)
      at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:98)
      at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)
      at org.mvel2.MVEL.executeExpression(MVEL.java:1057)
      at org.mvel2.MVEL.executeExpression(MVEL.java:1104)
      at com.bocom.tgs.component.base.expr.api.DefaultExpressionEntry.unitExecute(DefaultExpressionEntry.java:147)
      at com.bocom.tgs.component.base.expr.api.DefaultExpressionEntry.execute(DefaultExpressionEntry.java:120)
      at com.bocom.tgs.component.base.expr.api.DefaultExpressionExecutor.execute(DefaultExpressionExecutor.java:30)
      at com.bocom.tgs.component.base.expr.api.ExpressionImpl.calculate(ExpressionImpl.java:29)
      at com.bocom.tgs.component.base.expr.api.Tttt.call(ExpressionTest.java:1479)
      at com.bocom.tgs.component.base.expr.api.Tttt.call(ExpressionTest.java:1)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      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:619)

      -----------------

        Activity

        Hide
        xiaohuading added a comment -

        The AAA is a parameter, set the AAA value is 1,this logical.ifFunc(text.right(HBYWLB,1)=='B',-AAA,AAA) expression is run greate.

        Show
        xiaohuading added a comment - The AAA is a parameter, set the AAA value is 1,this logical.ifFunc(text.right(HBYWLB,1)=='B',-AAA,AAA) expression is run greate.

          People

          • Assignee:
            Mike Brock
            Reporter:
            xiaohuading
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: