geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Mazan <win...@wp.pl>
Subject Pass EJBObject - serialization/deserialization
Date Sat, 01 Dec 2007 12:34:44 GMT

Hi
I'm sending EJBObject of my bean via JMS, and got exception like below:

13:13:35,609 ERROR [CommonDriverJmsBean] JmsRequest object couldn''t be
extracted from Message due to exception: Failed to build body from bytes.
Reason: java.io.IOException:
myapp.dispatcher.feedback.FeedbackGateEjbRemoteObject
javax.jms.JMSException: Failed to build body from bytes. Reason:
java.io.IOException: myapp.dispatcher.feedback.FeedbackGateEjbRemoteObject
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
	at
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:172)
	at
myMdbApp.driver.CommonDriverJmsBean.onMessage(CommonDriverJmsBean.java:106)
	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:597)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
	at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
	at org.apache.openejb.core.mdb.MdbContainer._invoke(MdbContainer.java:333)
	at org.apache.openejb.core.mdb.MdbContainer.invoke(MdbContainer.java:305)
	at
org.apache.openejb.core.mdb.EndpointHandler.deliverMessage(EndpointHandler.java:229)
	at
org.apache.openejb.core.mdb.EndpointHandler.invoke(EndpointHandler.java:170)
	at $Proxy71.onMessage(Unknown Source)
	at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:121)
	at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:61)
	at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:696)
	at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
	at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:290)
	at
org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
	at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:201)
	at
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:331)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException:
myapp.dispatcher.feedback.FeedbackGateEjbRemoteObject
	at
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:168)
	... 24 more

Some java code:

JmsRequest.java:
public class JmsRequest implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2169388709610865744L;

	/**
	 * Handle of EJB that sends request
	 */
	private Handle handle;

        ...
}

Referred bean (FeedbackGateBean.java) has declarations:
@RemoteHome(FeedbackGateEjbRemoteHome.class)
@Remote({FeedbackGateRemote.class})

FeedbackGateEjbRemoteHome.java:
public interface FeedbackGateEjbRemoteHome extends EJBHome {
	FeedbackGateEjbRemoteObject create() throws CreateException,
RemoteException;
}

FeedbackGareEjbRemoteObject.java:
@Remote
public interface FeedbackGateEjbRemoteObject extends EJBObject {	
	void simpleConfirmation(String taskId, boolean result, String details)
throws RemoteException;
        ...
        ...
}

Driver which receives JmsRequest and send JmsResponse have to get some data
from JmsRequest, but Handle is only get from JmsRequest and put to
JmsResponse. In fact it doesn't, but it should. 

Where is cause of that JMSException ?

regards 
Beniamin
-- 
View this message in context: http://www.nabble.com/Pass-EJBObject---serialization-deserialization-tf4928025s134.html#a14104714
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message