0

我们正在从 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

我得到一个链接错误:类没有公开一个管理界面,它说要添加一些库,但它没有指定在哪里添加哪个库。以下是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>
4

1 回答 1

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>

于 2019-01-07T04:33:41.053 回答