javax.management.NotCompliantMBeanException:类未公开管理接口:java.lang.Object

时间:2019-01-03 11:41:01

标签: jboss jms jboss5.x ejb-2.x jboss-messaging

我们正在从JBoss-4.0.4-GA迁移到JBoss-5.1.0-GA。当我启动JBoss时,出现以下错误:

org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.messaging:service=Queue,name=MyQueueTest
Caused by: javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object

我有一个链接ERROR: Class does not expose a management interface,上面说要添加一些库,但是没有指定在何处添加哪个库。以下是destination-service.xml

下的mbean
<mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging:service=Queue,name=MyQueueTest">
    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
    <depends>jboss.messaging:service=PostOffice</depends>
    <attribute name="MessageCounterHistoryDayLimit">-1</attribute>
    <attribute name="SecurityConf">
        <security>
            <role name="guest" read="true" write="true"/>
            <role name="publisher" read="true" write="true" create="false"/>
            <role name="noacc" read="false" write="false" create="false"/>
        </security>
    </attribute>
</mbean>

1 个答案:

答案 0 :(得分:0)

此问题已解决。我检查了用于在JBoss-5.1.0-GA中定义队列的虚拟示例。我缺少属性 xmbean-dd =“ xmdesc / Queue-xmbean.xml” 。更改后,结果如下所示:

<mbean code="org.jboss.jms.server.destination.QueueService"
 name="jboss.messaging:service=Queue,name=MyQueueTest"
 xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="MessageCounterHistoryDayLimit">-1</attribute>
<attribute name="SecurityConf">
  <security>
    <role name="guest" read="true" write="true"/>
    <role name="publisher" read="true" write="true" create="false"/>
    <role name="noacc" read="false" write="false" create="false"/>
  </security>
</attribute>