Sometimes, when starting Tomcat I get an error when JAXP is trying to
load the DocumentBuilderFactory. Tomcat does not start completely. This
doesn't always happen, and when it does I can restart the server and it
is fine. I turned on JAXP debugging and noticed that when I had the
problem, JAXP was finding a system property specifying that xerces
should be used:
INFO: Starting Coyote HTTP/1.1 on http-8580
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: found system property,
value=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:24
0)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFact
ory.java:129)
at
org.apache.commons.modeler.util.DomUtil.readXml(DomUtil.java:242)
at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(Mb
eansDescriptorsDOMSource.java:88)
at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescri
ptors(MbeansDescriptorsDOMSource.java:78)
at org.apache.commons.modeler.Registry.load(Registry.java:792)
at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:901)
at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:882)
at
org.apache.commons.modeler.Registry.findDescriptor(Registry.java:961)
at
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:666)
at
org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1015)
at
org.apache.commons.modeler.Registry.registerComponent(Registry.java:832)
at
org.apache.catalina.connector.Connector.start(Connector.java:1077)
at
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
... 12 more
When Tomcat loads fine, it appears that system property is not set and
it is (successfully) falling back on the default:
INFO: Initializing Coyote HTTP/1.1 on http-8580
Jan 4, 2010 8:58:29 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 460 ms
JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
ClassLoader: null
Jan 4, 2010 8:58:29 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 4, 2010 8:58:29 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.28
I have only one webapp in this instance of Tomcat. It does have xerces
JARs in its WEB-INF/lib directory, but of course Tomcat doesn't look
there when it is loading. I can't figure out how the system property is
being set.
I am using Tomcat 5.5.28, Java 1.6.0_07 64-bit on Oracle Linux (RHEL)
5.2.
Any help is appreciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]