BTW, you stack trace seem to be from another version, and not the trunk.<br>Can you please also provide the Drools version that you are using with the test case?<br><br><div class="gmail_quote">On Wed, Apr 14, 2010 at 10:59 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: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Can you provide us a simple project with a test case? <br>It&#39;s easy to me to debug and find the problem. And looks like you already point out where is the problem (the work items mapping parameters).<br>
With a simple maven project that show that situation we can create a jira issue if we think that it&#39;s a bug. That it&#39;s possible because the resolveClass methods was introduced after the rest of the class.<br>
I can work on solve that problem tonight after finishing my current assignments, but with out a simple test case that shows that it fails. It&#39;s impossible for me to start with it.<div><div></div><div class="h5"><br><br>
<br><div class="gmail_quote">On Wed, Apr 14, 2010 at 9:59 AM, nanic23 <span dir="ltr">&lt;<a href="mailto:nanic23@hotmail.com" target="_blank">nanic23@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
Hi Mauricio,<br>
<br>
Thank you very much for you comments. I am mapping a single variable type<br>
Long.<br>
<br>
Could you please look at posts above as I think they might have a good<br>
point. There it seems that the getWorkItem method is creating a<br>
MarshallerReaderContext with a &quot;null&quot; value for the ruleBase argument:<br>
<div><br>
public WorkItem getWorkItem() {<br>
        if ( workItem == null ) {<br>
            try {<br>
                ByteArrayInputStream bais = new ByteArrayInputStream(<br>
workItemByteArray );<br>
                MarshallerReaderContext context = new<br>
MarshallerReaderContext( bais,<br>
<br>
<br>
null,  // THIS IS a RULEBASE &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br>
<br>
<br>
null,<br>
<br>
null );<br>
                workItem = InputMarshaller.readWorkItem( context );<br>
<br>
<br>
</div>This in turn ends up creating a NPE when the &quot;null&quot; ruleBase is used.<br>
<div><br>
 protected Class&lt; ? &gt; resolveClass(ObjectStreamClass desc) throws<br>
IOException, ClassNotFoundException {<br>
        String name = desc.getName();<br>
        try {<br>
<br>
            return Class.forName(name, false,<br>
this.ruleBase.getRootClassLoader()); // HERE IS WHERE THE NULL POINTER<br>
EXCEPTION OCCURS &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; since the RuleBase is NULL<br>
<br>
        } catch (ClassNotFoundException ex) {<br>
            return super.resolveClass( desc );<br>
        }<br>
    }<br>
<br>
</div>This is explained in more detail in the posts above. Do you think this could<br>
be the issue? Am I following (and understanding) Drools src code correctly?<br>
<br>
I appreciate your help!<br>
<br>
Thanks,<br>
<br>
Nick.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/Resuming-Flow-NPE-when-completing-a-work-item-tp716847p718601.html" target="_blank">http://n3.nabble.com/Resuming-Flow-NPE-when-completing-a-work-item-tp716847p718601.html</a><br>


</font><div><div></div><div>Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div><div></div><div class="h5">-- <br> - <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
 - Salatino &quot;Salaboy&quot; Mauricio -<br>

</div></div></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>