3 Replies Latest reply on May 1, 2002 11:49 AM by fstarsinic

    Help with my first Mbean please.

    rixc

      Hi,

      I am attempting my first Mbean and I would appreciate a little guidance please. I read the online documentation
      http://www.jboss.org/online-manual/HTML/ch13s26.html#howto.mbeans.config
      regarding implementing a custom Service.

      What it fails to mentions is where I need to place my completed. In /deploy or /lib/ext? Does it need to be in its own seperate jar file?

      Ricardo

        • 1. Re: Help with my first Mbean please.
          visva

          I also have the same problem. If I have the implementation class in a separate jar and add it as part of the classpath, I get the following exception:

          java.lang.NoClassDefFoundError: org/jboss/util/ServiceMBeanSupport

          Please advice.

          Thanks in advance,

          Visva.

          [Configuration] Could not create MBean DefaultDomain:jndiName=NotApplicable,serv
          ice=JBossStartIB(com.d2k.ib.appcontroller.JBossStartIB)
          [Configuration] java.lang.NoClassDefFoundError: org/jboss/util/ServiceMBeanSupport
          [Configuration] at java.lang.ClassLoader.defineClass0(Native Method)
          [Configuration] at java.lang.ClassLoader.defineClass(ClassLoader.java:48
          6)
          [Configuration] at java.security.SecureClassLoader.defineClass(SecureCla
          ssLoader.java:111)
          [Configuration] at java.net.URLClassLoader.defineClass(URLClassLoader.ja
          va:248)
          [Configuration] at java.net.URLClassLoader.access$100(URLClassLoader.jav
          a:56)
          [Configuration] at java.net.URLClassLoader$1.run(URLClassLoader.java:195
          )
          [Configuration] at java.security.AccessController.doPrivileged(Native Me
          thod)
          [Configuration] at java.net.URLClassLoader.findClass(URLClassLoader.java
          :188)
          [Configuration] at java.lang.ClassLoader.loadClass(ClassLoader.java:297)

          [Configuration] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
          ava:286)
          [Configuration] at java.lang.ClassLoader.loadClass(ClassLoader.java:290)

          [Configuration] at java.lang.ClassLoader.loadClass(ClassLoader.java:253)

          [Configuration] at com.sun.management.jmx.MBeanServerImpl.findClass(MBea
          nServerImpl.java:2466)
          [Configuration] at com.sun.management.jmx.MBeanServerImpl.createMBean(MB
          eanServerImpl.java:751)
          [Configuration] at org.jboss.configuration.ConfigurationService.create(C
          onfigurationService.java:579)
          [Configuration] at org.jboss.configuration.ConfigurationService.loadConf
          iguration(ConfigurationService.java:381)
          [Configuration] at java.lang.reflect.Method.invoke(Native Method)
          [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
          rverImpl.java:1628)
          [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
          rverImpl.java:1523)
          [Configuration] at org.jboss.Main.(Main.java:202)
          [Configuration] at org.jboss.Main$1.run(Main.java:116)
          [Configuration] at java.security.AccessController.doPrivileged(Native Me
          thod)
          [Configuration] at org.jboss.Main.main(Main.java:112)
          [Service Control] Initializing 51 MBeans

          • 2. Re: Help with my first Mbean please.
            visva

            It works if I put the classes inside the %JBOSS_DIST%\lib\ext directory. Is there any way to have it outside the JBOSS directory

            Thanks,
            visva.

            • 3. Re: Help with my first Mbean please.
              fstarsinic

              you can add your own jar files to the jboss classpath
              by editing jboss.conf and add an mlet to point to where your favorite jar files are such as ....

              c:\java\jars

              that's what i do. i put all my jars in a separate location
              instead of inside of jboss. then i add them to the classpath by adding the following line of code ...






              hope that helps.

              frank