You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frank Lawlor <fr...@athensgroup.com> on 2001/06/18 16:19:32 UTC

Finding the XML parser in Tomcat

In my VisualAge Java development environemnt (jdk 1.2.2) I can say, for
example,

Parser parser =
ParserFactory.makeParser("org.apache.xerces.parsers.SAXParser");

but when I deploy to a standalone Tomcat environment, I get a class not
found on the parser name, even tho I put the jar in Tomcat's WEB-INF\lib
directory.

If I put the jar into jre\lib\ext, it is found, but having to put it there
is more imposition on the user and requires extra work beyond normal web app
deployment (just putting the WAR file in the webapps dir).
Further, If I put the jar there, then programs that use the no parameter
form
   Parser parser = ParserFactory.makeParser();
then start to throw an error:
  Null Pointer Exception: sax.parser is null
This can break other applications!

Why will it not find the parser in the Tomcat WEB-INF\lib directory?
Is this an XML, jdk, Tomcat issue or what?
If I add the XML lib to jre\lib\ext, what/how system properties must be set?

Thanks,
-- Frank


Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.