3 Replies Latest reply on Oct 24, 2003 10:57 AM by nashbr

    Attempt to get lock ref

    varma_rk Newbie

      Hi,
      I am getting the following exception some times (not al l the times). I would really appreciate if anybody can help me in solving this exception.
      Please see the exception details below..

      thanks,
      Ravi Varma.

      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.ServerException: Container exception. Notify the container developers :-); nested exception is:
      java.lang.IllegalArgumentException: Attempt to get lock ref with a null object
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown Source)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:357)
      at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123)
      at $Proxy20.getAllGroupsData(Unknown Source)
      at com.softalia.neoems.client.useradmin.UsrsGrpsPnl$11.construct(UsrsGrpsPnl.java:1769)
      at com.softalia.util.SwingWorker$2.run(SwingWorker.java:109)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.rmi.ServerException: Container exception. Notify the container developers :-); nested exception is:
      java.lang.IllegalArgumentException: Attempt to get lock ref with a null object
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:184)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:436)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:506)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
      at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
      at $Proxy411.getUserId(Unknown Source)
      at com.softalia.neoems.security.GroupIntfBean.getUsers(GroupIntfBean.java:2143)
      at com.softalia.neoems.security.GroupIntfBean.getGroupData(GroupIntfBean.java:1328)
      at com.softalia.neoems.security.GroupIntfBean.getAllGroupsData(GroupIntfBean.java:1460)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:542)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:82)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:277)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)

        • 1. Re: Attempt to get lock ref
          Robert de Lorimier Newbie

          Varma,

          I recieve the same error every time I create a new EJB and then try execute a method on it immediately afterwards. I am guessing that jboss is not automatically instantiating a new instance of the bean in the container and so you get a lock ref or null ref. It is quite frustrating. I generally need to do a hack where I call the bean by using findByPrimaryKey if I know the primary key, or add a find method to the bean so that I can call it find it using other params.

          • 2. Re: Attempt to get lock ref
            Robert de Lorimier Newbie

            Varma,

            I recieve the same error every time I create a new EJB and then try execute a method on it immediately afterwards. I am guessing that jboss is not automatically instantiating a new instance of the bean in the container and so you get a lock ref or null ref. It is quite frustrating. I generally need to do a hack where I call the bean by using findByPrimaryKey if I know the primary key, or add a find method to the bean so that I can call it find it using other params.

            • 3. Re: Attempt to get lock ref
              nashbr Newbie

              I'm gettin the same...And where is the solution?