Tomcat 未启动 > java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27222249/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 04:00:14  来源:igfitidea点击:

Tomcat Not starting up> java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina

javatomcat

提问by Abdul Wahid

I am unable to start the tomcat 5.5 server due to following error message in the stderr.log. Can someone please help me, it is kind of emergency. Thanks in advance.

由于 stderr.log 中出现以下错误消息,我无法启动 tomcat 5.5 服务器。有人可以帮我吗,这是一种紧急情况。提前致谢。

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina   
at java.net.URLClassLoader.run(URLClassLoader.java:200)   
at java.security.AccessController.doPrivileged(Native Method)   
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)   
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)   
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)    
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:222)   
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410)    

回答by Aryan

I was facing the same issue. Then I noticed that I have accidentally deleted lib folder from tomcat directory. The issue got resolved as lib folder back in place.

我面临着同样的问题。然后我注意到我不小心从 tomcat 目录中删除了 lib 文件夹。问题得到解决,因为 lib 文件夹回到原位。

回答by Douy789

I faced the same issue and stacktrace using 8.5.11 tomcat. updating to tomcat 8.5.24 solved the issue.

我使用 8.5.11 tomcat 遇到了同样的问题和堆栈跟踪。更新到 tomcat 8.5.24 解决了这个问题。

回答by noob

From my experience, I have observed that tomcatsometimes throws this when there are project dependent jars (could be transitively dependent as well) missing, or not being pointed to properly, or corrupted. So, please check the health of the jars deployed in the server and their dependencies. For example, if you are using mavento build your project jars, you could once clear the .m2/repositoryand rebuild the project and deploy again.

根据我的经验,我观察到tomcat有时会在项目依赖 jar(也可能是传递依赖)丢失、未正确指向或损坏时抛出此问题。因此,请检查部署在服务器中的 jars 及其依赖项的健康状况。例如,如果您正在使用maven构建您的项目 jar,您可以一次清除.m2/repository并重建项目并再次部署。

回答by Abdul Wahid

The problem was resolved by adding ejb.jar file into Tomcat/lib folder which is the dependency package to startup.

通过将ejb.jar文件添加到Tomcat/lib文件夹中解决了该问题,该文件夹是要启动的依赖包。

回答by Prabakaran

Sometimes, even though all the necessary things are perfect, this error would be reported if there is user VM arguments enclosed with the double quotes, I spent a day to get rid of this. check in run --> run configuration, in arguments tab, VM Arguments, check for the user entries is enclosed with quotes/spaces, if so remove it and 'Run'

有时,即使所有必要的东西都很完美,但如果有用户 VM 参数用双引号括起来,就会报告此错误,我花了一天的时间来摆脱这个错误。签入运行 --> 运行配置,在参数选项卡,VM 参数中,检查用户条目是否用引号/空格括起来,如果是,请将其删除并“运行”

回答by Ritesh Jung Thapa

In my case I changed catatina.properties file found in tomcat_directory/conf from

在我的情况下,我将在 tomcat_directory/conf 中找到的 catatina.properties 文件从

common.loader='${catalina.base}/lib','${catalina.base}/lib/*.jar','${catalina.home}/lib','${catalina.home}/lib/*.jar'

To

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

However the file always used to get overwritten. I was using eclipse. So, I did the same change in the Servers Project in eclipse. In my case it was Servers/Tomact v9.0 Server/catalina.properties. I did the same change stated above in this file too. It worked for me.

然而,该文件总是被覆盖。我正在使用日食。所以,我在 eclipse 中的 Servers Project 中做了同样的改变。就我而言,它是 Servers/Tomact v9.0 Server/catalina.properties。我也在这个文件中做了同样的改变。它对我有用。