Agreed on everything but... *FUNNY FACT*:
An Enumeration (or the newer java.util.Iterator) is an interface, thus,
it can't implement Serializable;
-----Original Message-----
From: Avi Kivity [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 01, 2000 11:45 AM
To: [EMAIL PROTECTED]
Subject: Re: Marshalling error in simple bean - please help
> I have a very simple Stateless session bean with a single
> method that returns an Enumeration (created from a Vector) of
> Serializable objects, yet I am getting a marshalling error.
>
[...]
> public Enumeration getResults(Properties criteria)
> {
> // HARD-CODED STUB
>
> Vector v = new Vector();
[...]
> return v.elements();
> }
[...]
> [java.io.IOException: Class java.util.Vector$1 with code=123
> does not implement Serializable, Externalizable or WLSerializable]]
The Enumeration that Vector.elements() returns is not Serializable. Return
the vector itself, or create your own vector Enumeration.
I'd regard this as a defect in java.util.Vector.
- Avi
--
s/\be(\w+)/e-\1/g;
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".