Marshall exception when calling a remote business method in EJB

Hi,

From a java client, i am calling a business method from a ejb. the home and remote interface object is sucessfully received at the client. but at the time of calling the remote business method the following error occurs.

java.rmi.RemoteException: ; nested exception is:

weblogic.rmi.ServerException: A remote exception occurred while executing the method on the

remote object

- with nested exception:

[weblogic.rmi.MarshalException: error marshalling return

- with nested exception:

[java.io.NotSerializableException: java.util.Vector$1]]

java.io.NotSerializableException: java.util.Vector$1

the business method returns an enumeration object.

How to solve this?

-chidam

[768 byte] By [chidambaresh] at [2007-9-26 2:18:31]
# 1
An enumeration is a "view" of another object, such as a Vector or a Hashtable. An Enumeration is not serializable. It is an interface.
misterph at 2007-6-29 9:19:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

hi chidambaresh,

you could have sent this to me directly.

the Enumeration si an interface and so the object we get during the runtime is basically an object of some implementation of this interface.

the Enumeration you get from HAshtable is actually Serializable.

but the Enumeration you actually get from Vector (this is actaully an inner class of Vector viz., Vector$1) is not serializable. that is what the error you are getting.

regards

Srinivasan.R

(VAMSOFT)

vams00 at 2007-6-29 9:19:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

I am accepting a interface as a parameter but seems to produce an error when the remote method executes this :

SessionBean.process(ICommand aCmd)

But works woith a concrete class like this :

SessionBean.process(CreateCmd aCmd)

anybody know why pls?

glenn_dickson@hotmail.com

glenn_dickson at 2007-6-29 9:19:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...