[rules-users] Interesting null pointer exception when inserting afact.
Jason Partyka
Jason.Partyka at hightowerinc.com
Fri Mar 14 17:14:32 EDT 2008
Well, another update, if it helps anyone, I turned off Shadow objects and it's still occurring.
________________________________
From: rules-users-bounces at lists.jboss.org [rules-users-bounces at lists.jboss.org] On Behalf Of Jason Partyka [Jason.Partyka at hightowerinc.com]
Sent: Wednesday, March 12, 2008 1:58 PM
To: Rules Users List
Subject: RE: [rules-users] Interesting null pointer exception when inserting afact.
It looks like the bug is still in there.
I am attempting to resolve it myself, but in order to do so I need to go into the MVEL code, but the mvel jar that is included as part of the drools classpath container (within eclipse) is just mvel14.jar. So I'm not sure where the source is or what version of MVEL source I should be attaching. I realize that the source-location thing is just an Eclipse issue, but I thought I'd let you know right away that it looks like it's still there.
Anywhere you can point me to that would help with making sure I'm looking the right code.
Thanks,
Jason
________________________________
From: rules-users-bounces at lists.jboss.org [rules-users-bounces at lists.jboss.org] On Behalf Of Mark Proctor [mproctor at codehaus.org]
Sent: Monday, March 10, 2008 8:17 AM
To: Rules Users List
Subject: Re: [rules-users] Interesting null pointer exception when inserting afact.
please check with 4.0.x, which will be in 4.0.5 this week, and let us know if this is fixed or not. But hurry we are releasing 4.0.5 very soon:
http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/
Mark
Jason Partyka wrote:
I can give this a shot, but the reason why you suggest this is not obvious to me.
Have you encountered this problem yourself?
-Jason
________________________________
From: rules-users-bounces at lists.jboss.org<mailto:rules-users-bounces at lists.jboss.org> [rules-users-bounces at lists.jboss.org<mailto:rules-users-bounces at lists.jboss.org>] On Behalf Of Anstis, Michael (M.) [manstis1 at ford.com<mailto:manstis1 at ford.com>]
Sent: Monday, March 10, 2008 5:06 AM
To: Rules Users List
Subject: RE: [rules-users] Interesting null pointer exception when inserting afact.
I'm no expert but recall there can be problems running "long running" (subjective) code from AWT's worker thread.
I thought it was good practice to run your "application code" in a worker thread. This was the first google hit I had on the matter.
http://www.cs.helsinki.fi/u/vihavain/k03/Java/JavathreadsandGUI.html
Cheers,
Mike
________________________________
From: rules-users-bounces at lists.jboss.org<mailto:rules-users-bounces at lists.jboss.org> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Edson Tirelli
Sent: 08 March 2008 13:15
To: Rules Users List
Subject: Re: [rules-users] Interesting null pointer exception when inserting afact.
Jason,
Can you please isolate and show us the rule that is creating the problem? It is happening either in a eval() statement or in a nested property access.
[]s
Edson
2008/3/7, Jason Partyka <Jason.Partyka at hightowerinc.com<mailto:Jason.Partyka at hightowerinc.com>>:
Hi,
This is in relation to drools 4.0.4
I have an interesting problem. I am getting a null pointer exception when I am inserting a fact into a StatefulSession object. What is odd about this NPE is that, as far as I can tell (and I have inserted a breakpoint right before I insert the fact) that all the properties in the object are initialized, and there are no rules accessing any thing that could be null.
So here's my exception trace (just first few lines to get context):
Exception in thread "AWT-EventQueue-0" org.drools.RuntimeDroolsException: java.lang.NullPointerException
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:76)
at org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:145)
at org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
at org.drools.reteoo.Rete.assertObject(Rete.java:177)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)
at com.hightower.drools.executablerules.Rules.setTemplate(Rules.java:112)
....
Caused by: java.lang.NullPointerException
at org.drools.base.mvel.MVELEvalExpression.evaluate(MVELEvalExpression.java:39)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:72)
... 39 more
(that setTemplate method is not a drools template)
Any ideas?
Thanks,
Jason
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org<mailto:rules-users at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com<http://www.jboss.com>
________________________________
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org<mailto:rules-users at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080314/3d298b06/attachment.html
More information about the rules-users
mailing list