我遇到了与tomcat服务器有关的错误。我关闭了我的服务器(花了一段时间)然后当启动服务器时,出现错误:
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.amadeus.security.CCDVAccess@2a9cce4a] with key 'CCDVAccess'; nested exception is javax.management.InstanceAlreadyExistsException: com.amadeus.security:name=CCDVAccess
org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:625)
org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:550)
org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:432)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:795)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:632)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1627)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:830)
org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:639)
org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:617)
org.apache.tomcat.util.net.SecureNio2Channel$1.completed(SecureNio2Channel.java:873)
org.apache.tomcat.util.net.SecureNio2Channel$1.completed(SecureNio2Channel.java:806)
sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
sun.nio.ch.Invoker$2.run(Invoker.java:218)
sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
我知道错误与代码无关,因为没有任何改变。 我试试
我不知道我还应该尝试什么,所以我希望你们中的一些人能够了解这一点。我真的认为问题来自tomcat,但我不确定。
感谢您的帮助 塞巴斯蒂安
编辑:我解决了我的问题,这是一个愚蠢的错误。我在没有更改扩展名的情况下备份了我的WAR文件...因此,tomcat启动了2个相同的服务器。 谢谢你的帮助
答案 0 :(得分:1)
似乎你在同一个JVM中有两个Spring Boot应用程序,所以你需要隔离MBean命名空间。 第一个日志错误告诉你。
org.springframework.jmx.export.UnableToRegisterMBeanException:Unable 用密钥注册MBean [com.amadeus.security.CCDVAccess@2a9cce4a] 'CCDVAccess';嵌套异常是 javax.management的 InstanceAlreadyExistsException异常 即可。: com.amadeus.security:name=CCDVAccess
进一步澄清 https://github.com/spring-cloud/spring-cloud-config/issues/118