2 Replies Latest reply on Feb 21, 2002 4:20 PM by hblum

    strange errorr on startup "org/jboss/util/ServiceMBeanSuppor

    hblum

      Hi there !


      I want to write a simple startUp service on JBoss 2.4.3. I read the f... manual and I went through the FAQs and I read the buglist. Nothing helps. (I could solve one problem with your forum besides ...)

      I want to write a StartupService using your MBeans:

      I took your example from the forums and changed them a little. The nature of my service is only calling a static startup method. The only problem I head was that the logs told me that JBoss could not find my class. I read your forum and put my service classes in /lib/ext - directory this worked. But still I allways receive the same excception, that JBoss could not find "org/jboss/util/ServiceMBeanSupport". A class with this name is included in the jboss.zip in the /ext/lib -directory.


      ##################################################################
      ##################################################################

      jboss.jcml Snipplet


      ##################################################################
      ##################################################################



      <!-- ==================================================================== -->
      <!-- Add your custom MBeans here -->
      <!-- ==================================================================== -->







      ##################################################################
      ##################################################################


      JBossStartUpMBean

      My interface!
      ##################################################################
      ##################################################################

      package mdm.base.framework.manager.jboss;
      /** The JBossStartUpMBean interface
      * JBoss provides a mechanism to do initialization on start up. It is to provide
      * a system near service (MBean or MLet called) whose init methode is allways called on startup.
      *
      * @author Harald Blum
      * @version 31.01.2002
      *
      */



      public interface JBossStartUpMBean extends org.jboss.util.ServiceMBean
      {
      }


      ##################################################################
      ##################################################################


      JBossStartUpMBean

      My interface!
      ##################################################################
      ##################################################################
      package mdm.base.framework.manager.jboss;

      /**
      * JBoss provides a mechanism to do initialization on start up. It provides
      * a system near service (MBean or MLet called) whose init methode is allways called on startup.
      *
      * @author Harald Blum
      * @version 31.01.2002
      *
      */


      ##################################################################
      ##################################################################


      JBossStartUpMBean

      My implementation !
      ##################################################################
      ##################################################################

      import java.io.InputStream;
      import mdm.base.framework.manager.FrameworkManager;

      // KILL This class is for testing purpose and will never be used!
      //import org.jboss.system.;





      public class JBossStartUp extends org.jboss.util.ServiceMBeanSupport implements JBossStartUpMBean
      {




      public String getName()
      {
      return "JBossStartUp";
      }


      /** The start methode is called after all MBeans have been
      initiated.
      */
      public void startService() throws Exception
      {
      FrameworkManager fm = FrameworkManager.getInstance();


      }

      public void stopService()
      {
      // does explicitly nothing
      }

      }


      ##################################################################
      ##################################################################


      JBOSS.LOG File !!!!!!!
      ##################################################################
      ##################################################################



      [root] Started Log4jService, config=file:/D:/JBOSS/JBoss-2.4.3/conf/default/log4j.properties
      [Classpath extension] Added directory:file:/D:/JBOSS/JBoss-2.4.3/log/
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/activation.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/castor-0.9.1.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/gnu-regexp-1.0.8.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/hsql.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/hsqldb.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jboss-j2ee.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jboss-management.jar


      it is there (jboss.jar)
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jboss.jar


      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jbosscx.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jbossmq.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jbosspool.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/JBossService.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jbosssx.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jcert.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jetty-service.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jmxtools.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jndi.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jnet.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jnpserver.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jpl-util-0_5b.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/jsse.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/log4j.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/mail.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/oswego-concurrent.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/ots-jts_1.0.jar
      [Classpath extension] Added library:file:/D:/JBOSS/JBoss-2.4.3/lib/ext/tyrex-0.9.8.5.jar
      [Info] Java version: 1.3.0,Sun Microsystems Inc.
      [Info] Java VM: Java HotSpot(TM) Client VM 1.3.0-C,Sun Microsystems Inc.
      [Info] System: Windows 2000 5.0,x86
      [Info] +++ Full System Properties Dump
      [Info] jmx.specification.vendor: Sun Microsystems
      [Info] java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition
      [Info] sun.boot.library.path: D:\jdk1.3\jre\bin
      [Info] java.vm.version: 1.3.0-C
      [Info] java.vm.vendor: Sun Microsystems Inc.
      [Info] java.vendor.url: http://java.sun.com/
      [Info] path.separator: ;
      [Info] java.vm.name: Java HotSpot(TM) Client VM
      [Info] file.encoding.pkg: sun.io
      [Info] java.vm.specification.name: Java Virtual Machine Specification
      [Info] user.dir: D:\JBOSS\JBoss-2.4.3\bin
      [Info] java.runtime.version: 1.3.0-C
      [Info] java.awt.graphicsenv: sun.awt.Win32GraphicsEnvironment
      [Info] os.arch: x86
      [Info] java.io.tmpdir: C:\DOKUME~1\hblum\LOKALE~1\Temp\
      [Info] line.separator:

      [Info] java.vm.specification.vendor: Sun Microsystems Inc.
      [Info] java.awt.fonts:
      [Info] os.name: Windows 2000
      [Info] java.library.path: D:\jdk1.3\bin;.;C:\WINDOWS\System32;C:\WINDOWS;D:\IBM Connectors\Encina\bin;C:\IBM Connectors\Encina\bin;D:\Oracle\Ora81\bin;C:\Programme\Oracle\jre\1.1.7\bin;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\CDROM;C:\BRCD\COMMAND;C:\BRCD\BIN;C:\WINDOWS\system32\wbem;D:\jdk1.3\bin;C:\PROGRA~1\ULTRAE~1;C:\WINDOWS\system32;C:\WINDOWS\system32\WBEM;E:\PROGRA~1\ULTRAE~1;d:\jdk1.3;;D:\PROGRA~1\ULTRAE~1;D:\PROGRA~1\ULTRAE~1;D:\ant\jakarta-ant-1.4.1\bin;C:\Programme\Gemeinsame Dateien\WebGain Shared;D:\WebGain\VCafe\Jdk13\Bin;D:\WebGain\VCafe\Java2\Bin;D:\WebGain\VCafe\Java\Bin;D:\WebGain\VCafe\Bin;D:\WebGain\QAnalyzer\bin;D:\VisualCafeEE\Java2\Bin;D:\VisualCafeEE\Bin;
      [Info] javax.xml.parsers.SAXParserFactory: org.apache.crimson.jaxp.SAXParserFactoryImpl
      [Info] jmx.implementation.version: 1.0
      [Info] java.specification.name: Java Platform API Specification
      [Info] java.class.version: 47.0
      [Info] os.version: 5.0
      [Info] user.home: C:\Dokumente und Einstellungen\hblum
      [Info] user.timezone:
      [Info] java.security.policy: /D:/JBOSS/JBoss-2.4.3/conf/default/server.policy
      [Info] java.awt.printerjob: sun.awt.windows.WPrinterJob
      [Info] file.encoding: Cp1252
      [Info] java.specification.version: 1.3
      [Info] user.name: hblum
      [Info] java.class.path: ;run.jar;../lib/crimson.jar;../lib/mail.jar;..\lib\mdm.jar;../lib/activation.jar;..\lib\ext\JBossService.jar;..\lib\ext.jar;/D:/JBOSS/JBoss-2.4.3/log/;/D:/JBOSS/JBoss-2.4.3/lib/ext/activation.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/castor-0.9.1.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/gnu-regexp-1.0.8.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/hsql.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/hsqldb.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jboss-j2ee.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jboss-management.jar;/

      here it is !!

      D:/JBOSS/JBoss-2.4.3/lib/ext/jboss.jar;


      /D:/JBOSS/JBoss-2.4.3/lib/ext/jbosscx.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jbossmq.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jbosspool.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/JBossService.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jbosssx.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jcert.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jetty-service.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jmxtools.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jndi.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jnet.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jnpserver.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jpl-util-0_5b.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/jsse.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/log4j.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/mail.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/oswego-concurrent.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/ots-jts_1.0.jar;/D:/JBOSS/JBoss-2.4.3/lib/ext/tyrex-0.9.8.5.jar
      [Info] jboss.home: D:\JBOSS\JBoss-2.4.3
      [Info] java.vm.specification.version: 1.0
      [Info] java.home: D:\jdk1.3\jre
      [Info] jmx.specification.name: Java Management Extensions
      [Info] java.specification.vendor: Sun Microsystems Inc.
      [Info] user.language: de
      [Info] awt.toolkit: sun.awt.windows.WToolkit
      [Info] jmx.implementation.name: JMX RI
      [Info] java.vm.info: mixed mode
      [Info] java.version: 1.3.0
      [Info] java.ext.dirs: D:\jdk1.3\jre\lib\ext
      [Info] sun.boot.class.path: D:\jdk1.3\jre\lib\rt.jar;D:\jdk1.3\jre\lib\i18n.jar;D:\jdk1.3\jre\lib\sunrsasign.jar;D:\jdk1.3\jre\classes
      [Info] java.vendor: Sun Microsystems Inc.
      [Info] javax.xml.parsers.DocumentBuilderFactory: org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
      [Info] java.security.auth.login.config: file:/D:/JBOSS/JBoss-2.4.3/conf/default/auth.conf
      [Info] file.separator: \
      [Info] java.vendor.url.bug: http://java.sun.com/cgi-bin/bugreport.cgi
      [Info] sun.cpu.endian: little
      [Info] sun.io.unicode.encoding: UnicodeLittle
      [Info] jmx.implementation.vendor: Sun Microsystems
      [Info] user.region: DE
      [Info] jmx.specification.version: 1.0 Final Release
      [Info] sun.cpu.isalist: pentium i486 i386
      [Classpath extension] Added directory:file:/D:/JBOSS/JBoss-2.4.3/tmp/
      [Classpath extension] Added directory:file:/D:/JBOSS/JBoss-2.4.3/db/
      [Shutdown] Shutdown hook added


      and here is the error (but the class can be found in the zip file, the java_classpath is correct as you have seen above)

      [Configuration] Could not create MBean DefaultDomain:service=JBossStartUp(mdm.base.framework.manager.jboss.JBossStartUp)
      [Configuration] java.lang.NoClassDefFoundError: org/jboss/util/ServiceMBeanSupport
      [Configuration] at java.lang.ClassLoader.defineClass0(Native Method)
      [Configuration] at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
      [Configuration] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      [Configuration] at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      [Configuration] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      [Configuration] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      [Configuration] at java.security.AccessController.doPrivileged(Native Method)
      [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.java: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(MBeanServerImpl.java:2466)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:751)
      [Configuration] at org.jboss.configuration.ConfigurationService.create(ConfigurationService.java:579)
      [Configuration] at org.jboss.configuration.ConfigurationService.loadConfiguration(ConfigurationService.java:381)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Configuration] at org.jboss.Main.(Main.java:213)
      [Configuration] at org.jboss.Main$1.run(Main.java:127)
      [Configuration] at java.security.AccessController.doPrivileged(Native Method)
      [Configuration] at org.jboss.Main.main(Main.java:123)
      [Configuration] Port set to 8083 in DefaultDomain:service=Webserver
      [Configuration] DownloadServerClasses set to true in DefaultDomain:service=Webserver
      [Configuration] Po