Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1496

NullPointerException after jitting on org.drools.modelcompiler.CompilerTest

    XMLWordPrintable

Details

    • Bug
    • Status: Verified (View Workflow)
    • Minor
    • Resolution: Done
    • 7.10.0.GA
    • 7.10.0.GA
    • BRE
    • None
    • Failure detected on RHDM-master-nightly job (openjdk8, RHEL8). Reproduced locally with JDK 11.

    • CR1
    • Hide

      Please run:

      mvn clean install -Dtest=org.drools.modelcompiler.CompilerTest -Ddrools.jittingThreshold=0
      

      in org.drools.modelcompiler module

      Show
      Please run: mvn clean install -Dtest=org.drools.modelcompiler.CompilerTest -Ddrools.jittingThreshold=0 in org.drools.modelcompiler module
    • 2020 Week 46-48 (from Nov 9)
    • -

    Description

      The recently added implementation of KOGITO-2836 introduced a new test (testNPEOnConstraint) which is failing when the constraint is jitted.

      05:42:49 [INFO] Running org.drools.modelcompiler.CompilerTest
      {color:#de350b}05:43:29 [ERROR] Tests run: 270, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 40.191 s <<< FAILURE! - in org.drools.modelcompiler.CompilerTest{color}
      {color:#de350b}05:43:29 [ERROR] testNPEOnConstraint[STANDARD_FROM_DRL](org.drools.modelcompiler.CompilerTest) Time elapsed: 0.039 s <<< FAILURE!{color}
      05:43:29 java.lang.AssertionError: 
      05:43:29 
      05:43:29 Expected: (an instance of java.lang.RuntimeException and exception with message "Error evaluating constraint 'money < salary * 20' in [Rule \"R\" in r0.drl]")
      05:43:29 but: exception with message "Error evaluating constraint 'money < salary * 20' in [Rule \"R\" in r0.drl]" message was null
      05:43:29 Stacktrace was: java.lang.NullPointerException
      05:43:29 at org.mvel2.ast.IntMult.getReducedValueAccelerated(IntMult.java:17)
      05:43:29 at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:140)
      05:43:29 at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
      05:43:29 at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
      05:43:29 at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
      05:43:29 at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:113)
      05:43:29 at org.mvel2.MVEL.executeExpression(MVEL.java:945)
      05:43:29 at org.kie.soup.project.datamodel.commons.util.RawMVELEvaluator.executeExpression(RawMVELEvaluator.java:103)
      05:43:29 at org.drools.mvel.MVELConditionEvaluator.evaluate(MVELConditionEvaluator.java:112)
      05:43:29 at org.drools.mvel.MVELConditionEvaluator.evaluate(MVELConditionEvaluator.java:88)
      05:43:29 at org.drools.mvel.MVELConstraint.forceJitEvaluator(MVELConstraint.java:298)
      05:43:29 at org.drools.mvel.MVELConstraint.evaluate(MVELConstraint.java:263)
      05:43:29 at org.drools.mvel.MVELConstraint.isAllowed(MVELConstraint.java:226)
      05:43:29 at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:133)
      05:43:29 at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:70)
      05:43:29 at org.drools.core.reteoo.ObjectTypeNode.propagateAssert(ObjectTypeNode.java:297)
      05:43:29 at org.drools.core.phreak.PropagationEntry$Insert.propagate(PropagationEntry.java:161)
      05:43:29 at org.drools.core.phreak.PropagationEntry$Insert.execute(PropagationEntry.java:166)
      05:43:29 at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:96)
      05:43:29 at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:91)
      05:43:29 at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1095)
      05:43:29 at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1058)
      05:43:29 at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1050)
      05:43:29 at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1343)
      05:43:29 at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1334)
      05:43:29 at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1318)
      05:43:29 at org.drools.modelcompiler.CompilerTest.testNPEOnConstraint(CompilerTest.java:2419)
      05:43:29 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      05:43:29 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      05:43:29 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      05:43:29 at java.lang.reflect.Method.invoke(Method.java:498)
      05:43:29 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      05:43:29 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      05:43:29 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      05:43:29 at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      05:43:29 at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:258)
      05:43:29 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      05:43:29 at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      05:43:29 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      05:43:29 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      05:43:29 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      05:43:29 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      05:43:29 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      05:43:29 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      05:43:29 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      05:43:29 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      05:43:29 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      05:43:29 at org.junit.runners.Suite.runChild(Suite.java:128)
      05:43:29 at org.junit.runners.Suite.runChild(Suite.java:27)
      05:43:29 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      05:43:29 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      05:43:29 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      05:43:29 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      05:43:29 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      05:43:29 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      05:43:29 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      05:43:29 
      05:43:29 at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      05:43:29 at org.junit.Assert.assertThat(Assert.java:964)
      05:43:29 at org.junit.Assert.assertThat(Assert.java:930)
      05:43:29 at org.junit.rules.ExpectedException.handleException(ExpectedException.java:271)
      05:43:29 at org.junit.rules.ExpectedException.access$000(ExpectedException.java:111)
      05:43:29 at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:260)
      05:43:29 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      05:43:29 at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      05:43:29 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      05:43:29 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      05:43:29 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      05:43:29 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      05:43:29 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      05:43:29 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      05:43:29 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      05:43:29 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      05:43:29 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      05:43:29 at org.junit.runners.Suite.runChild(Suite.java:128)
      05:43:29 at org.junit.runners.Suite.runChild(Suite.java:27)
      05:43:29 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      05:43:29 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      05:43:29 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      05:43:29 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      05:43:29 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      05:43:29 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      05:43:29 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      05:43:29 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      05:43:29 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      
      

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            drosabrno Daniel Rosa
            Daniel Rosa Daniel Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: