如何注册org.springframework.integration.monitor.IntegrationMBeanExporter [英] how to register org.springframework.integration.monitor.IntegrationMBeanExporter

查看:97
本文介绍了如何注册org.springframework.integration.monitor.IntegrationMBeanExporter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据

According to http://www.ibm.com/support/knowledgecenter/en/SS7K4U_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/cspr_data_access_tran2.html I "... must register the JMX MBeans with the MBeanServer instance of the container manager in the application server. If you do not specify a server property for the MBean, the MBeanExporter object attempts to detect an MBeanServer instance that is running".

我在Internet上搜索时,发现了几个Hello World示例,它们讲述了如何注册已编码的bean.我的情况有些不同.我所问的bean是Spring提供的IntegrationMBeanExporter,我必须在某些Spring Xml Configuration(Spring Batch Admin依赖xml配置而不是Java配置)中注册它.

I search on internet and I found few Hello World examples telling how to register a bean that I have coded. My case is a bit different. The bean in my question is IntegrationMBeanExporter provided by Spring and I must register it in certain Spring Xml Configuration (Spring Batch Admin relying on xml configurations instead of java configurations).

我找不到一个简单的示例.我想这是使用context:mbean-export和int-jmx:mbean-export的东西.请参见下面的内容,但是不幸的是,Websphere ND 8.5.5并未将其生效.

I can't find a simple example how to do it. I guess it is something using context:mbean-export and int-jmx:mbean-export. Kindly, see bellow my tentative but unfortunately it is not taken in effect by Websphere ND 8.5.5.

一个可能的原因是我没有正确填写context:mbean-export和int-jmx:mbean-export,因此在任何服务器上工作的任何示例都将受到高度重视.

A possible reason is that I am not filling in properly context:mbean-export and int-jmx:mbean-export so any example working in any server will be high appreciatted.

我正在使用Websphere,但是如果有人在任何Enterprise Server中授课,那可能是相同的方法.

I am using Websphere but if someone teach in any Enterprise Server it will probably be the same approach.

我的根本动机是解决此错误.我认为,如果我找到了注册org.springframework.integration.monitor.IntegrationMBeanExporter的方法,那肯定会解决我的问题.

My root motivation is to fix this error. I think if I found how to register org.springframework.integration.monitor.IntegrationMBeanExporter it will certainly fix my problem.

错误:

[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)

推荐答案

看起来一切正确.

尽管我们在测试用例中还使用了<context:mbean-server />.

Although we use <context:mbean-server /> in addition in our test-cases.

不确定这是否对您来说是个问题,但是值得以任何方式进行检查.

Not sure if that should be a problem for you, but that it worth to check any way.

另一方面,由于您的项目看起来像Spring4,我感觉您的版本不匹配,但是Spring Batch Admin可能依赖于Spring Integration 3.0.考虑升级到已经基于Spring Intgration 4.1.xspring-batch-admin-2.0.0.M1.

On the other hand I feel somehow that you have versions mismatch there since your project looks like Spring4, but Spring Batch Admin may rely on the Spring Integration 3.0. Consider to upgrade to spring-batch-admin-2.0.0.M1, which is based on the Spring Intgration 4.1.x already.

这篇关于如何注册org.springframework.integration.monitor.IntegrationMBeanExporter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆