0 Replies Latest reply on Nov 29, 2001 6:40 PM by Anatoly Akkerman

    NullPointerException from $Proxy

    Anatoly Akkerman Newbie

      Hi

      Looks quite weird

      I have an SFSB (AppManager) which talks to an Entity bean (DescriptorCMP) through a SLSB (Registry).

      Each Descriptor has a field called 'lock' to implement
      application-level locking of descriptors stored in the
      DB. Registry SLSB is used to manage loading/storing/locking of descriptors

      When AppManager is created in ejbCreate() I obtain
      a 'lock' on a specific descriptor. I do my work by calling business methods of the AppManager from a regular java client. Then I want to remove the AppManager and call its remove() method.

      In ejbRemove() it calls the Registry to unlock the descriptor that it locked in ejbCreate(). The call successfully is invoked on the Registry and then on the underlying DescriptorCMP (I log the calls) somewhere right before returning it throws an NPE from the Proxy:

      [Default] java.lang.NullPointerException
      [Default] at $Proxy172.releaseAppLock(Unknown Source)
      [Default] at test.deployment.config.ejb.AppManagerBean.ejbRemove(Unknown S
      ource)
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default] at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.r
      emoveSession(StatefulSessionFilePersistenceManager.java:327)
      [Default] at org.jboss.ejb.StatefulSessionContainer.remove(StatefulSession
      Container.java:367)
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.i
      nvoke(StatefulSessionContainer.java:673)
      [Default] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
      rceptor.java:129)

      I am using JBoss 2.5 snapshot