Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1096

NPE when using "exists" with "from"

    XMLWordPrintable

    Details

      Description

      NPE when adding a package with the following rule to a rulebase:

      package org.drools;

      global java.util.List results;

      rule "exists with from"
      when
      Cheesery( $cheeses : cheeses )
      exists( Cheese( type == "stilton" ) from $cheeses )
      then
      results.add( "true" );
      end

      java.lang.NullPointerException
      at org.drools.reteoo.builder.BuildUtils.createBetaNodeConstraint(BuildUtils.java:168)
      at org.drools.reteoo.builder.GroupElementBuilder$ExistsBuilder.build(GroupElementBuilder.java:306)
      at org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:70)
      at org.drools.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:112)
      at org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:70)
      at org.drools.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:136)
      at org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:109)
      at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:116)
      at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:262)
      at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:337)
      at org.drools.integrationtests.FirstOrderLogicTest.testExistsWithFrom(FirstOrderLogicTest.java:717)
      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:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tirelli Edson Tirelli
                Reporter:
                tirelli Edson Tirelli
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: