任何人都可以帮我解决问题吗?
我的com.intel.esg.ecp.cli.Command连接到JMX,并找到MXBean com.acme.AcmeManager,它假设调用createObject来创建AcmeObject。
AcmeManager和AcmeObject都设计为MXBean,我发布了没有问题。
堆栈是否意味着AcmeObject不确认MXBean标准或AcmeManager不确认MXBean标准? 我是JMX MXBean的新手,有人可以给我一些有用的资料吗?
由于
Executing 'createObject' ...
ERROR: Cannot make MXBean proxy for com.acme.AcmeManager: java.io.InvalidObjectException: Do not know how to make a com.acme.Acme from a CompositeData: no method from(CompositeData); no constructor has @ConstructorProperties
annotation; does not have a public no-arg constructor; contains methods other than getters (getStatus)
java.lang.IllegalArgumentException: Cannot make MXBean proxy for com.acme.AcmeManager: java.io.InvalidObjectException: Do not know how to make a com.acme.AcmeObject from a CompositeData: no method from(CompositeData); no
constructor has @ConstructorProperties annotation; does not have a public no-arg constructor; contains methods other than getters (getStatus)
at javax.management.MBeanServerInvocationHandler.findMXBeanProxy(MBeanServerInvocationHandler.java:323)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:247)
at $Proxy18.createObject(Unknown Source)
at com.acme.cli.commands.tenant.CreateTenantCommand.implExecute(CreateTenantCommand.java:71)
at com.intel.esg.ecp.cli.Command.execute(Command.java:64)
at com.intel.esg.ecp.cli.CLI.execute(CLI.java:332)
at com.acme.cli.commands.Main.main(Main.java:174)
Caused by: java.io.InvalidObjectException: Do not know how to make a com.acme.AcmeObject from a CompositeData: no method from(CompositeData); no constructor has @ConstructorProperties annotation; does not have a public no-arg
constructor; contains methods other than getters (getStatus)
at com.sun.jmx.mbeanserver.OpenConverter.invalidObjectException(OpenConverter.java:1403)
at com.sun.jmx.mbeanserver.OpenConverter$CompositeConverter.makeCompositeBuilder(OpenConverter.java:891)
at com.sun.jmx.mbeanserver.OpenConverter$CompositeConverter.checkReconstructible(OpenConverter.java:897)
at com.sun.jmx.mbeanserver.OpenConverter$CollectionConverter.checkReconstructible(OpenConverter.java:663)
at com.sun.jmx.mbeanserver.ConvertingMethod.checkCallToOpen(ConvertingMethod.java:94)
at com.sun.jmx.mbeanserver.MXBeanProxy$Visitor.visitAttribute(MXBeanProxy.java:53)
at com.sun.jmx.mbeanserver.MXBeanProxy$Visitor.visitAttribute(MXBeanProxy.java:48)
at com.sun.jmx.mbeanserver.MBeanAnalyzer.visit(MBeanAnalyzer.java:53)
at com.sun.jmx.mbeanserver.MXBeanProxy.<init>(MXBeanProxy.java:45)
at javax.management.MBeanServerInvocationHandler.findMXBeanProxy(MBeanServerInvocationHandler.java:319)
... 6 more
~>
答案 0 :(得分:0)
来自文档
MXBean概念提供了一种仅对MBean进行编码的简单方法 引用一组预定义的类型,由...定义 javax.management.openmbean中。通过这种方式,你可以确定你的 任何客户端(包括远程客户端)都可以使用MBean 客户端可以访问特定于模型的类的任何要求 代表MBean的类型。
显然, com.acme.Acme 和 com.acme.AcmeObject 是自定义类型,并且它们不定义与opendata类型之间的转换。有关详细信息,请参阅OpenData type mapping rules。