IBM Support

The error message "java.lang.NoClassDefFoundError: when running a Websphere Application ServerThin Client that tries to use the JMX API

Technote (troubleshooting)


This technote explains how to avoid the "error java.lang.NoClassDefFoundError:" when running an IBM® Websphere® Application Server Thin client that tries to use the Java Management Extensions (JMX) API.


When executing the following code from a Websphere Application Server Thin client :

import ;
import* ;
import java.util.* ;
import* ;
import* ;

public class JMXTest implements PmiConstants {

   private static AdminClient ac = null ;  
   private ObjectName perfOName = null ;
   private ObjectName serverOName = null ;
   private ObjectName wlmOName = null ;
   private ObjectName jvmOName = null ;
   private ObjectName orbtpOName = null ;
   private PmiModuleConfig[] configs = null ;

   private static String host = "localhost";     // default host
   private static String port = "8880";          // default port number
   private static String connector = "SOAP";     // default JMX connector
   public static void main(String[] args)
      JMXTest instance = new JMXTest () ;    
       java.util.Properties props = new java.util.Properties() ;
       props.put(AdminClient.CONNECTOR_TYPE, connector) ;
       props.put(AdminClient.CONNECTOR_HOST, host) ;
       props.put(AdminClient.CONNECTOR_PORT, port) ;
       try {
        ac = AdminClientFactory.createAdminClient(props) ;
       catch (Exception ex) {
        new AdminException(ex).printStackTrace() ;
        System.out.println ("Admin Client Allocation Error") ;

the following console output is displayed:

Exception in thread "main" java.lang.NoClassDefFoundError:

( at$000

( at$


( at

( at jmxTest.JMXTest.main(
Caused by: java.lang.ClassNotFoundException:
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 6 more

Resolving the problem

Add the WebSphere Application Server Administration Thin Client JAR jar to the application Java Build Path located in the runtimes folder of the WebSphere Application Server installation directory.

For example, for WebSphere Application Server 7.0, the file name is:

and it is located in:

C:\Program Files\IBM\SDP\runtimes\base_v70\runtimes

Related information

Using the Administration Thin Client

Document information

More support for: Rational Application Developer for WebSphere Software
Application Server Tooling (AST)

Software version: 7.5, 7.5.1

Operating system(s): Windows

Reference #: 1358301

Modified date: 12 May 2011

Translate this page: