Scenario: When running web-app & server-app with a common jar on single glassfish domain (same vm)
When calling a serer-app EJB using a remote call from a web-app and passing it a composite object (of type com.my.Class) that is defined in the common jar, it succeeds.
When making the same call, but putting the composite object (of type com.my.Class) into a value of a java.util.Map (tried TreeMap and Hashtable) of it fails with error below. The class in question com.my.Class is Serializable and also has the serialVersionUID set.
When running web-app & server-app on separate servers (different domains) then it works fine.
If the same composite object is returned from the server app in the EJB call then it returns fine and this also works if a Map is returned that contains the composite object.
It seems as if it has something to do with the fact that each application contains a copy of the jar containing (com.my.Class) - thats running in the same VM. Is this a problem with class loading?
At the moment the only way around it is to remove the common jar from the apps and to add it to %glassfish_home%\lib.
Anyone knows how to fix this - maybe a code change - without having to influence the structure of the deployed ears/wars.
"IOP00810257: (MARSHAL) Could not load class com.my.Class"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9684)
....
org.omg.CORBA.MARSHAL: ----------BEGIN server-side stack trace----------
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9684)
[Message sent by forum member 'malvernp' (malvernp)]
http://forums.java.net/jive/thread.jspa?messageID=317584