1 Reply Latest reply on Mar 22, 2017 3:35 AM by hchiorean

    [ModeShape 5.x] NullPointerException on an attempt to get a node

    illia.khokholkov

      I am using ModeShape version 5.4-SNAPSHOT. Recently, I have started seeing the following error in the logs of an application that relies on ModeShape in a clustered environment (presently, there are 4 members in the cluster):

       

      java.lang.NullPointerException
          at org.modeshape.jcr.cache.document.LazyCachedNode.getPrimaryType(LazyCachedNode.java:339)
          at org.modeshape.jcr.JcrSession.node(JcrSession.java:556)
          at org.modeshape.jcr.JcrSession.node(JcrSession.java:534)
          at org.modeshape.jcr.JcrSession.node(JcrSession.java:500)
          at org.modeshape.jcr.AbstractJcrNode.getNode(AbstractJcrNode.java:815)
          at org.modeshape.jcr.AbstractJcrNode.getNode(AbstractJcrNode.java:102)
      

       

      There are no warnings or errors from JGroups. The cluster appears to be healthy. Currently, I do not have a test case to consistently reproduce the issue. However, it would be nice if someone could provide some hints as to what may be happening here. There is a Java assertion (modeshape/LazyCachedNode.java at 70222ac49035933edc97f255cf38764f957483ec · ModeShape/modeshape · GitHub ) in the source code ensuring that the property obtained from the cache is not null, however, what I am getting is null. Any help is greatly appreciated, thank you.