当前位置: 首页 > 知识库问答 >
问题:

启动子部署spring boot web应用程序到Tomcat 9时出错

赵鸿畴
2023-03-14
15-Apr-2020 07:21:01.022 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/9.0.22
15-Apr-2020 07:21:01.025 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jul 4 2019 14:20:06 UTC
15-Apr-2020 07:21:01.025 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.22.0
15-Apr-2020 07:21:01.026 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
15-Apr-2020 07:21:01.026 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-1062.12.1.el7.x86_64
15-Apr-2020 07:21:01.026 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
15-Apr-2020 07:21:01.026 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
15-Apr-2020 07:21:01.026 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_242-b08
15-Apr-2020 07:21:01.026 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
15-Apr-2020 07:21:01.026 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat
15-Apr-2020 07:21:01.027 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat
15-Apr-2020 07:21:01.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
15-Apr-2020 07:21:01.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
15-Apr-2020 07:21:01.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
15-Apr-2020 07:21:01.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
15-Apr-2020 07:21:01.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
15-Apr-2020 07:21:01.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
15-Apr-2020 07:21:01.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024M
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
15-Apr-2020 07:21:01.029 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
15-Apr-2020 07:21:01.303 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
15-Apr-2020 07:21:01.333 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-8443"]
15-Apr-2020 07:21:01.528 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
15-Apr-2020 07:21:01.530 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [714] milliseconds
15-Apr-2020 07:21:01.555 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
15-Apr-2020 07:21:01.555 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.22]
15-Apr-2020 07:21:01.566 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/opt/tomcat/conf/Catalina/localhost/manager.xml]
15-Apr-2020 07:21:01.603 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase [/opt/tomcat/webapps/manager] inside the host appBase has been specified, and will be ignored
15-Apr-2020 07:21:01.816 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/opt/tomcat/conf/Catalina/localhost/manager.xml] has finished in [250] ms
15-Apr-2020 07:21:01.817 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/WebDeploy.war]
log4j:WARN No appenders could be found for logger (org.springframework.jndi.JndiTemplate).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.6.RELEASE)

15-Apr-2020 07:21:09.882 SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/opt/tomcat/webapps/WebDeploy.war]
        java.lang.IllegalStateException: Error starting child
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
                at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
                at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
                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:936)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
                at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
                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:498)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebDeploy]]
                at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
                ... 37 more
        Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/server/RequestLog$Writer
                at java.lang.Class.getDeclaredConstructors0(Native Method)
                at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
                at java.lang.Class.getDeclaredConstructors(Class.java:2020)
                at org.springframework.boot.context.properties.ConfigurationPropertiesBindConstructorProvider.findConstructorBindingAnnotatedConstructor(ConfigurationPropertiesBindConstructorProvider.java:62)
                at org.springframework.boot.context.properties.ConfigurationPropertiesBindConstructorProvider.getBindConstructor(ConfigurationPropertiesBindConstructorProvider.java:48)
                at org.springframework.boot.context.properties.ConfigurationPropertiesBean$BindMethod.forType(ConfigurationPropertiesBean.java:311)
                at org.springframework.boot.context.properties.ConfigurationPropertiesBeanDefinitionValidator.validate(ConfigurationPropertiesBeanDefinitionValidator.java:63)
                at org.springframework.boot.context.properties.ConfigurationPropertiesBeanDefinitionValidator.postProcessBeanFactory(ConfigurationPropertiesBeanDefinitionValidator.java:45)
                at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:286)
                at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:174)
                at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706)
                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
                at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
                at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
                at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
                at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
                at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:152)
                at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:132)
                at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:92)
                at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5132)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.RequestLog$Writer
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
                ... 60 more
15-Apr-2020 07:21:09.886 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/WebDeploy.war] has finished in [8,069] ms
15-Apr-2020 07:21:09.887 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/ROOT]
15-Apr-2020 07:21:09.902 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/ROOT] has finished in [15] ms
15-Apr-2020 07:21:09.902 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/docs]
15-Apr-2020 07:21:09.914 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/docs] has finished in [11] ms
15-Apr-2020 07:21:09.914 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/examples]
15-Apr-2020 07:21:10.098 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/examples] has finished in [184] ms
15-Apr-2020 07:21:10.099 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/host-manager]
15-Apr-2020 07:21:10.117 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/host-manager] has finished in [18] ms
15-Apr-2020 07:21:10.122 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
15-Apr-2020 07:21:10.136 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-jsse-nio-8443"]
15-Apr-2020 07:21:10.141 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
15-Apr-2020 07:21:10.144 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [8,613] milliseconds
  • 服务器Tomcat版本:9.0.22
  • 服务器Java主页:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
  • 服务器JVM版本:1.8.0_242-B08
  • 我的应用程序正在使用:jre1.8.0_191
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'

共有1个答案

包建义
2023-03-14

您的项目需要来自jetty库的org.eclipse.jetty.server.requestlog$writer

检查正在传递任何jetty库的父依赖项并排除它:

mvn dependency:tree
 类似资料:
  • 我正在尝试将我的应用程序部署到Heroku,但似乎存在一些问题。每次我尝试: 我的heroku日志告诉我,我的应用程序崩溃了,我错过了“调试器”宝石。我在Heroku上找到了这条线索和这一页。当我尝试安装“byebug”gem时,bundle告诉我它不会安装在Ruby 1.9.3上,当我按照Heroku的建议将“debugger”gem放在gem文件的开发组中时,我仍然会收到相同的错误。 我也更新

  • 我有一个vuejs应用程序,它是用vue cli设置的,我正在尝试将我的应用程序部署到Heroku。 这是我的服务器: 我从gitignore中删除dist, 我在package.json中添加了一个类似“start”的起始点:“node server.js” 以下是我在控制台看到的内容: 加载资源失败:服务器响应,状态为503(服务不可用)/Favicon.ico:1 以下是heroku日志:

  • 在Heroku上部署Node.js应用程序时,我遇到以下错误。 2017-04-18T18:40:10.158442+00:00APP[Web1]:npm错误!请在任何支持请求中包含以下文件: 2017-04-18T18:40:10.158544+00:00APP[Web1]:npm错误!/app/npm-debug.log 2017-04-18T18:40:10.237236+00:00 Her

  • 我有一个Grails(2.5.3版)应用程序,当我通过选项:要部署的WAR文件在Tomcat中部署时,选择WAR文件,会出现以下错误。如果我尝试一个更简单的应用程序(大小、复杂度等),它运行得很好。 但是,如果在从manager运行应用程序时手动将war文件的内容复制到Tomcat路径:pathTomcat/webapps/myApplication,则效果良好。出现任何错误。 错误: Grail

  • 部署过程中出错:部署应用程序[EnterpriseApplication1]时出现异常:UnsupportedClassVersionError:类mn.interactive.module.meta.dao.MetadataDao的主要或次要版本号不受支持,这些版本号大于Java Runtime Environment版本1.7.0_02中的版本号。有关详细信息,请参阅server.log。 将

  • 我正在使用日食EE朱诺版。我创建了一个动态Web应用程序,该应用程序使用亚马逊简单数据库并停用一些值并向用户显示。我已经安装了使用亚马逊服务的AWS工具包。 我有一个simpleDB账户。 我试着把它部署到AWS Elastic Beanstalk上(通过插件)。它显示我选择服务器。我选择它作为AW豆茎与TOmcat 6(亚太东京)。 一段时间后,它会给出这个错误。 无法将应用程序上传到 Amaz