You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Cédric Viaud <ce...@matrasi-tls.fr> on 2002/08/28 17:34:14 UTC

[OFF-TOPIC] Tomcat 4.0.4 LE, Eclipse, JAXP, JAXB and parsing problem

Hi,

maybe is this off-topic. In case ignore this, and sorry for bothering.

I develop an application running under Tomcat 4.0.4 LE (light edition) wich uses JAXP.

I use JAXP for XML parsing, and XML transformation. It almost work fine for everything.

I also use JAXB to map XML file into Java classes.

The problem is this :
I first read an XML file to populate the JAXB generated classes. I do this using the unmarshall method provided by JAXB. It works well.

Then i select a sub-tree and write it in temporary file. I take care to add the DOCTYPE declaration relative to this subtree in this file. This seems to work fine too because if i validate the temporary file generated (with an XML tool : Excelon stylus), i have no errors.

Next i want to parse this temporary XML file using JAXP. i've done this many times in other applications, and never got any problems, but here, the parse method generate a "SAXException". The "e.getMessage()" return a message saying that the external entity "ipoi.dtd" (which is the DTD for my XML instance) can not be found (i dont put the exact message as it is in french !!). Be sure i have verified many times the path. I've tried to change it, ....
I've also tried to change the usual parse() method by the parse() method with 2 parameters where the second if for indicating base URI for URI resolver. I've think that this could help to find the DTD, but this doesn't help.

I'am thinking about problems with temporary file and Tomcat. Maybe security stuff ?

In fact, the very strange point is here. When i run my application under Tomcat using the Tomcat plugin for Eclipse, it works. When i run the same Web application under Standalone Tomcat, i get the Exception.

Can someone give me some tips ? Some pointers ? Do anyone know a mailing list where i could ask ?

Thanks for help, regards,

   Cédric



Re: [OFF-TOPIC] Tomcat 4.0.4 LE, Eclipse, JAXP, JAXB and parsing problem

Posted by skraaatch <sk...@thenumnum.net>.
the only pointer i can give is that i heard there are conflicts in the jars
relating to xml processing - jaxp was specifically mentioned.
so as always it's a classpath problem. perhaps make sure you don't have any
other xml processing jars set in your system classpath before running
tomcat. ( i have what might be a similar problem in that i can't start
tomcat that is bundled with the jwsdp1.0 from my IDE but i CAN run the
standalone one.)




----- Original Message -----
From: "Cédric Viaud" <ce...@matrasi-tls.fr>
To: <to...@jakarta.apache.org>
Sent: Wednesday, August 28, 2002 4:34 PM
Subject: [OFF-TOPIC] Tomcat 4.0.4 LE, Eclipse, JAXP, JAXB and parsing
problem


Hi,

maybe is this off-topic. In case ignore this, and sorry for bothering.

I develop an application running under Tomcat 4.0.4 LE (light edition) wich
uses JAXP.

I use JAXP for XML parsing, and XML transformation. It almost work fine for
everything.

I also use JAXB to map XML file into Java classes.

The problem is this :
I first read an XML file to populate the JAXB generated classes. I do this
using the unmarshall method provided by JAXB. It works well.

Then i select a sub-tree and write it in temporary file. I take care to add
the DOCTYPE declaration relative to this subtree in this file. This seems to
work fine too because if i validate the temporary file generated (with an
XML tool : Excelon stylus), i have no errors.

Next i want to parse this temporary XML file using JAXP. i've done this many
times in other applications, and never got any problems, but here, the parse
method generate a "SAXException". The "e.getMessage()" return a message
saying that the external entity "ipoi.dtd" (which is the DTD for my XML
instance) can not be found (i dont put the exact message as it is in french
!!). Be sure i have verified many times the path. I've tried to change it,
....
I've also tried to change the usual parse() method by the parse() method
with 2 parameters where the second if for indicating base URI for URI
resolver. I've think that this could help to find the DTD, but this doesn't
help.

I'am thinking about problems with temporary file and Tomcat. Maybe security
stuff ?

In fact, the very strange point is here. When i run my application under
Tomcat using the Tomcat plugin for Eclipse, it works. When i run the same
Web application under Standalone Tomcat, i get the Exception.

Can someone give me some tips ? Some pointers ? Do anyone know a mailing
list where i could ask ?

Thanks for help, regards,

   Cédric





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>