如何在Websphere ND 8.5中运行spring batch admin

时间:2016-09-11 03:00:26

标签: spring websphere spring-batch jmx spring-batch-admin

有人真的设法在Websphere 8.5 ND中运行Spring Batch Admin吗?我花了50个小时在Websphere ND 8.5中运行最简单的Spring Batch Admin,我可以找到其他任何可以尝试修复的内容

"创建名称为“mbeanExporter”的bean时出错' ...无法使用密钥“积分MBExporter'”注册MBean [org.springframework.integration.monitor.IntegrationMBeanExporter@65e7255d]。 "

请注意,看完我在foruns中找到的所有内容之后,我已经完成了所有工作:

1)Spring Batch on Clustered environment - Websphere 它说SpringBatch不支持任何集群执行方式。好吧,我不依赖于集群执行,也不依赖于任何计划。我只是尝试启动Spring Batch管理控制台,然后设置此类integrationMBeanExporter错误。换句话说,我没有看到启动Spring Batch Admin所以我没有触发任何工作。

2)https://jira.spring.io/browse/BATCHADM-169 它说两个有趣的陈述,但它们都没有改变错误 (2.1) - 使用类加载顺序到PARENT_LAST。我为服务器和应用程序做了它。没有错误的变化。 (2.2) - 使用这里找到的确切jar版本http://docs.spring.io/spring-batch-admin/spring-batch-admin-sample/dependencies.html。我正在使用它。事实上,我正在尝试使用Spring Batch Admin(spring-batch-admin-sample)中提供的示例,它包含了这样的jar版本。在我的本地Websphere Liberty Profile中,这样的示例spring-batch-admin-sample运行完美,但在部署到Websphere ND时,它给出了相同的integrationMBeanExporter错误

3 - https://www.intertech.com/Blog/spring-batch-admin-tutorial/ 我按照这样的分步教程进行操作,我可以在本地Websphere Liberty Profile中运行,但在Websphere ND中运行时会出现相同的integrationMBeanExporter错误。

4 - 当我向其部署两个Spring Batch Admin时,我可以在本地Websphere Liberty Profile中重现相同的integrationMBeanExporter错误。好吧,为了确保它不是问题,我从Websphere ND Server中删除了所有其他应用程序,只剩下一个Spring Batch Admin。相同的integrationMBeanExporter引发。

5 - 在我的本地Websphere Liberty中,我修复了当我遵循Deploying two Spring batch applications in same cluster in a single Weblogic Domain?中的建议时,由于有两个Spring Batch Admin而导致的integrationMBeanExporter问题。我的意思是,我创造了

<int-jmx:mbean-export id="integrationMBeanExporter" default-domain="SpringBatchAdmin" server="mbeanServer" />
<context:mbean-export default-domain="SpringBatchAdmin" server="mbeanServer" />

在我的本地WAS Liberty中的两个应用程序之一,然后它解决了问题并允许我在同一服务器中打开两个Spring Batch Admin。好吧,再次,在Websphere ND中,我已经删除了除了Spring Batch Admin之外的所有应用程序,所以我尝试的方式并没有对我有多大意义,而且根本没有改变错误。

似乎我可以在不同的Websphere ND 8.5.5的任何Web容器中轻松启动和运行SPring Batch Admin。我想,但我不确定是否存在某种通过简单配置修复此类错误的方法,但我可以想象还有什么可以尝试。

整个错误:

[9/10/16 14:32:40:484 CDT]     FFDC Exception:org.springframework.beans.factory.BeanCreationException SourceId:com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated ProbeId:1341 Reporter:com.ibm.ws.webcontainer.webapp.WebAppImpl@a2268c26

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mbeanExporter':

Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException:

Unable to register MBean [org.springframework.integration.monitor.IntegrationMBeanExporter@65e7255d] with key 'integrationMBeanExporter';

nested exception is javax.management.RuntimeOperationsException

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)

                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)

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

                at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)

                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)

                at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1704)

                at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:411)

                at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)

                at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)

                at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)

                at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)

                at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)

                at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)

                at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)

                at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)

                at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2195)

                at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477)

                at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603)

                at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2200)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)

                at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:984)

                at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)

                at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)

Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.springframework.integration.monitor.IntegrationMBeanExporter@65e7255d] with key 'integrationMBeanExporter'; nested exception is javax.management.RuntimeOperationsException

                at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:610)

                at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:535)

                at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:417)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

                ... 37 more

Caused by: javax.management.RuntimeOperationsException

                at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:567)

                at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)

                at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:663)

                at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:600)

                ... 41 more

Caused by: javax.management.JMRuntimeException: java.lang.reflect.UndeclaredThrowableException

                at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:242)

                at javax.rmi.CORBA.Util.mapSystemException(Util.java:78)

                at com.ibm.ws.management._ControlAdminService_Stub.activateProxyMBean(_ControlAdminService_Stub.java:168)

                at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:515)

                at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)

                at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:663)

                at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:600)

                at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:535)

                at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:417)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)

                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)

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

                at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)

                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)

                at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1704)

                at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:411)

                at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)

                at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)

                at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)

                at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)

                at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)

                at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)

                at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)

                at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)

                at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2195)

                at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477)

                at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603)

                at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)

                at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2200)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)

                at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)

                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:984)

                at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)

                at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)

Caused by: java.lang.reflect.InvocationTargetException

                at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)

                at java.lang.reflect.Method.invoke(Method.java:620)

                at com.ibm.ws390.orb.RIRProtectedProxyHandler.invoke(RIRProtectedProxyHandler.java:192)

                at com.sun.proxy.$Proxy3._invoke(Unknown Source)

                at com.ibm.ws390.orb.CommonBridge.invoke(CommonBridge.java:1898)

                at com.ibm.ws390.orb.ORBEJSBridge.invoke(ORBEJSBridge.java:286)

                at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)

                at java.lang.reflect.Method.invoke(Method.java:620)

                at com.ibm.ws390.orb.parameters.ORBEJSBridgeInvoke.ORBEJSBridgeInvokeParmSetter(ORBEJSBridgeInvoke.java:234)

Caused by: org.omg.CORBA.portable.UnknownException:   vmcid: 0x0  minor code: 0 completed: Maybe

                at com.ibm.ws.management._ControlAdminServiceImpl_Tie._invoke(_ControlAdminServiceImpl_Tie.java:123)

1 个答案:

答案 0 :(得分:0)

我的项目中有类似的问题,花了将近一周的时间来确定原因,我的案例中的根本原因只是因为添加了依赖。

   <dependency>
       <groupId>com.ibm.websphere.appserver.runtime</groupId>
           <artifactId>com.ibm.ws.admin.client</artifactId>
        <version>7.0.0</version>
    </dependency>

上面的依赖项在tomcat中运行正常,但在WAS Liberty服务器中却没有。

<exclusions>
     <exclusion>
        <artifactId>com.ibm.ws.webservices.thinclient_7.0.0</artifactId>
        <groupId>serverwas85</groupId>
    </exclusion>
</exclusions>

希望这会解决您的问题。(由于此排除特定于我的应用程序添加为参考,如果有人遇到类似问题。如果您没有任何此类相对依赖,请忽略它)