[wildfly-dev] Seeing NPE in org.jboss.as.weld.ejb.StatefulSessionObjectReferenceImpl.isRemoved() during NoSQL testing, how to fix?

James Perkins jperkins at redhat.com
Thu Jul 7 13:13:01 EDT 2016


I think you need to look at why the cache is null. In
the org.jboss.as.ejb3.component.stateful.StatefulSessionComponent it's only
null if the start of the component hasn't been invoked or the done method
was invoked.

On Thu, Jul 7, 2016 at 9:23 AM, Scott Marlow <smarlow at redhat.com> wrote:

> Often when running a NoSQL unit test, I'm seeing a NPE in
> org.jboss.as.weld.ejb.StatefulSessionObjectReferenceImpl.isRemoved().  I
> understand that we should never allow a NullPointerException to be
> thrown, however, does anyone know what the correct course of action
> should be?  Ensuring that ejbComponent.getCache() never returns null
> could be one approach.  Or perhaps callers to ejbComponent.getCache()
> should check for null being returned.  Could there be a missing
> application dependency on the cache?
>
> StatefulSessionObjectReferenceImpl currently contains:
>
> @Override
> public boolean isRemoved() {
>    if (!removed) {
>      return !ejbComponent.getCache().contains(id);
>    }
>    return true;
> }
>
> Thanks,
> Scott
>
> [1] https://gist.github.com/scottmarlow/9f9822e9d4609850d49099c3c5234ed9
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>



-- 
James R. Perkins
JBoss by Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160707/9edc9b65/attachment.html 


More information about the wildfly-dev mailing list