Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization problem using JBossSerialization #56

Closed
koebbingd opened this issue Jan 31, 2013 · 4 comments
Closed

Serialization problem using JBossSerialization #56

koebbingd opened this issue Jan 31, 2013 · 4 comments

Comments

@koebbingd
Copy link

Using JBossObjectOutputStream and JBossObjectInputStream results in an EOFException.
The main problem is that trying to call an EJB3-method on a bean in another EAR on a jboss server (jboss as 5.1) results in an IOException:

at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1119)
... 66 more
Caused by: java.io.IOException: field code 0 is not supposed to be on the wire
at com.typesafe.config.impl.SerializedConfigValue.readCode(SerializedConfigValue.java:414)
at com.typesafe.config.impl.SerializedConfigValue.readOrigin(SerializedConfigValue.java:218)
at com.typesafe.config.impl.SerializedConfigValue.readValue(SerializedConfigValue.java:392)
at com.typesafe.config.impl.SerializedConfigValue.readExternal(SerializedConfigValue.java:453)
at org.jboss.serial.persister.ExternalizePersister.readData(ExternalizePersister.java:72)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
at org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:101)
at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:52)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy1483.invoke(Unknown Source)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
... 80 more

Unfortunately I haven't been able to figure out exactly why the exception occurs.
Using a newer version of jboss-serialization is no solution...

@havocp
Copy link
Collaborator

havocp commented Jan 31, 2013

If you can narrow it down to a problem with the config lib and give me a test case, I can look at it. It looks more likely to be a bug in jboss though?

@koebbingd
Copy link
Author

Normal (complex) classes can be serialized/deserialized with JBoss-serialization so I gather it's a problem with the way the config library handles it.
Btw.: config is a great lib!

@havocp
Copy link
Collaborator

havocp commented Jan 31, 2013

We are using writeReplace(), which is part of how Java serialization works, but if JBoss is reimplementing serialization or something like that, maybe they didn't handle it correctly? It isn't a commonly-used feature perhaps. I don't know anything about what jboss might be doing here so I'm just speculating.

@havocp
Copy link
Collaborator

havocp commented Sep 20, 2013

I'm not sure how to make progress here without a test case, but willing to look at it if someone can help me pin it down.

@havocp havocp closed this as completed Sep 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants