0

我正在尝试使用嵌入式 tomcat 运行一个 Web 应用程序,其中包括许多 Spring Batch 作业和 Spring Batch 管理员。但是,当我尝试运行生成的 fat jar 时,出现以下错误,弹簧批处理或引导团队的任何人都可以提供帮助:

Error registering Tomcat:j2eeType=WebModule,name=//localhost/*,J2EEApplication=none,J2EEServer=none

添加更多信息: Spring Boot 版本:1.1.9.RELEASE from spring.io parent pom version 1.0.3.RELEASE 我尝试从 STS 运行它以及使用 mvn spring-boot:run 具有相同的效果。批处理作业从文件中读取并写入 hornetq。

完整的堆栈跟踪如下:

2014-11-14 14:22:45.236 ERROR 404 --- [ost-startStop-1] org.apache.tomcat.util.modeler.Registry  : Error registering Tomcat:j2eeType=WebModule,name=//localhost/*,J2EEApplication=none,J2EEServer=none`

javax.management.RuntimeOperationsException: null
    at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:411)`
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)`
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)    
    at org.apache.tomcat.util.modeler.Registry.registerComponent(Registry.java:742)
    at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:158)
    at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:61)
    at org.apache.catalina.core.ContainerBase.initInternal(ContainerBase.java:1084)
    at org.apache.catalina.core.StandardContext.initInternal(StandardContext.java:6506)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Repository: cannot add mbean for pattern name Tomcat:j2eeType=WebModule,name=//localhost/*,J2EEApplication=none,J2EEServer=none
    ... 19 common frames omitted
4

1 回答 1

0

我假设该名称不是有效的对象名称://localhost/*

您能否尝试使用其他名称,或者转义或引用该名称。这应该可以解决问题。

于 2017-02-09T14:08:52.103 回答