java.lang.ClassNotFoundException:org / apache / xerces / jaxp / DocumentBuilderFactoryImpl [英] java.lang.ClassNotFoundException: org/apache/xerces/jaxp/DocumentBuilderFactoryImpl

查看:304
本文介绍了java.lang.ClassNotFoundException:org / apache / xerces / jaxp / DocumentBuilderFactoryImpl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在启动一个基于Java和tomcat的应用程序。我收到以下错误。

I am starting a java and tomcat based application. I am getting the following error.

Dec 08, 2015 12:04:00 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '50' did not find a matching property.
Dec 08, 2015 12:04:00 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '50' did not find a matching property.
Dec 08, 2015 12:04:01 PM org.apache.tomcat.util.digester.Digester endElement
WARNING:   No rules found matching 'Server/Service/Realm'.
Dec 08, 2015 12:04:01 PM org.apache.tomcat.util.digester.Digester endElement
WARNING:   No rules found matching 'Server/Service/Host'.
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:200)
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:152)
        at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:232)
        at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:120)
        at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListener.java:431)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:99)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:576)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Caused by: java.lang.ClassNotFoundException: org/apache/xerces/jaxp/DocumentBuilderFactoryImpl
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:124)
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:188)
        ... 16 more

我已经检查了所有配置文件。

I have checked all the configuration file. Any lead is appreciated.

推荐答案

看来,这是由在命令中使用 java代理引起的。运行catalina -javaagent = ... 很奇怪。给我们

Got this, appears it was caused by the use of a "java agent" in the command that runs catalina -javaagent=... weird. Gave us

Caused by: java.lang.ClassNotFoundException: org/apache/xerces/jaxp/DocumentBuilderFactoryImpl

有时也给我们这样:

Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassNotFoundException: org.apache.logging.log4j.jcl.LogFactoryImpl (Caused by java.lang.ClassNotFoundException: org.apache.logging.log4j.jcl.LogFactoryImpl)
    at org.apache.commons.logging.LogFactory.createFactory(LogFactory.java:1276)
    at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:1065)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:1062)
    at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:497)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    at org.apache.struts.validator.DynaValidatorForm.<clinit>(DynaValidatorForm.java:97)
    ... 31 more
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.jcl.LogFactoryImpl
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
    at org.apache.commons.logging.LogFactory.createFactory(LogFactory.java:1131)
    ... 37 more

修复:暂时删除java代理参数,然后启动良好。
可能的解决方案:使其能够登录到其日志文件(权限)吗?

Fix: temporarily remove java agent parameter, then started up well. Possible fix: make it so it can log to its log file (permissions)?

这篇关于java.lang.ClassNotFoundException:org / apache / xerces / jaxp / DocumentBuilderFactoryImpl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆