You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Dennis Thrysoe - Netnord A/S <dt...@netnord.dk> on 2000/06/29 10:58:19 UTC
Problem in XMLSerializer (1.2.1)
Hi,
I recently tried changing from Xerces-J 1.0.3 to 1.2.1, but I am
experiencing the following problem with XMLSerializer:
java.lang.IllegalStateException SER002 No writer supplied for serializer
It worked before, and I am passing it a Writer object in the constructor.
Any ideas?
-dennis
RE: Problem in XMLSerializer (1.2.1): Solved
Posted by Dennis Thrysoe - Netnord A/S <dt...@netnord.dk>.
I gave the constructor a Writer, so that couldn't be it.
I found the problem though. Even though XMLSerializer exposes all the
methods of the ContentHandler interface, it only works if asContentHandler()
is called first. Perhaps this should be documented?
-dennis
> The serialize code changed and it now *requires* you to set the
> output stream (or writer) before using it for serialization.
> Assaf Arkin can give you more information on the implementation.
Re: Problem in XMLSerializer (1.2.1)
Posted by Andy Clark <an...@apache.org>.
Dennis Thrysoe - Netnord A/S wrote:
> I recently tried changing from Xerces-J 1.0.3 to 1.2.1, but I am
> experiencing the following problem with XMLSerializer:
>
> java.lang.IllegalStateException SER002 No writer supplied for serializer
>
> It worked before, and I am passing it a Writer object in the constructor.
The serialize code changed and it now *requires* you to set the
output stream (or writer) before using it for serialization.
Assaf Arkin can give you more information on the implementation.
--
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org