<div dir="ltr">Yes I think that makes sense. </div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 12:50 PM, Scott Marlow <span dir="ltr">&lt;<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="https://issues.jboss.org/browse/WFLY-5208" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/WFLY-5208</a> seems to be related and mention that we can&#39;t fix the NPE and if we did fix it, there would be other errors, caused by &quot;deployment is being torn down while the app is still processing requests&quot;.<div><div class="h5"><br>
<br>
On 07/07/2016 01:27 PM, Scott Marlow wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
<br>
On 07/07/2016 01:13 PM, James Perkins wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think you need to look at why the cache is null. In<br>
the org.jboss.as.ejb3.component.stateful.StatefulSessionComponent it&#39;s<br>
only null if the start of the component hasn&#39;t been invoked or the done<br>
method was invoked.<br>
</blockquote>
<br>
 From the call stack, we must of called &quot;done&quot; already, as the cache<br>
would of been used previously during the test (implying that it was<br>
non-null previously).<br>
<br>
<br>
[1]<br>
<a href="https://gist.github.com/scottmarlow/9f9822e9d4609850d49099c3c5234ed9#file-gistfile1-txt-L41" rel="noreferrer" target="_blank">https://gist.github.com/scottmarlow/9f9822e9d4609850d49099c3c5234ed9#file-gistfile1-txt-L41</a><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Thu, Jul 7, 2016 at 9:23 AM, Scott Marlow &lt;<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a><br>
&lt;mailto:<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>&gt;&gt; wrote:<br>
<br>
    Often when running a NoSQL unit test, I&#39;m seeing a NPE in<br>
    org.jboss.as.weld.ejb.StatefulSessionObjectReferenceImpl.isRemoved().  I<br>
    understand that we should never allow a NullPointerException to be<br>
    thrown, however, does anyone know what the correct course of action<br>
    should be?  Ensuring that ejbComponent.getCache() never returns null<br>
    could be one approach.  Or perhaps callers to ejbComponent.getCache()<br>
    should check for null being returned.  Could there be a missing<br>
    application dependency on the cache?<br>
<br>
    StatefulSessionObjectReferenceImpl currently contains:<br>
<br>
    @Override<br>
    public boolean isRemoved() {<br>
       if (!removed) {<br>
         return !ejbComponent.getCache().contains(id);<br>
       }<br>
       return true;<br>
    }<br>
<br>
    Thanks,<br>
    Scott<br>
<br>
    [1] <a href="https://gist.github.com/scottmarlow/9f9822e9d4609850d49099c3c5234ed9" rel="noreferrer" target="_blank">https://gist.github.com/scottmarlow/9f9822e9d4609850d49099c3c5234ed9</a><br>
    _______________________________________________<br>
    wildfly-dev mailing list<br>
    <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a>&gt;<br>
    <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
<br>
<br>
<br>
<br>
--<br>
James R. Perkins<br>
JBoss by Red Hat<br>
</blockquote>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
</div></div><a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
<br>
</blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>James R. Perkins</div><div>JBoss by Red Hat</div></div></div></div></div>
</div>