That fact makes me think about that the problem is in the number of patterns and not the pattern itself.<br><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 9:08 AM, Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">But wait a second.. <div>If you comment out another and inside the rule it will also work.. that means that it&#39;s not the pattern inside the last AND</div>

<div class="HOEnZb"><div class="h5"><div><br><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 9:04 AM, Mario Fusco <span dir="ltr">&lt;<a href="mailto:mario.fusco@gmail.com" target="_blank">mario.fusco@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mauricio,<br><br>I am seeing exactly what you wrote.<br>What I have found until now is that the harming pattern is inside the last and block (the one starting at line 218 of the single big rule and ending at 235), indeed if you comment away that block the test succeeds.<br>



<br>I&#39;ll keep you updated on my further findings.<span><font color="#888888"><br><br>Mario <br></font></span><div><div><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 9:53 AM, Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mario, I was looking at that problem too.<div>Notice that if you remove some of the ANDs, the rule will work without throwing the null pointer exception.</div>



<div>Which makes me think that it could be related with the number of declarations or how the patterns are being arranged for that specific case.</div>

<div>The null pointer is raised when a hashcode is being calculated for a declaration that doesn&#39;t have an object assigned, for some reason it&#39;s not there. </div><div>One of the tests shows how we have splitted the rule in multiple rules showing that each individual group of patterns is correct.. which make me think again about the number of patterns and/or declarations can be causing the issue.</div>





<div><br></div><div>Cheers</div><div><br></div><div>Keep us posted about your findings.. we can probably learn how to solve these problems and stop bothering you :)<div><div><br><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 8:39 AM, Mario Fusco <span dir="ltr">&lt;<a href="mailto:mario.fusco@gmail.com" target="_blank">mario.fusco@gmail.com</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am going to give a look at it.<br><br><div class="gmail_quote"><div><div>On Thu, Mar 15, 2012 at 9:11 AM, Esteban Aliverti <span dir="ltr">&lt;<a href="mailto:esteban.aliverti@gmail.com" target="_blank">esteban.aliverti@gmail.com</a>&gt;</span> wrote:<br>






</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi Guys, <div>I&#39;m having a NPE in one of the rules I&#39;m using and I can&#39;t find the cause. </div>





<div>I&#39;m attaching a test project that shows the problem. </div>
<div>Basically, I have 1 rule that contains some nested &#39;ands&#39; and &#39;ors&#39; patterns. The rule is being auto-generated from some data, that is why it has this strange structure.</div>

<div>We tried to refactor the rule by separating it in different rules, extract some common factors, etc. and in some cases it works.</div><div>So I&#39;m not sure whether the original rule is wrong or if I&#39;m hitting a bug in Drools.</div>








<div>Inside the test project you can find the original rule (SimpleHighRiskSepsis.drl) and all the other refactors we did.</div><div><br></div><div>Best Regards,<br clear="all"><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<span><font color="#888888"><br>








<br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>









</font></span></div>
<br></div></div>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div>
 - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>

 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div><br>
</font></span></div>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div> - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>


 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div><br>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div> - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>

 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div><br>