Is there a way to avoid jboss serialization in JBoss5?

I have 2 applications running in JBoss5.

They send data to each other. I added a field to one of the Serializable classes without changing serialVersionUID . This class still supports backward compatibility under the Java Serialization Rules .

The problem I am facing is that JBoss throws an IOException when I try to send it by EJB call from one application to another:

 java.io.IOException: Current classpath has lesser fields on com.myproject.MyEntity than its original version org.jboss.serial.classmetamodel.StreamingClass.readStream(StreamingClass.java:98) org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:381) org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82) org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845) org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60) org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:101) org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62) com.sun.proxy.$Proxy881.invoke(Unknown Source) org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207) org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164) com.sun.proxy.$Proxy1063.getAlertScheduleForTrip(Unknown Source) com.myclient.ejb.MyEntityLoadingBean.loadMyEntities(MyEntityLoadingBean.java:256) ... 

Can JBoss be said to avoid using its serialization module and use standard Java serialization instead? This error seems to have been known in JBoss JIRA for several years: https://issues.jboss.org/browse/JBSER-120

I tried to launch JBoss with -Dserialization.jboss=false , but that didn’t work (I think this can only work with JBoss cache).

+4
source share

Source: https://habr.com/ru/post/1486143/


All Articles