0 Replies Latest reply on Jun 23, 2004 1:48 PM by pedrosalazar

    deploy jmx in jboss:

    pedrosalazar

      Greetings,

      I'm unable to deploy a MBEAN in JBOSS.

      1)I created a class that implements a interface

      2)I created a jboss-service.xml

      a) I inserted xmbean-dd attribute (generated by xdoclet)

      <server>
       <classpath codebase="deploy" archives="interfaces-slr.jar"/> -->
       <mbean code="pt.ptinovacao.nginpro.uif.slr.jmx.SLRPrivateAccountCache"
       name="jboss:service=SLRPACacheService" xmbean-dd="META-INF/pt/ptinovacao/nginpro/uif/slr/jmx/SLRPrivateAccountCache.xml"
       >
       </mbean>
      </server>
      


      b) I add no xmbean attribute

      <server>
       <classpath codebase="deploy" archives="interfaces-slr.jar"/>
      
       <mbean code="pt.ptinovacao.nginpro.uif.slr.jmx.SLRPrivateAccountCache"
       name="jboss:service=SLRPACacheService"
       >
       </mbean>
      </server>
      


      3) I packed the files in a SAR with jboss-service.xml in META-INF

      4) When I deploy I get the following errors a) and b) (see 2)

      a)
      2004-06-23 12:37:20,173 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/usr/local/jboss-3.2.3/server/all/deploy/jmx-slr.sar
      2004-06-23 12:37:20,179 INFO [org.jboss.deployment.SARDeployer] nested deployment: file:/usr/local/jboss-3.2.3/server/all/tmp/deploy/tmp23891jmx-slr.sar-contents/jmx-slr.jar
      2004-06-23 12:37:20,210 WARN [org.jboss.mx.server.registry.BasicMBeanRegistry] MBeanException: preRegister() failed [ObjectName='jboss:service=SLRPACacheService', Class=org.jboss.mx.modelmbean.XMBean (org.jboss.mx.modelmbean.XMBean@1562f00)]
      Cause: ReflectionException: null
      Cause: javax.management.IntrospectionException: no method found for operation: setMaxSize
      2004-06-23 12:37:20,212 WARN [org.jboss.util.NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
      2004-06-23 12:37:20,212 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/usr/local/jboss-3.2.3/server/all/deploy/jmx-slr.sar
      org.jboss.deployment.DeploymentException: create operation failed for package file:/usr/local/jboss-3.2.3/server/all/deploy/jmx-slr.sar; - nested throwable: (org.jboss.deployment.DeploymentException: - nested throwable: (ReflectionException: null
      Cause: javax.management.IntrospectionException: no method found for operation: setMaxSize))
      


      b)
      2004-06-23 12:40:36,600 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/usr/local/jboss-3.2.3/server/all/deploy/jmx-slr.sar
      2004-06-23 12:40:36,606 INFO [org.jboss.deployment.SARDeployer] nested deployment: file:/usr/local/jboss-3.2.3/server/all/tmp/deploy/tmp23892jmx-slr.sar-contents/jmx-slr.jar
      2004-06-23 12:40:36,620 WARN [org.jboss.util.NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
      2004-06-23 12:40:36,620 ERROR [org.jboss.deployment.MainDeployer] could not crea
      te deployment: file:/usr/local/jboss-3.2.3/server/all/deploy/jmx-slr.sar
      org.jboss.deployment.DeploymentException: create operation failed for package file:/usr/local/jboss-3.2.3/server/all/deploy/jmx-slr.sar; - nested throwable: (or
      g.jboss.deployment.DeploymentException: Class does not expose a management interface: pt.ptinovacao.nginpro.uif.slr.jmx.SLRPrivateAccountCache; - nested throwab
      le: (javax.management.NotCompliantMBeanException: Class does not expose a management interface: pt.ptinovacao.nginpro.uif.slr.jmx.SLRPrivateAccountCache))
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:202)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
       at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      


      What's wrong? I would like to deploy a simple JMX in my jboss. I need to know exactly what is the configuration and the way of deploy, besides the the interface plus the jmx implementation.

      Thanks,
      Pedro Salazar