[rules-users] NullPointerException while inserting Facts

Sebastian Furth sebastian.furth at googlemail.com
Tue Mar 23 09:10:52 EDT 2010


Hi,

we are currently trying to integrate DROOLS 5.1 in our project.
In our Project we have two different kinds of Facts, called Values and
Inputs. We don't have any problems with inserting Input instances but
sometimes when we try to insert an instance of the Value class (@see:
http://www.pastie.org/private/juv7hh7rxahpluo5agu3q) we get the following
NullPointerException:

java.lang.NullPointerException
    at org.drools.reteoo.LeftTuple.get(LeftTuple.java:265)
    at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300)
    at
org.drools.rule.VariableRestriction$ObjectVariableContextEntry.updateFromTuple(VariableRestriction.java:320)
    at
org.drools.common.SingleBetaConstraints.updateFromTuple(SingleBetaConstraints.java:119)
    at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:98)
    at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:117)
    at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:34)
    at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:123)
    at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:145)
    at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:57)
    at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:142)
    at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:42)
    at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:147)
    at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360)
    at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344)
    at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
    at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
    at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
    at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
    at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
    at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:216)
    at de.d3web.we.drools.DroolsAction.addFacts(DroolsAction.java:296)
    at
de.d3web.we.drools.DroolsAction.createKnowledgeSession(DroolsAction.java:268)
    at de.d3web.we.drools.DroolsAction.execute(DroolsAction.java:67)

The weird thing is that we don't get this exception with all instances of
the Value class - some of them can be inserted, others not. The objects are
created correctly - we've already debugged this. The crash happens somewhere
deeper in the drools api.

It would be really great if you could give us a hint how we could fix this
problem.

Thank you in advance.

Best regards

Sebastian Furth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100323/78f26c6d/attachment.html 


More information about the rules-users mailing list