Hi,

Looks like there's may be another copy of the Jaxp classes somewhere in the 
classpath..Please try the following:

1. Use the startup scripts that come with tomcat 4.0.1. These unset the CLASSPATH 
environment variables and crete custom variables for 
Tomcat's startup.

2.Check to see if you're having any older Xerces or (Crimson+Jaxp) jars files in 
$JAVA_HOME/lib/ext

3. Remove all instances of the files xerces.jar, parser.jar, crimson.jar and jaxp.jar 
from where ever you have placed them in the $CATALINA_HOME  
sub directories.
        Having done that, place a copy of xerces.jar in $CATALINA_HOME/common/lib
        The xerces.jar file that comes with tomcat 4.0.1 is 1.72 MB in size (1,808,883 
bytes)

4. Just a question, is your app also bundling Xerces/crimson ? Look for the jars in 
the WIB-INF/lib sub-directory.


Sriram

1/12/02 11:17:36 PM, Mark <[EMAIL PROTECTED]> wrote:

>I'm attempting to port a working application to Tomcat 4.0.1 and hit a
>problem with SAX parsing.  When this line of code is executed
>
>          SAXParserFactory factory = SAXParserFactory.newInstance();
>
>I got a ClassCastException error:
>
>    java.lang.ClassCastException: org.apache.crimson.jaxp.SAXParserFactoryImpl
>        at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:148)
>
>I looked at the Tomcat archives and tried what the Tomcat documentation
>says to do, eg. move xerces.jar into my WEB-INF directory or into the
>$CATALINA_HOME/lib directory and move crimson.jar and jaxp.jar out.
>Documentation located at
>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html#Tomc
>at%204%20and%20XML%20Parsers   After doing that however, I get the same
>error but from xerces (org.apache.xerces.jaxp.SAXParserFactoryImpl) vs.
>crimson.
>
>Has someone slayed this dragon before?  If so, any help would be greatly
>appreciated.
>
>Mark
>
>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to