tomcat部署jenkins访问错误404

tomcat部署jenkins访问错误404,第1张

tomcat部署jenkins访问错误404

tomcat部署jenkins访问错误404
    • tomcat版本原因,我用的tomcat10,最后换成9就可以正常访问jenkins

版本信息:tomcat版本:apache-tomcat-10.0.12 java版本:jdk11
将jenkins.war放入webapps下,启动tomcat访问失败,提示404,查看logs/localhost.2021-10-20.log发现报错:

20-Oct-2021 20:46:17.801 信息 [Thread-3] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
20-Oct-2021 20:46:17.801 信息 [Thread-3] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
20-Oct-2021 20:46:31.584 严重 [main] org.apache.catalina.core.StandardContext.listenerStart 配置应用程序监听器[jenkins.util.SystemProperties$Listener]错误
	java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
		at java.base/java.lang.ClassLoader.defineClass1(Native Method)
		at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
		at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
		at org.apache.catalina.loader.WebappClassLoaderbase.findClassInternal(WebappClassLoaderbase.java:2516)
		at org.apache.catalina.loader.WebappClassLoaderbase.findClass(WebappClassLoaderbase.java:872)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1408)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1252)
		at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:539)
		at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:520)
		at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
		at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4640)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.Containerbase.addChildInternal(Containerbase.java:726)
		at org.apache.catalina.core.Containerbase.addChild(Containerbase.java:698)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1027)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2001)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:828)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:478)
		at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1708)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:320)
		at org.apache.catalina.util.Lifecyclebase.fireLifecycleEvent(Lifecyclebase.java:123)
		at org.apache.catalina.util.Lifecyclebase.setStateInternal(Lifecyclebase.java:423)
		at org.apache.catalina.util.Lifecyclebase.setState(Lifecyclebase.java:366)
		at org.apache.catalina.core.Containerbase.startInternal(Containerbase.java:946)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:886)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.Containerbase$StartChild.call(Containerbase.java:1396)
		at org.apache.catalina.core.Containerbase$StartChild.call(Containerbase.java:1386)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.Containerbase.startInternal(Containerbase.java:919)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
	Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1444)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1252)
		... 51 more
20-Oct-2021 20:46:31.586 严重 [main] org.apache.catalina.core.StandardContext.listenerStart 配置应用程序监听器[hudson.WebAppMain]错误
	java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
		at java.base/java.lang.ClassLoader.defineClass1(Native Method)
		at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
		at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
		at org.apache.catalina.loader.WebappClassLoaderbase.findClassInternal(WebappClassLoaderbase.java:2516)
		at org.apache.catalina.loader.WebappClassLoaderbase.findClass(WebappClassLoaderbase.java:872)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1408)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1252)
		at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:539)
		at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:520)
		at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
		at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4640)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.Containerbase.addChildInternal(Containerbase.java:726)
		at org.apache.catalina.core.Containerbase.addChild(Containerbase.java:698)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1027)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2001)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:828)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:478)
		at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1708)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:320)
		at org.apache.catalina.util.Lifecyclebase.fireLifecycleEvent(Lifecyclebase.java:123)
		at org.apache.catalina.util.Lifecyclebase.setStateInternal(Lifecyclebase.java:423)
		at org.apache.catalina.util.Lifecyclebase.setState(Lifecyclebase.java:366)
		at org.apache.catalina.core.Containerbase.startInternal(Containerbase.java:946)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:886)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.Containerbase$StartChild.call(Containerbase.java:1396)
		at org.apache.catalina.core.Containerbase$StartChild.call(Containerbase.java:1386)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.Containerbase.startInternal(Containerbase.java:919)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
	Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1444)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1252)
		... 51 more
20-Oct-2021 20:46:31.588 严重 [main] org.apache.catalina.core.StandardContext.listenerStart 配置应用程序监听器[jenkins.JenkinsHttpSessionListener]错误
	java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionListener
		at java.base/java.lang.ClassLoader.defineClass1(Native Method)
		at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
		at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
		at org.apache.catalina.loader.WebappClassLoaderbase.findClassInternal(WebappClassLoaderbase.java:2516)
		at org.apache.catalina.loader.WebappClassLoaderbase.findClass(WebappClassLoaderbase.java:872)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1408)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1252)
		at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:539)
		at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:520)
		at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
		at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4640)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.Containerbase.addChildInternal(Containerbase.java:726)
		at org.apache.catalina.core.Containerbase.addChild(Containerbase.java:698)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1027)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2001)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:828)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:478)
		at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1708)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:320)
		at org.apache.catalina.util.Lifecyclebase.fireLifecycleEvent(Lifecyclebase.java:123)
		at org.apache.catalina.util.Lifecyclebase.setStateInternal(Lifecyclebase.java:423)
		at org.apache.catalina.util.Lifecyclebase.setState(Lifecyclebase.java:366)
		at org.apache.catalina.core.Containerbase.startInternal(Containerbase.java:946)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:886)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.Containerbase$StartChild.call(Containerbase.java:1396)
		at org.apache.catalina.core.Containerbase$StartChild.call(Containerbase.java:1386)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.Containerbase.startInternal(Containerbase.java:919)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
		at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:795)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
	Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpSessionListener
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1444)
		at org.apache.catalina.loader.WebappClassLoaderbase.loadClass(WebappClassLoaderbase.java:1252)
		... 51 more
20-Oct-2021 20:46:31.588 严重 [main] org.apache.catalina.core.StandardContext.listenerStart 由于以前的错误,已跳过安装应用程序侦听器
20-Oct-2021 20:46:32.013 信息 [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
20-Oct-2021 20:46:32.013 信息 [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
20-Oct-2021 20:46:32.014 信息 [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@20797dcc')

提示错误:

`严重 [main] org.apache.catalina.core.StandardContext.listenerStart 配置应用程序监听器[jenkins.util.SystemProperties$Listener]错误
严重 [main] org.apache.catalina.core.StandardContext.listenerStart 配置应用程序监听器[hudson.WebAppMain]错误
严重 [main] org.apache.catalina.core.StandardContext.listenerStart 由于以前的错误,已跳过安装应用程序侦听器

原因:

tomcat版本原因,我用的tomcat10,最后换成9就可以正常访问jenkins

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4664856.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-06
下一篇 2022-11-06

发表评论

登录后才能评论

评论列表(0条)

保存