springboot get error when server starting in linux

假如想象 提交于 2019-12-07 02:11:51

问题


First, there are two Linux servers. I want to build a redundant web server on two servers.

I installed jre1.8.0 on two servers equally. And I installed the same spring boot war file on two servers equally.

By the way .... Server 1 normally goes up and works normally. Error on server # 2 ....

I've copied war and tomcat on server # 1 to server # 2. I still get an error on server # 2.

The duplication structure is almost the same as all the settings ...

jre path I checked .. 1.8.0 I checked and ..... ha ...... what is the problem?

I can not figure out why the error is only on server 2, because it is the same file with the same settings.

This is the error log.


:: Spring Boot :: (v2.1.0.BUILD-SNAPSHOT)

2018-09-17 16:31:35 [DEBUG] [StartupInfoLogger.java]logStarting(53) : Running with Spring Boot v2.1.0.BUILD-SNAPSHOT, Spring v5.1.0.BUILD-SNAPSHOT

2018-09-17 16:31:35 [INFO ] [SpringApplication.java]logStartupProfileInfo(701) : The following profiles are active: dev

2018-09-17 16:31:35 [ERROR] [LoggingFailureAnalysisReporter.java]report(42) :


APPLICATION FAILED TO START


Description:

An attempt was made to call the method org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V but it does not exist. Its class, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition, is available from the following locations:

jar:file:{path}/WEB-INF/lib/spring-beans-5.1.0.RC3.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class

jar:file:{path}/WEB-INF/lib/spring-beans-5.1.0.BUILD-SNAPSHOT.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class

It was loaded from the following location:

file:{path}/WEB-INF/lib/spring-beans-5.1.0.RC3.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of

org.springframework.beans.factory.annotation.AnnotatedBeanDefinition



17-Sep-2018 16:31:35.890 ½É°¢ [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:

start:

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

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

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

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

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

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

    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

    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: java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V

at org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(AnnotationConfigUtils.java:259) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:228) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:140) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:797) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:421) at org.springframework.boot.SpringApplication.run(SpringApplication.java:340) at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157) at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137) at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91) at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) ... 10 more

17-Sep-2018 16:31:35.892 ½É°¢ [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive {Path}.War java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/url]] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:757) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 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)

17-Sep-2018 16:31:35.893 Á¤º¸ [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive {path}.war has finished in 3,617 ms 17-Sep-2018 16:31:35.894 Á¤º¸ [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory {path}/ROOT 17-Sep-2018 16:31:35.924 Á¤º¸ [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory {path}/ROOT has finished in 30 ms 17-Sep-2018 16:31:35.926 Á¤º¸ [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-5555"] 17-Sep-2018 16:31:35.932 Á¤º¸ [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-4444"] 17-Sep-2018 16:31:35.934 Á¤º¸ [main] org.apache.catalina.startup.Catalina.start Server startup in 3701 ms

来源:https://stackoverflow.com/questions/52382470/springboot-get-error-when-server-starting-in-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!