bladex-boot war包部署,tomcat启动报错

Blade 未结 2 810
lcey
lcey 剑圣 2022-07-07 11:26

一、该问题的重现步骤是什么?

1. 添加tomcat依赖

<!-- tomcat -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>


2. 排除undertow依赖

<!-- Blade -->
<dependency>
    <groupId>org.springblade</groupId>
    <artifactId>blade-core-boot</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springblade</groupId>
            <artifactId>blade-core-cloud</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-undertow</artifactId>
        </exclusion>
    </exclusions>
</dependency>


3.修改打包类型为war

<groupId>org.springblade</groupId>
<artifactId>BladeX-Boott</artifactId>
<packaging>war</packaging>
<version>2.6.1.RELEASE</version>


4.添加war包插件

<!-- tomcat -->
<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <!--如果想在没有web.xml文件的情况下构建WAR,请设置为false。-->
        <failOnMissingWebXml>false</failOnMissingWebXml>
    </configuration>
</plugin>


5.Application类修改

@EnableScheduling
@SpringBootApplication
public class Application extends SpringBootServletInitializer {

   @Override
   protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
      return BladeApplication.createSpringApplicationBuilder(CommonConstant.APPLICATION_NAME, Application.class).sources(Application.class);
   }

   public static void main(String[] args) {
      BladeApplication.run(CommonConstant.APPLICATION_NAME, Application.class, args);
   }

}


二、你期待的结果是什么?实际看到的又是什么?

能够在Tomcat中直接进行调试和发布


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladex-boot

版本:2.6.1.RELEASE

部署在centos7

tomcat版本:8.5.40


四、请提供详细的错误堆栈信息,这很重要。

10:16:44.665 [http-nio-8080-exec-24] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [dev]

----启动中,读取到的环境变量:[dev],jar地址:[/usr/local/tomcat/webapps/xywj/WEB-INF/classes/]----

                   ______  _             _       ___   ___

                   | ___ \| |           | |      \  \ /  /

                   | |_/ /| |  __ _   __| |  ___  \  V  /

                   | ___ \| | / _` | / _` | / _ \   > <

                   | |_/ /| || (_| || (_| ||  __/ /  .  \

                   \____/ |_| \__,_| \__,_| \___|/__/ \__\


:: BladeX 2.6.1.RELEASE :: blade-api:dev :: Running SpringBoot 2.1.17.RELEASE :: 


2022-07-07 10:16:46.772  INFO 1 --- [io-8080-exec-24] o.s.boot.SpringApplication               : The following profiles are active: dev

2022-07-07 10:16:50.637  INFO 1 --- [io-8080-exec-24] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2022-07-07 10:16:50.642  INFO 1 --- [io-8080-exec-24] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.

2022-07-07 10:16:50.854  INFO 1 --- [io-8080-exec-24] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 186ms. Found 0 Redis repository interfaces.

2022-07-07 10:16:51.225  WARN 1 --- [io-8080-exec-24] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[org.springblade]' package. Please check your configuration.

2022-07-07 10:16:51.585  INFO 1 --- [io-8080-exec-24] o.s.cloud.context.scope.GenericScope     : BeanFactory id=c69ed208-a776-30ed-8832-469900ef3f87

2022-07-07 10:16:51.606  INFO 1 --- [io-8080-exec-24] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor init.

2022-07-07 10:16:51.607  INFO 1 --- [io-8080-exec-24] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor process @BladePropertySource bean.

2022-07-07 10:16:53.574  INFO 1 --- [io-8080-exec-24] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)

07-Jul-2022 10:16:53.577 INFO [http-nio-8080-exec-24] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

07-Jul-2022 10:16:53.577 INFO [http-nio-8080-exec-24] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat]

07-Jul-2022 10:16:53.577 INFO [http-nio-8080-exec-24] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.40

07-Jul-2022 10:16:53.609 INFO [localhost-startStop-1] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.5.2].

07-Jul-2022 10:16:53.610 INFO [localhost-startStop-1] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

07-Jul-2022 10:16:53.610 INFO [localhost-startStop-1] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

07-Jul-2022 10:16:53.610 INFO [localhost-startStop-1] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0j  20 Nov 2018]

07-Jul-2022 10:16:53.677 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappLoader.startInternal LifecycleException 

java.lang.ClassNotFoundException: org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader

at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:507)

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:392)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5082)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

07-Jul-2022 10:16:53.678 SEVERE [Tomcat-startStop-1] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

... 6 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [WebappLoader[]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5082)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 6 more

Caused by: org.apache.catalina.LifecycleException: start: 

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:417)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 8 more

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader

at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:507)

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:392)

... 9 more

07-Jul-2022 10:16:53.682 SEVERE [http-nio-8080-exec-24] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)

at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:105)

at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86)

at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416)

at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5225)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1644)

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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1553)

at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:289)

at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:207)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)

at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)

at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

... 1 more

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 6 more

Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)

... 8 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

... 6 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [WebappLoader[]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5082)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 6 more

Caused by: org.apache.catalina.LifecycleException: start: 

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:417)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 8 more

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader

at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:507)

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:392)

... 9 more

07-Jul-2022 10:16:53.686 INFO [http-nio-8080-exec-24] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]

07-Jul-2022 10:16:53.686 INFO [http-nio-8080-exec-24] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat]

07-Jul-2022 10:16:53.686 INFO [http-nio-8080-exec-24] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]

2022-07-07 10:16:53.721  WARN 1 --- [io-8080-exec-24] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

2022-07-07 10:16:53.739  INFO 1 --- [io-8080-exec-24] ConditionEvaluationReportLoggingListener : 


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2022-07-07 10:16:53.746 ERROR 1 --- [io-8080-exec-24] o.s.boot.SpringApplication               : Application run failed


org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)

at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)

at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5225)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1644)

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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1553)

at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:289)

at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:207)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)

at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)

at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:124)

at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86)

at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416)

at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153)

... 59 common frames omitted

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.startup.Tomcat.start(Tomcat.java:427)

at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:105)

... 64 common frames omitted

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 66 common frames omitted

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 68 common frames omitted

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 70 common frames omitted

Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)

... 72 common frames omitted

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

... 1 common frames omitted

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 6 common frames omitted

Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)

... 8 common frames omitted

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

... 6 common frames omitted

Caused by: org.apache.catalina.LifecycleException: Failed to start component [WebappLoader[]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5082)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 6 common frames omitted

Caused by: org.apache.catalina.LifecycleException: start: 

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:417)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 8 common frames omitted

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader

at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:507)

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:392)

... 9 common frames omitted


07-Jul-2022 10:16:53.747 SEVERE [http-nio-8080-exec-24] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/xywj]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1644)

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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1553)

at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:289)

at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:207)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)

at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)

at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

2条回答
  • 2022-07-08 12:50

    这个帖子的步骤已经得到提问用户的反馈是能成功的:https://sns.bladex.cn/q-6813.html

    所以你可能是其他地方配置不对,看下这样处理是否能成功:https://blog.csdn.net/qq_38157516/article/details/82156449

    0 讨论(0)
  • 2022-07-08 17:46

    建议官方把maven改成gradle。如果用gradle只需要添加war包的打包方式即可,都不要修改代码,直接就可以打成jar包或者war包。

    maven有点落后了,用gradle会更好

    0 讨论(0)
提交回复