[jboss-dev-forums] [Design of JBoss Serialization] - Interceptor medasata issue

tterm do-not-reply at jboss.com
Sun Aug 27 05:26:18 EDT 2006


Hello,

I'm not sure if this is the right forum for my question. If not sorry and please point me to the right one.

I get allways a class cast exception if I put some values into the metadate from the invocation object in the invoke method of an interceptor. It works fine with JBoss until version 4.0.3SP1. But with later versions I run allways in this issue. 

In a client side interceptor I do the following:


  | SimpleMetaData metaData = invocation.getMetaData();
  | 
  | metaData.addMetaData(InterceptorConstants.ARM_TAG,
  |   InterceptorConstants.ARM_CORR_KEY, corr.getBytes());
  | 
  | 

corr.getBytes(); is a simple byte array


If I do an EJB request I get allways this exception:


  | java.lang.ClassCastException: org.jboss.serial.objectmetamodel.DataContainer$DataContainerOutput
  | 	org.jboss.aop.util.MarshalledValue.writeExternal(MarshalledValue.java:190)
  | 	org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
  | 	org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
  | 	org.jboss.serial.objectmetamodel.DataContainer$DataContainerOutput.writeObject(DataContainer.java:386)
  | 	org.jboss.aop.metadata.SimpleMetaData.writeExternal(SimpleMetaData.java:226)
  | 	org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
  | 	org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
  | 	org.jboss.serial.objectmetamodel.DataContainer$DataContainerOutput.writeObject(DataContainer.java:386)
  | 	org.jboss.aop.joinpoint.MethodInvocation.writeExternal(MethodInvocation.java:321)
  | 	org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
  | 	org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
  | 	org.jboss.serial.objectmetamodel.DataContainer$DataContainerOutput.writeObject(DataContainer.java:386)
  | 	org.jboss.serial.io.MarshalledObjectForLocalCalls.<init>(MarshalledObjectForLocalCalls.java:38)
  | 	org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:53)
  | 	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	de.fh_wiesbaden.cs.vs.jboss_ejb3_instrumentation.interceptor.client.ARMRunningClient.invoke(ARMRunningClient.java:248)
  | 	de.fh_wiesbaden.cs.vs.jboss_ejb3_instrumentation.interceptor.client.ClientARMInterceptor.invoke(ClientARMInterceptor.java:94)
  | 	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	de.fh_wiesbaden.cs.vs.jboss_ejb3_instrumentation.interceptor.client.ClientGetCorrelatorFromThreadLocalInterceptor.invoke(ClientGetCorrelatorFromThreadLocalInterceptor.java:43)
  | 	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:100)
  | 	$Proxy92.getCategory(Unknown Source)
  | 	de.fh_wiesbaden.cs.vs.xpetstore.web.struts.action.category.CategoryAction.doExecute(CategoryAction.java:48)
  | 	de.fh_wiesbaden.cs.vs.xpetstore.web.struts.action.BaseAction.execute(BaseAction.java:78)
  | 	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
  | 	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
  | 	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
  | 	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 	de.fh_wiesbaden.cs.vs.xpetstore.web.filter.SignOnFilter.doFilter(SignOnFilter.java:128)
  | 	com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(Unknown Source)
  | 	com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(Unknown Source)
  | 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 

I tried to debug this thing but I couldn't get it why it occurs. 

I appreciate any help and thanks in advance. If more information is required I'll post it.

Regards,
Thomas Termin

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967688#3967688

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967688



More information about the jboss-dev-forums mailing list