• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.IllegalState Exception : removing bean lock and it has tx set!

 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following is the stack trace of the error which i recieve whenever i call business method of my BMP. can any body help me? I am using JBoss 3.0, windows2000
java.rmi.Server Exception: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: removing bean lock and it has tx set!; nested exception is:
java.lang.IllegalState Exception : removing bean lock and it has tx set!
at sun.rmi.transport.StreamRemoteCall. exceptionReceiv edFromServer(StreamRemoteCall.java:248)
at sun.rmi.transport.StreamRemoteCall. executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:136)
at org.jboss.invocation.jrmp. server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces. JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)
at org.jboss.invocation. InvokerInterceptor.invoke(InvokerInterceptor.java:108)
at org.jboss.proxy.TransactionInterceptor. invoke(TransactionInterceptor.java:73)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
at $Proxy1.deposit(Unknown Source)
at Client.main(Client.java:43)
Caused by: java.rmi.ServerException: removing bean lock and it has tx set!; nested exception is:
java.lang.IllegalStateException: removing bean lock and it has tx set!
... 12 more
Caused by: java.lang.IllegalStateException: removing bean lock and it has tx set!
... 12 more
i am putting some blank space in between as i think there is a limit that a word can be max 30 character long
thanks
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you describe how your BMP uses transactions (if at all) and what were you doing on the BMP when the exception was thrown (removing, updating, creating, etc.)?
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my deployment descripter(incomplete), I am not using tranactions explicitly.

<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Accounts</ejb-name>
<home>account.AccountHome</home>
<remote>account.Account</remote>
<ejb-class>account.AccountBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>account.AccountPK</prim-key-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Accounts</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

The error came while updation(create works fine). I am using simple BMP (accounts bean from the examples of the book-"Mastering EJB byEd Roman")
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!