File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Serializing Iterators? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Serializing Iterators?" Watch "Serializing Iterators?" New topic

Serializing Iterators?

Nick Head

Joined: May 10, 2002
Posts: 2
Just got this error message from my client code:
No Serializer found to serialize 'java.util.Iterator'
I noticed that Iterator is not one of the datatypes that has a built-in serializer. So does anyone have any good ideas of how to do this?
Hopefully it won't involve having to write a custom serializer...
[ May 10, 2002: Message edited by: Nick Head ]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12676
There is a good reason - Iterator is an interface. You need to redesign your application so it doesn't try to serialize an Iterator. Maybe send an array or a Vector?

Java Resources at
Nick Head

Joined: May 10, 2002
Posts: 2
thanks for that
I was trying to use a BeanSerializer, and as it is out of the question to modify the application, looks like I'll have to write a custom serializer after all.
[ May 12, 2002: Message edited by: Nick Head ]
I agree. Here's the link:
subject: Serializing Iterators?
Similar Threads
Another name for this language....
Can't return an Element in an RPC (despite having read the documentation)
Is This Valid JSON?
File into object stream