NoClassDefFound (No Class Definition Found) is a Java Virtual Machine (JVM) error that occurs when a class needed to run a Java program cannot be found. A definite missing class could cause this error, although it is mostly triggered by a faulty CLASSPATH. It may also happen when a Java user adds the unnecessary ‘.class’ extension at the end of a command line, e.g. ‘C:\>java HelloWorld.class’.

During an application server’s shutdown and subsequent redeployment of applications, the user may also see a NoClassDefFound error. When the ClassLoader application turns off before the full shutdown of Coherence, this error usually occurs. When Coherence’s shutdown procedure tries to enter a class definition (whether direct or indirect) this message will be thrown.

A Rational Application Developer plug-in utility can resolve this exception. It can locate Java Archive (JAR) files which contain a certain class for a project’s Java path and help fix NoClassDefFound exceptions.

Definition of Terms

  • Java – a programming language implementation originally developed to compile and complete directive functions regardless of language version and platform. James Gosling for Sun Microsystems created it on June 1991.
  • Java class- a collection of Java variables and methods.
  • Java Virtual Machine – software which enables the recognition and successful execution of Java technology on a wide array of hardware systems, Java virtual machines are termed as such because they offer an environment for Java code execution.
  • CLASSPATH – an environmental variable that informs the Java compiler and JVM of the location of Java class files. In Java 1.2 (and succeeding versions), the variable is less vital because Java can find default classes as well as load these classes from the directory by default.
  • Class – the basis or blueprint for the creation of individual objects.