You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ben Rometsch <be...@blueyonder.co.uk> on 2001/06/19 16:08:10 UTC

Tomcat 3.2.2 and Xerces

Hi There,

I'm new to the group - apologies if this has been asked 100 times before.

I'm writing a web application that parses an XML file with SAX in order to
retrieve database connection details. The beans responsible for this make
use of the xerces XML parser. Testing the beans in JBuilder, everything
works fine.

When I compile the class files and attempt to invoke the methods through a
jsp page in Tomcat, it throws a java.lang.NoClassDefFoundError error.

I've been scouring Deja and the tomcat documentation. It sounds like I can't
use another XML parser on top of the one tomcat uses to parse its
configuration information. Is this correct? If this is the case, is the only
solution to re-write the SAX parser bean to make use of JAXP?

Thanks in advance,
Ben
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.262 / Virus Database: 132 - Release Date: 12/06/2001


RE: Tomcat 3.2.2 and Xerces

Posted by Chris McNeilly <cm...@smartbrief.com>.
Sorry.  Asleep at the wheel.  I didn't see this earlier.

The problem is that Tomcat uses a different xml parser than xerces and
there is a version conflict of some sort that I knew back when I had the
problem  but have since forgotten.

To fix, the easiest way is to modify the tomcat.bat or tomcat.sh file in
the way the CLASSPATH is created.  Simply put your CLASSPATH defs before
the ones that are added by the script.  There should be a line like this

CP = CP + CLASSPATH

just flip it around

CP = CLASSPATH + CP

excuse the non-standard syntax, but hopefully you get the idea.  This
lets xerces be found first and the world is good.

Chris

> -----Original Message-----
> From: Sam Newman [mailto:sam.newman@stamplets.com]
> Sent: Tuesday, June 19, 2001 10:22 AM
> To: tomcat-user@jakarta.apache.org; ben.rometsch@blueyonder.co.uk
> Subject: Re: Tomcat 3.2.2 and Xerces
>
>
> If it was an inbuilt limitation of Tomcat, I wouldn't expect to see a
> ClassDefNotFoundException....are you sure you've put your
> xerces parser .jar
> file in the WEB-INF/lib directory of your webapp?
> Also Mail Archive does have a search facility for this list.
> Its pretty crap
> but its better than nothing :-)
>
> sam
> ----- Original Message -----
> From: "Ben Rometsch" <be...@blueyonder.co.uk>
> To: <to...@jakarta.apache.org>
> Sent: Tuesday, June 19, 2001 3:08 PM
> Subject: Tomcat 3.2.2 and Xerces
>
>
> > Hi There,
> >
> > I'm new to the group - apologies if this has been asked 100
> times before.
> >
> > I'm writing a web application that parses an XML file with
> SAX in order to
> > retrieve database connection details. The beans responsible
> for this make
> > use of the xerces XML parser. Testing the beans in
> JBuilder, everything
> > works fine.
> >
> > When I compile the class files and attempt to invoke the
> methods through a
> > jsp page in Tomcat, it throws a
> java.lang.NoClassDefFoundError error.
> >
> > I've been scouring Deja and the tomcat documentation. It
> sounds like I
> can't
> > use another XML parser on top of the one tomcat uses to parse its
> > configuration information. Is this correct? If this is the
> case, is the
> only
> > solution to re-write the SAX parser bean to make use of JAXP?
> >
> > Thanks in advance,
> > Ben
> <snip>
>
>


Re: Tomcat 3.2.2 and Xerces

Posted by Sam Newman <sa...@stamplets.com>.
If it was an inbuilt limitation of Tomcat, I wouldn't expect to see a
ClassDefNotFoundException....are you sure you've put your xerces parser .jar
file in the WEB-INF/lib directory of your webapp?
Also Mail Archive does have a search facility for this list. Its pretty crap
but its better than nothing :-)

sam
----- Original Message -----
From: "Ben Rometsch" <be...@blueyonder.co.uk>
To: <to...@jakarta.apache.org>
Sent: Tuesday, June 19, 2001 3:08 PM
Subject: Tomcat 3.2.2 and Xerces


> Hi There,
>
> I'm new to the group - apologies if this has been asked 100 times before.
>
> I'm writing a web application that parses an XML file with SAX in order to
> retrieve database connection details. The beans responsible for this make
> use of the xerces XML parser. Testing the beans in JBuilder, everything
> works fine.
>
> When I compile the class files and attempt to invoke the methods through a
> jsp page in Tomcat, it throws a java.lang.NoClassDefFoundError error.
>
> I've been scouring Deja and the tomcat documentation. It sounds like I
can't
> use another XML parser on top of the one tomcat uses to parse its
> configuration information. Is this correct? If this is the case, is the
only
> solution to re-write the SAX parser bean to make use of JAXP?
>
> Thanks in advance,
> Ben
<snip>


Tomcat 3.2.2 Vs Tomcat3.1.1

Posted by Govind Agarwal <ga...@cisco.com>.
Hi all,

I am using Tomcat 3.1.1 with IIS and want to upgrade my application to 3.2.2
version.

Any Info on the major changes to be done for this would be helpful.

Thanks in Advance
Govind