struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Sax.jar, xml2parser.jar, ... in folder WEB-INF/lib problem
Date Wed, 14 Aug 2002 17:07:07 GMT


On Wed, 14 Aug 2002, Nicolas Compagnon wrote:

> Date: Wed, 14 Aug 2002 15:23:30 +0200
> From: Nicolas Compagnon <nicolas.compagnon@unilog.fr>
> Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> Subject: Sax.jar, xml2parser.jar, ... in folder WEB-INF/lib problem
>
> Hi everybody,
>
> I don't understand why I get the execution error :
> javax.servlet.ServletException: Class org/xml/sax/HandlerBase violates
> loader constraints
> when I try to use the library sax.jar (in WEB-INF/lib) to parse an XML file
> in my struts project. I use the Digester Class to generate some objects.
>

You don't identify what servlet container you're using, but most
containers provide an XML parser for use by web applications already, so
you don't need to include one inside the webapp.  Including *part* of a
parser (i.e. just one of the JAR files) is guaranteed to give you class
loader problems like the one you observed.

Note that none of the Struts webapps include an XML parser, yet they all
use Digester to parse the configuration files.

> Can somebody help me ?
>
> Thanks,
>
> Nicolas Compagnon

Craig


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message