The class could not be found

Thrown when an application tries to load in a class through its string name using:
  • The forName method in class Class.
  • The findSystemClass method in class ClassLoader .
  • The loadClass method in class ClassLoader.

but no definition for the class with the specified name could be found.

As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The "optional exception that was raised while loading the class" that may be provided at construction time and accessed via the {@link #getException()} method is now known as the cause, and may be accessed via the {@link Throwable#getCause()} method, as well as the aforementioned "legacy method." @author unascribed @see java.lang.Class#forName(java.lang.String) @see java.lang.ClassLoader#findSystemClass(java.lang.String) @see java.lang.ClassLoader#loadClass(java.lang.String, boolean) @since JDK1.0


Typical Exception Messages

  1. org.slf4j.LoggerFactory
  2. org.hibernate.query.ParameterMetadata
  3. com.mysql.jdbc.Driver
  4. org.apache.commons.logging.LogFactory
  5. org.codehaus.janino.ScriptEvaluator
  6. weka.attributeSelection.InfoGainAttributeEval
  7. org.w3c.dom.ElementTraversal
  8. javax.servlet.ServletContext
  9. org.springframework.boot.SpringApplication
  10. kotlin.jvm.internal.Intrinsics

Specific cases


poroszd, 3 months ago

This error pattern looks similar to error pattern 88439.

However, in this case, we are sure that this happens when sun.misc.URLClassPath.getResource(String name, boolean check) returns null. Practically every exception that happens in getResource is handled by returning null.

External results for this pattern (6743)

  1. SecurityGuy05via GitHub22 hours ago
    Show stack trace
  2. AshStrangervia GitHub1 day ago
    Show stack trace
  3. YunchengLiaovia GitHub1 day ago
    Show stack trace
  4. B5045438via GitHub1 day ago
    Show stack trace
  5. vishal-biyanivia GitHub1 day ago
    Show stack trace
  6. Ketsuekisamavia GitHub1 day ago
    Show stack trace
  7. Kerookervia GitHub1 day ago
    Show stack trace
  8. javax.jms.MessageListener
    Show stack trace
  9. com.jogamp.opengl.GLEventListener
    Show stack trace