当前位置: 代码迷 >> Java Web开发 >>   by:   javax.xml.parsers.FactoryConfigurationError:
  详细解决方案

  by:   javax.xml.parsers.FactoryConfigurationError:

热度:371   发布时间:2016-04-17 13:07:06.0
tomcat错误
我用JBuilder建立了一个项目,里面只有一个jsp页面,运行时出现如下错误,在eclipse中一样,谁遇见过同样的问题帮忙解决下,谢谢


log4j:WARN   No   appenders   could   be   found   for   logger   (org.apache.catalina.startup.Embedded).

log4j:WARN   Please   initialize   the   log4j   system   properly.

java.lang.reflect.InvocationTargetException

at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)

at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at   java.lang.reflect.Method.invoke(Method.java:324)

at   org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)

at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)

Caused   by:   javax.xml.parsers.FactoryConfigurationError:   Provider   org.apache.xerces.jaxp.DocumentBuilderFactoryImpl   not   found

at   javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:99)

at   org.apache.commons.modeler.util.DomUtil.readXml(DomUtil.java:284)

at   org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:130)

at   org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescriptors(MbeansDescriptorsDOMSource.java:120)

at   org.apache.commons.modeler.Registry.load(Registry.java:819)

at   org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)

at   org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)

at   org.apache.commons.modeler.Registry.findDescriptor(Registry.java:992)

at   org.apache.commons.modeler.Registry.findManagedBean(Registry.java:696)

at   org.apache.commons.modeler.Registry.findManagedBean(Registry.java:1047)

at   org.apache.commons.modeler.Registry.registerComponent(Registry.java:859)

at   org.apache.catalina.loader.WebappLoader.init(WebappLoader.java:612)

at   org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:644)

at   org.apache.catalina.core.StandardContext.start(StandardContext.java:4231)

at   org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)

at   org.apache.catalina.core.StandardHost.start(StandardHost.java:789)

at   org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)

at   org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)

at   org.apache.catalina.core.StandardService.start(StandardService.java:480)

at   org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)

at   org.apache.catalina.startup.Catalina.start(Catalina.java:556)

...   6   more



------解决方案--------------------
添加xercesImpl.jar和 xml-apis.jar 到 /WEB-INF/lib;

如果不行,加以下代码:
System.setProperty( "javax.xml.parsers.DocumentBuilderFactory ", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl ");
------解决方案--------------------
启动tomcat是需要一些必要的包的,需要解析xml
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Wed Sep 19 05:49:20 CST 2018
  • 最近登录:Wed Sep 19 05:49:20 CST 2018
  • 最近登录:Wed Sep 19 05:49:20 CST 2018
  • 最近登录:Wed Sep 19 05:49:20 CST 2018
  • 最近登录:Wed Sep 19 05:49:20 CST 2018