J2EE EJB 2.x CMP Exception bei lesendem Clientzugriff auf EntityBean...

prätorianer

Grünschnabel
Hallo Forum,

ich muß mich z.Z. in die etwas ältere Technologie von j2ee und ejb 2.x einarbeiten und hierbei tritt folgendes Problem auf.

Nachdem die EntityBean erfolgreich im JBoss ApplicationServer (4.0.2) deployed wurde, versuche ich mit einer Konsolenanwendung darauf zuzugreifen. Das Erstellen der Bean und somit des Datensatzes in der Datenbank ist erfolgreich. Beim Zugriff auf den gespeicherten Wert erhalte ich beim Zugriff auf die getter-Methoden folgende exception:

Code:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	java.rmi.ServerException: RuntimeException; nested exception is: 
	java.lang.IllegalStateException: removing bean lock and it has tx set!
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
	at sun.rmi.transport.Transport$1.run(Transport.java:153)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
	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:595)
	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:126)
	at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
	at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
	at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
	at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
	at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
	at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
	at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:97)
	at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
	at $Proxy1.getCustomerId(Unknown Source)
	at eu.praetorianer.examples.j2ee.project.simple.client.ClientApp.main(ClientApp.java:47)
Caused by: java.rmi.ServerException: RuntimeException; nested exception is: 
	java.lang.IllegalStateException: removing bean lock and it has tx set!
	at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:386)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196)
	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
	at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
	at org.jboss.ejb.Container.invoke(Container.java:873)
	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:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
	at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
	at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
	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:585)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
	at sun.rmi.transport.Transport$1.run(Transport.java:153)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
	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:595)
Caused by: java.lang.IllegalStateException: removing bean lock and it has tx set!
	at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.removeRef(QueuedPessimisticEJBLock.java:458)
	at org.jboss.ejb.BeanLockManager.removeLockRef(BeanLockManager.java:116)
	at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:106)
	at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
	... 25 more


Hat von euch jemand einen Tip, was ich da falsch gemacht haben könnte? Prinzipiell sollte das doch eigentlich möglich sein...so ein Remote-Zugriff auf eine EntityBean...und die Erstellung des Datensatzes war ja auch erfolgreich. Oder ist immer die Verwendung einer SessionFassade bzw. eines DataTransferObjektes (DTO) notwendig? Wenn für die Fehlersuche noch die Klassen, Interfaces bzw. Deployment-Descriptoren o.ä. benötigt werden, liefere ich sie gerne alle nach.

steffen

 

Neue Beiträge

Zurück