[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dumping
On Mon, 13 Nov 2000, Lars Martin wrote:
> On Mon, 13 Nov 2000 11:56:48 +0100
> Falko Braeutigam <falko@smb-tec.com> wrote:
>
> > On Mon, 13 Nov 2000, Alex Ang wrote:
> > > Hi
> > > I was trying to dump file after i added the test.xml
> > > to the server but i get this error...
> > > can someone help me???
> > >
> > > C:\ozone\samples\XML>ojvm Client dump test.xml
> > > Dump: filename=test.xml -> target=#stdout
> > > Exception in thread "main"
> > > java.lang.IllegalStateException: SER002 No writer sup
> > > plied for serializer
> > > at
> > > org.apache.xml.serialize.XMLSerializer.startDocument(XMLSerializer.ja
> > > va:352)
> > > at
> > > org.ozoneDB.xml.util.SAXChunkConsumer.processChunk(SAXChunkConsumer.j
> > > ava:121)
> > > at
> > > org.ozoneDB.xml.util.XMLContainer.extractSAX(XMLContainer.java:422)
> > > at Client.dump(Client.java:335)
> > > at Client.main(Client.java:159)
> >
> > This is just a bug in the sample code but I don't know how to fix it. It
> > appeared after updating xerces.jar. The sample uses the following code which
> > was okay for the older xerces:
> >
> > import org.apache.xml.serialize.*;
> >
> > ...
> >
> > PrintWriter writer = new PrintWriter( System.out, false );
> > XMLSerializer serializer = new XMLSerializer( writer, new OutputFormat( "xml", "UTF-8", true ) );
> >
> > container.extractSAX( serializer, null, depth );
> >
> > Can someone more familiar with xerces hep us out here?
>
> Try to call
>
> ContentHandler ch = serializer.asContentHandler();
> container.extractSAX (ch, null, depth);
>
> instead of passing the "uninitialized" serializer to the container method.
That worked. Thanks. It's in CVS.
Falko
--
______________________________________________________________________
Falko Braeutigam mailto:falko@smb-tec.com
SMB GmbH http://www.smb-tec.com
- References:
- Dumping
- From: Alex Ang <baztaz_ang@yahoo.com>
- Re: Dumping
- From: Falko Braeutigam <falko@smb-tec.com>
- Re: Dumping
- From: Lars Martin <lars@smb-tec.com>