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

Technote (troubleshooting)


Problem(Abstract)

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

Symptom

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


import com.ibm.websphere.management.exception.ConnectorException ;
import com.ibm.websphere.management.exception.InvalidAdminClientTypeException;
import com.ibm.websphere.management.exception.* ;
import java.util.* ;
import javax.management.* ;
import com.ibm.ws.pmi.client.*;
import com.ibm.websphere.pmi.*;
import com.ibm.websphere.pmi.client.*;
import com.ibm.websphere.pmi.stat.* ;

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:
com.ibm.ffdc.Manager
at com.ibm.websphere.management.AdminClientFactory.loadPropertiesFromFile

(AdminClientFactory.java:1062) at
com.ibm.websphere.management.AdminClientFactory.access$000

(AdminClientFactory.java:117) at
com.ibm.websphere.management.AdminClientFactory$1.run

(AdminClientFactory.java:295)at
com.ibm.ws.security.util.AccessController.doPrivileged

(AccessController.java:63) at
com.ibm.websphere.management.AdminClientFactory.createAdminClient

(AdminClientFactory.java:293) at jmxTest.JMXTest.main(JMXTest.java:43)
Caused by: java.lang.ClassNotFoundException: com.ibm.ffdc.Manager
at java.net.URLClassLoader.findClass(URLClassLoader.java:419)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:300)
at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
... 6 more


Resolving the problem

Add the WebSphere Application Server Administration Thin Client JAR jar

com.ibm.ws.admin.client_X.0.0.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:

com.ibm.ws.admin.client_7.0.0.jar

and it is located in:

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

Related information

Using the Administration Thin Client

Rate this page:

(0 users)Average rating

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:

2011-05-12

Translate my page

Machine Translation

Content navigation