Receiving errors when marshalling with multiple deployments
Issue
- We have a class with overwritten
readObject
andwriteObject
and during marshalling we get an exception inreadObject
: - With transfer objects duplicated, indicating multiple deployments, with each containing an ejb and calling the other the following error is noticed:
Caused by: java.lang.IllegalArgumentException: Can not set com.jboss.examples.Field field
com.jboss.examples.Custom.field to com.jboss.examples.Field
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164) [rt.jar:1.7.0_17]
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168) [rt.jar:1.7.0_17]
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) [rt.jar:1.7.0_17]
at java.lang.reflect.Field.set(Field.java:680) [rt.jar:1.7.0_17]
at org.jboss.marshalling.cloner.SerializingCloner.storeFields(SerializingCloner.java:368)
at org.jboss.marshalling.cloner.SerializingCloner.access$700(SerializingCloner.java:87)
at org.jboss.marshalling.cloner.SerializingCloner$StepObjectInputStream.defaultReadObject(SerializingCloner.java:592)
at com.jboss.examples.Custom.readObject(EngineStatusCustom.java:41) [driver.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]
at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:218)
at org.jboss.marshalling.cloner.SerializingCloner.initSerializableClone(SerializingCloner.java:302)
at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:253)
at org.jboss.marshalling.cloner.SerializingCloner.clone(SerializingCloner.java:134)
at org.jboss.as.ejb3.remote.LocalEjbReceiver.clone(LocalEjbReceiver.java:268) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
... 70 more
-
The scenario is not working when jdom.jar is placed inside an EAR and it only works when the jar from JBoss is included and used.
-
The exception that pops up is,
javax.ejb.EJBException: java.lang.RuntimeException: JBAS014154: Failed to marshal EJB parameters
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.0.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.