Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User »

Re: [JBoss-user] Attempt to get lock ref with a null object

Adrian Brock

2003-09-11

Replies:

You need to tell jboss you are using db generated keys.
This is an FAQ.

Regards,
Adrian

On Thu, 2003-09-11 at 13:33, James Black wrote:
> I am learning to use jboss, and write ejbs. I am getting an error I
> don't understand how to solve.
>
> My unit tests passed before I added in the Data Access Object, I was
> using a different java bean for accessing the database.
> I have now written a DAO, and added it to the system. I am using Lomboz
> to help me generate and integrate the necessary classes.
>
> I have looked to ensure that my ejbFindByPrimaryKey doesn't return a
> null (I return the PK that was passed in), and findByPrimaryKey in the
> DAO doesn't return null.
>
> But, it appears that they never get to any of my code before the
> exception is thrown. I had walked through the execution using the
> debugger in Eclipse, and neither function above is ever called.
>
> Any suggestions on what I can do?
>
> Is memory an issue? Currently my PC has 512M RAM (my new computer
> should have 2G), so it does end up doing swapping, but everything is
> running.
>
> Thank you for any help.
>
> Error I get:
>
> java.rmi.ServerException: RemoteException occurred in server thread;
> nested exception is:   java.rmi.ServerException: RuntimeException;
> 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:534)
>   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.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
> Source)
>   at
> org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke (JRMPInvokerProxy.java:135)
>
>   at
> org.jboss.invocation.InvokerInterceptor.invoke (InvokerInterceptor.java:87)
>   at
> org.jboss.proxy.TransactionInterceptor.invoke (TransactionInterceptor.java:46)
>
>   at
> org.jboss.proxy.SecurityInterceptor.invoke (SecurityInterceptor.java:45)
>   at
> org.jboss.proxy.ejb.EntityInterceptor.invoke (EntityInterceptor.java:97)
>   at org.jboss.proxy.ClientContainer.invoke (ClientContainer.java:85)
>   at $Proxy1.getNamsPerson(Unknown Source)
>   at
> edu.usf.acomp.epic.ee.server.persons.NamsPersonServerBeanTest.testGetNamsPerson(NamsPersonServerBeanTest.java:66)
>
>   at
> edu.usf.acomp.epic.ee.server.persons.NamsPersonServerBeanTest.testBean(NamsPersonServerBeanTest.java:51)
>
>   at
> edu.usf.acomp.epic.ee.server.persons.NamsPersonServerBeanTest.main(NamsPersonServerBeanTest.java:92)
>
> Caused by: java.lang.IllegalArgumentException: Attempt to get lock ref
> with a null object
>   at org.jboss.ejb.BeanLockManager.getLock (BeanLockManager.java:80)
>   at
> org.jboss.ejb.plugins.EntityLockInterceptor.invoke (EntityLockInterceptor.java:81)
>
>   at
> org.jboss.ejb.plugins.EntityCreationInterceptor.invoke (EntityCreationInterceptor.java:53)
>
>   at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext (AbstractTxInterceptor.java:84)
>
>   at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions (TxInterceptorCMT.java:243)
>
>   at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke (TxInterceptorCMT.java:104)
>   at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke (SecurityInterceptor.java:117)
>
>   at org.jboss.ejb.plugins.LogInterceptor.invoke (LogInterceptor.java:191)
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> JBoss-user@(protected)
> https://lists.sourceforge.net/lists/listinfo/jboss-user
--
xxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
JBoss-user@(protected)
https://lists.sourceforge.net/lists/listinfo/jboss-user


©2008 junlu.com - Jax Systems, LLC, U.S.A.