<br> Leon,<br><br> This specific problem was fixed in the 4.0.x branch a few weeks ago. I believe we covered all the scenarios, but in case we missed any, please let us know asap.<br><br> []s<br> Edson<br><br><div>
<span class="gmail_quote">2008/3/13, Leon Stein <<a href="mailto:leon@farecast.com">leon@farecast.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'll test with the latest from 4.0.x branch, in the meanwhile, more info<br> on the actual error:<br> <br> Stack trace:<br> <br><br> org.drools.RuntimeDroolsException: Exception executing predicate<br> <br>org.drools.base.mvel.MVELPredicateExpression@3863aa2c<br>
at<br> org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:216)<br> at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:132)<br> at<br> <br>org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)<br>
at<br> org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)<br> at org.drools.reteoo.Rete.assertObject(Rete.java:175)<br> at<br> org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)<br>
at<br> org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)<br> at<br> org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:909)<br> at<br> <br>org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:881)<br>
at<br> org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:682)<br> <removed><br> Caused by: org.mvel.CompileException: cannot invoke getter: getBar<br> [declr.class: org.example.Foo; act.class: null]<br>
at<br> org.mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java:52)<br> <br> at<br> org.mvel.optimizers.impl.refl.VariableAccessor.getValue(VariableAccessor.java:39)<br> at<br> org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:22)<br>
at<br> org.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21)<br> at<br> org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)<br> at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)<br>
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)<br> <br> at org.mvel.MVEL.executeExpression(MVEL.java:235)<br> <br> at<br> org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36)<br>
at<br> <br>org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:210)<br> ... 41 more<br> <br>Caused by: java.lang.NullPointerException<br> <br> at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)<br>
at<br> <br>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br> <br> at java.lang.reflect.Method.invoke(Method.java:585)<br> <br> at<br> org.mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java:42)<br>
<br> ... 50 more<br> <br> - Only occurs on multi-cpu boxes (Linux, Sun JRE 1.5.0_06, 64 bit) under<br> heavy load with simultaneous sessions running against same rule base<br> with thousands of facts in each session.<br>
<br> - The rule where exception occurs traverses properties of inserted<br> object (foo.bar expression):<br> <br> rule "XYZ"<br> when<br> foo : FooHolder(foo.bar == Bar.GREEN)<br> ...<br> then<br>
...<br> end<br> <br> The traversed objects are not shared between sessions, and properties<br> are never null.<br> <br><br> Leon<br> <br><br> <br> Mark Proctor wrote:<br> > Leon S wrote:<br> >> We ran into this problem after upgrading from 3.0.* to 4.0.4.<br>
>><br> >> Is there a JIRA issue filed for this? I see a few MVEL-related issues scoped<br> >> for 4.0.5 and 5.0 releases, but nothing that looks like specifically<br> >> covering this problem.<br>
>><br> >><br> > The user who reported this has not provided more information on how<br> > this is happening, nor have they confirmed that is or is not fixed in<br> > 4.0.x. My advice is quickly test your code against 4.0.x and let us<br>
> know if there is a problem. There is no way we can determine if there<br> > is or isn't a problem from the stack trace given at the start of this<br> > conversation thread.<br> > <a href="http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/">http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/</a><br>
>> Thanks,<br> >><br> >> Leon<br> >><br> >><br> >> Mark Proctor wrote:<br> >><br> >>> This looks different to what was fixed in 4.0.4. I'm cc'ing brockm to<br> >>> get his feedback as it looks like an MVEL bug on accessors.<br>
>>><br> >>> Mark<br> >>> Fernando Meyer wrote:<br> >>><br> >>>> Hi Ingomar,<br> >>>><br> >>>> Which drools version are you using? We made improvements on 4.0.4,<br>
>>>> that fixes concurrency issues on mvel core, so if you aren't using it<br> >>>> please do an update and try test against your environment.<br> >>>><br> >>>> Please let me know if your problems go away when you upgrade.<br>
>>>><br> >>>> Thanks<br> >>>><br> >>>> On Jan 22, 2008 11:13 AM, Ingomar Otter <<a href="mailto:ingomar.otter@valtech.de">ingomar.otter@valtech.de</a><br> >>>> <mailto:<a href="mailto:ingomar.otter@valtech.de">ingomar.otter@valtech.de</a>>> wrote:<br>
>>>><br> >>>> Folks,<br> >>>> I am currently trying to scale our implementation by farming out<br> >>>> request into mutliple threads. I am on a 4 CPU Mac.<br> >>>> A few things I am wondering about:<br>
>>>> 1. Although I see an increase in CPU load when going from single<br> >>>> to multi-threaded processing the throughput increased marginally.<br> >>>> I am pretty sure that my measurements are correct. I have checked<br>
>>>> the GC and this is not the source of congestion. My question here<br> >>>> is whether Drools is using lot's of synchronization that may<br> >>>> explain this.<br> >>>> 2. When I share the RuleBase accross threads (which I think is<br>
>>>> valid?) I get interesting errors during execution. eg:<br> >>>><br> >>>> org.drools.RuntimeDroolsException : Exception executing predicate<br> >>>> org.drools.base.mvel.MVELPredicateExpression@bb981e<br>
>>>> atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(<br> >>>> PredicateConstraint.java:246)<br> >>>> at<br> >>>><br> >>>> org.drools.common.TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java:200)<br>
>>>><br> >>>> atorg.drools.reteoo.JoinNode.assertObject(JoinNode.java:150)<br> >>>><br> >>>><br> >>>> atorg.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)<br>
>>>><br> >>>> atorg.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)<br> >>>> at org.drools.reteoo.Rete.assertObject(Rete.java:175)<br> >>>> atorg.drools.reteoo.ReteooRuleBase.assertObject<br>
>>>> (ReteooRuleBase.java:192)<br> >>>> at<br> >>>><br> >>>> org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)<br> >>>><br> >>>> at<br>
>>>><br> >>>> org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:909)<br> >>>><br> >>>><br> >>>> atorg.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:881)<br>
>>>><br> >>>><br> >>>> atorg.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:682)<br> >>>><br> >>>> atxxxx.DroolsPD.validate(DroolsPD.java:66)<br>
>>>> at xxxx.DroolsMTRunner.run(DroolsMTRunner.java:30)<br> >>>> at java.lang.Thread.run(Thread.java:552)<br> >>>> Caused by: org.mvel.CompileException: cannot invoke getter:<br>
>>>> getSAClass [declr.class: xxx.AbstractSA; act.class: null]<br> >>>> atorg.mvel.optimizers.impl.refl.GetterAccessor.getValue(<br> >>>> GetterAccessor.java:52)<br> >>>> at<br>
>>>><br> >>>> org.mvel.optimizers.impl.refl.VariableAccessor.getValue(VariableAccessor.java:39)<br> >>>><br> >>>> at<br> >>>><br> >>>> org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:22)<br>
>>>><br> >>>> atorg.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21)<br> >>>> at<br> >>>><br> >>>> org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)<br>
>>>><br> >>>> at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)<br> >>>> at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)<br> >>>><br> >>>> atorg.mvel.MVEL.executeExpression(MVEL.java:235)<br>
>>>> at<br> >>>><br> >>>> org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36)<br> >>>><br> >>>><br> >>>> atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:240)<br>
>>>> ... 13 more<br> >>>> Caused by: java.lang.NullPointerException<br> >>>> atsun.reflect.GeneratedMethodAccessor6.invoke (Unknown Source)<br> >>>> atsun.reflect.DelegatingMethodAccessorImpl.invoke(<br>
>>>> DelegatingMethodAccessorImpl.java:25)<br> >>>> atjava.lang.reflect.Method.invoke( Method.java:324)<br> >>>> at<br> >>>><br> >>>> org.mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java:42)<br>
>>>><br> >>>> ... 22 more<br> >>>><br> >>>> Details:<br> >>>> * I use StatelessSessions which are private to the threads<br> >>>> * No data is shared between threads (with the exception of the<br>
>>>> RuleBase, as outline above)<br> >>>> * I am on JDK 1.5<br> >>>><br> >>>> I would be grateful for any pointers for 'correct' use of Drools<br> >>>> in an MT environment.<br>
>>>> Cheers,<br> >>>> Ingomar<br> >>>><br> >>>><br> >>>> Ingomar Otter<br> >>>> Chief Technology Officer<br> >>>> <a href="mailto:ingomar.otter@valtech.de">ingomar.otter@valtech.de</a> <mailto:<a href="mailto:ingomar.otter@valtech.de">ingomar.otter@valtech.de</a>><br>
>>>> Mobile: +49 172 2367867<br> >>>><br> >>>> Valtech GmbH<br> >>>> Bahnstraße 16<br> >>>> 40212 Düsseldorf<br> >>>> Germany<br>
>>>><br> >>>> Phone: +49 (0)211 179237-0<br> >>>> Fax: +49 211 179237-19<br> >>>><br> >>>> <a href="http://www.valtech.de">www.valtech.de</a> <<a href="http://www.valtech.de/">http://www.valtech.de/</a>><br>
>>>><br> >>>> Geschäftsführer: Ingo Kriescher<br> >>>> Amtsgericht Düsseldorf HRB48672<br> >>>><br> >>>><br> >>>> _______________________________________________<br>
>>>> rules-users mailing list<br> >>>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a> <mailto:<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>
>>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> >>>><br> >>>><br> >>>><br> >>>><br>
>>>> --<br> >>>> Fernando Meyer <a href="http://fmeyer.org">http://fmeyer.org</a><br> >>>> JBoss Rules Core Developer<br> >>>> <a href="mailto:fernando@fmeyer.org">fernando@fmeyer.org</a> <mailto:<a href="mailto:fernando@fmeyer.org">fernando@fmeyer.org</a>><br>
>>>> ------------------------------------------------------------------------<br> >>>><br> >>>> _______________________________________________<br> >>>> rules-users mailing list<br>
>>>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br> >>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>><br> >>>><br> >>> _______________________________________________<br> >>> rules-users mailing list<br> >>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> >>><br> >>><br> >>><br> >><br> >><br> >><br>
>><br> ><br> > ------------------------------------------------------------------------<br> ><br> > _______________________________________________<br> > rules-users mailing list<br> > <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> ><br> _______________________________________________<br> rules-users mailing list<br> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> </blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br>
Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>