You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2001/02/22 17:16:33 UTC

Problem using Tomcat4.0 with xerces (actual CVS state)

Hi All,

I am trying to use Tomcat 4.0 with xerces. I had a configuration that
works great a week ago.

I have updated the CVS state and rebuild. Now it does not work.
The file catalina.out contains the following:
+++
Exception during startup processing
java.lang.reflect.InvocationTargetException:
javax.xml.parsers.FactoryConfigurationError:
org.apache.crimson.jaxp.SAXParserFactoryImpl
        at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:95)
        at
org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:224)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
        at
org.apache.catalina.startup.Catalina.execute(Catalina.java:590)
        at
org.apache.catalina.startup.Catalina.process(Catalina.java:177)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:177)       
+++
Why crimson? I want xerces...

Any hints?

Thanks

Jean-frederic

Re: Problem using Tomcat4.0 with xerces (actual CVS state)

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
"Craig R. McClanahan" wrote:
> 
> jean-frederic clere wrote:
> 
> > Hi All,
> >
> > I am trying to use Tomcat 4.0 with xerces. I had a configuration that
> > works great a week ago.
> >
> > I have updated the CVS state and rebuild. Now it does not work.
> 
> Because the output of the build process has been rearranged, you *must* do a
> "build clean" before building in order to have a functional system when you
> are done.

Ok - done -
> 
> >
> > The file catalina.out contains the following:
> > +++
> > Exception during startup processing
> > java.lang.reflect.InvocationTargetException:
> > javax.xml.parsers.FactoryConfigurationError:
> > org.apache.crimson.jaxp.SAXParserFactoryImpl
> >         at
> > javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:95)
> >         at
> > org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:224)
> >         at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
> >         at
> > org.apache.catalina.startup.Catalina.execute(Catalina.java:590)
> >         at
> > org.apache.catalina.startup.Catalina.process(Catalina.java:177)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at
> > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:177)
> > +++
> > Why crimson? I want xerces...
> >
> 
> The default XML parser that Tomcat uses for its own purposes is Crimson
> (specifically, the JAXP 1.1 reference implementation).  For Catalina, any
> JAXP/1.0 compliant parser could be used (replace the jaxp.jar and
> crimson.jar files in the "server/lib" directory to do this).  For Jasper,
> the requirement is compatibility with the JAXP/1.1 APIs, which Crimson does
> not yet completely implement.  Therefore, the parser in the "jasper"
> subdirectory must currently remain Crimson.

I think that the build is not correct, because the result is following:
jakarta@vtxclere:~/jakarta-tomcat-4.0/build > ls -l server/lib
total 2188
-rw-r--r--   1 jakarta  users      498099 Feb 23 10:52 catalina.jar
-rw-r--r--   1 jakarta  users       29809 Feb 23 10:52
jakarta-regexp-1.2.jar
-rw-r--r--   1 jakarta  users       29937 Feb 23 10:52
jakarta-regexp-1.3-dev.jar
-rw-r--r--   1 jakarta  users       25294 Feb 23 10:52 jaxp.jar
-rw-r--r--   1 jakarta  users       30548 Feb 23 10:52 warp.jar
-rw-r--r--   1 jakarta  users     1605266 Feb 23 10:52 xerces.jar
 
The problem is that jaxp.jar should not be there... This should be
arranged in catalina/build.xml.
                               
> 
>  However, nothing stops you from using Xerces in your own web applications
> -- simply include xerces.jar in your WEB-INF/lib directory.  Previously,
> there were problems with "package sealing violations" when you attempt this,
> but these issues have been resolved in the current CVS code.
> 
> >
> > Any hints?
> >
> > Thanks
> >
> > Jean-frederic
> >
> 
> Craig McClanahan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org

Re: Problem using Tomcat4.0 with xerces (actual CVS state)

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
jean-frederic clere wrote:

> Hi All,
>
> I am trying to use Tomcat 4.0 with xerces. I had a configuration that
> works great a week ago.
>
> I have updated the CVS state and rebuild. Now it does not work.

Because the output of the build process has been rearranged, you *must* do a
"build clean" before building in order to have a functional system when you
are done.

>
> The file catalina.out contains the following:
> +++
> Exception during startup processing
> java.lang.reflect.InvocationTargetException:
> javax.xml.parsers.FactoryConfigurationError:
> org.apache.crimson.jaxp.SAXParserFactoryImpl
>         at
> javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:95)
>         at
> org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:224)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
>         at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:590)
>         at
> org.apache.catalina.startup.Catalina.process(Catalina.java:177)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:177)
> +++
> Why crimson? I want xerces...
>

The default XML parser that Tomcat uses for its own purposes is Crimson
(specifically, the JAXP 1.1 reference implementation).  For Catalina, any
JAXP/1.0 compliant parser could be used (replace the jaxp.jar and
crimson.jar files in the "server/lib" directory to do this).  For Jasper,
the requirement is compatibility with the JAXP/1.1 APIs, which Crimson does
not yet completely implement.  Therefore, the parser in the "jasper"
subdirectory must currently remain Crimson.

 However, nothing stops you from using Xerces in your own web applications
-- simply include xerces.jar in your WEB-INF/lib directory.  Previously,
there were problems with "package sealing violations" when you attempt this,
but these issues have been resolved in the current CVS code.

>
> Any hints?
>
> Thanks
>
> Jean-frederic
>

Craig McClanahan