gpt4 book ai didi

java - Tomcat 7 启动问题 : Could not initialize class org. apache.tomcat.util.descriptor.DigesterFactory

转载 作者:行者123 更新时间:2023-11-30 11:22:03 25 4
gpt4 key购买 nike

好的。有一次我让 Tomcat (7) 工作正常。现在不是了。我不知道我可能搞砸了什么。 (但我认为它发生在我在 NetBeans 中设置一个 Web 项目以与 Tomcat 一起工作时。)

我在 OS X 1.8.5 上,使用 Java 1.7.0_51。

我的 catalina.out 看起来像这样:

Feb 23, 2014 5:42:57 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.5.0.
Feb 23, 2014 5:42:57 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Feb 23, 2014 5:42:57 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
Feb 23, 2014 5:42:58 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8089"]
Feb 23, 2014 5:42:58 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1761 ms
Feb 23, 2014 5:42:58 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 23, 2014 5:42:58 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/docs
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/docs
java.lang.ExceptionInInitializerError
at org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:515)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:836)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:382)
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:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
at org.apache.tomcat.util.descriptor.DigesterFactory.idFor(DigesterFactory.java:107)
at org.apache.tomcat.util.descriptor.DigesterFactory.<clinit>(DigesterFactory.java:59)
... 18 more

Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/examples
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/examples
java.lang.NoClassDefFoundError: Could not initialize class org.apache.tomcat.util.descriptor.DigesterFactory
at org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:515)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:836)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:382)
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:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/host-manager
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/host-manager
java.lang.NoClassDefFoundError: Could not initialize class org.apache.tomcat.util.descriptor.DigesterFactory
at org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:515)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:836)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:382)
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:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/manager
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/manager
java.lang.NoClassDefFoundError: Could not initialize class org.apache.tomcat.util.descriptor.DigesterFactory
at org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:515)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:836)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:382)
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:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/ROOT
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory /Users/Edvard/Downloads/apache-tomcat-7.0.52/webapps/ROOT
java.lang.NoClassDefFoundError: Could not initialize class org.apache.tomcat.util.descriptor.DigesterFactory
at org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:515)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:836)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:382)
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:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Feb 23, 2014 5:42:58 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8089"]
Feb 23, 2014 5:42:58 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Feb 23, 2014 5:42:58 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 409 ms

我已经尝试重新安装 Tomcat,但问题仍然存在。如果能得到任何指示,我将不胜感激。

最佳答案

同样的问题发生在我身上。你可能已经下载了你自己的 servlet.jar 文件而不是使用 tomcat 的。检查您的/Library/Java/Extensions/文件夹(或您放置 jar 文件的任何文件夹),并删除 servlet.jar 文件。 Catalina 运行,它现在应该可以工作了

关于java - Tomcat 7 启动问题 : Could not initialize class org. apache.tomcat.util.descriptor.DigesterFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21977030/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com