Class.forName() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
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

at java.net.URLClassLoader$1.run
at java.security.AccessController.doPrivileged
at java.net.URLClassLoader.findClass
ClassNotFoundException if the class could not be found, or if the loader is closed.
at java.lang.ClassLoader.loadClass
ClassNotFoundException If the class was not found
at java.lang.ClassLoader.loadClass
ClassNotFoundException If the class was not found
at java.lang.Class.forName0
at java.lang.Class.forName
ClassNotFoundException if the class cannot be located
7 lines hidden

Matching stack traces (206)

  1. jonvia Stack Overflow8 months ago
  2. swaroopa regulavalasavia Google Groups8 months ago
    Exception while creating the connection factory with key swaroopa_rabbitmq_1811030629
  3. maxOnevia Google Groups8 months ago
    The MBean class could not be loaded by the context classloader
  4. Karl Lopesvia Google Groups9 months ago
  5. titband_comvia Google Groups9 months ago
    Unable to find class org.jdesktop.wonderland.modules.securitysession.weblib.SessionResolverImpl
  6. 505303via Oracle Community9 months ago
    error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: java.rmi.server.RemoteObjectInvocationHandler
  7. 2983684via Oracle Community9 months ago
    com.hyperion.hfm.config.HfmPreConfig
  8. kronevia Oracle Community9 months ago
    Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory]

See Also

Parent

224 web pages  - Class.forName0() has thrown a ClassNotFoundException
java.lang.ClassNotFoundException
    at java.net.URLClassLoader$1.run()
    at java.security.AccessController.doPrivileged()
    at java.net.URLClassLoader.findClass()
    at java.lang.ClassLoader.loadClass()
    at java.lang.ClassLoader.loadClass()
    at java.lang.Class.forName0()

Children

  • 13 web pages  - LoaderHandler.loadClass() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at sun.rmi.server.LoaderHandler.loadClass()
        at sun.rmi.server.LoaderHandler.loadClass()
  • 12 web pages  - ObjectInputStream.resolveClass() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at java.io.ObjectInputStream.resolveClass()
  • 11 web pages  - ObjectInputStream.readObject() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at sun.rmi.server.LoaderHandler.loadProxyInterfaces()
        at sun.rmi.server.LoaderHandler.loadProxyClass()
        at sun.rmi.server.LoaderHandler.loadProxyClass()
        at java.rmi.server.RMIClassLoader$2.loadProxyClass()
        at java.rmi.server.RMIClassLoader.loadProxyClass()
        at sun.rmi.server.MarshalInputStream.resolveProxyClass()
        at java.io.ObjectInputStream.readProxyDesc()
        at java.io.ObjectInputStream.readClassDesc()
        at java.io.ObjectInputStream.readOrdinaryObject()
        at java.io.ObjectInputStream.readObject0()
        at java.io.ObjectInputStream.readObject()
  • 10 web pages  - Loader.loadClass() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at org.apache.log4j.helpers.Loader.loadClass()
  • 8 web pages  - Database.connectUsingClass() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at org.pentaho.di.core.database.Database.connectUsingClass()
  • 8 web pages  - DSManagedConnectionFactory.createManagedConnection() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject()
        at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject()
        at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource()
        at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource()
        at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection()
  • 6 web pages  - VersionHelper12.loadClass() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at com.sun.naming.internal.VersionHelper12.loadClass()
  • 6 web pages  - ClassTypeSignature.accept() has thrown a TypeNotPresentException
    java.lang.TypeNotPresentException
        at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType()
        at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature()
        at sun.reflect.generics.tree.ClassTypeSignature.accept()
    Caused by: java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType()
  • 5 web pages  - AndroidFrameworkMockGenerator.getPrebuiltClassesFor() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at com.google.android.testing.mocking.AndroidFrameworkMockGenerator.getPrebuiltClassesFor()
  • 5 web pages  - BasicDataSource.createDataSource() has thrown a ClassNotFoundException
    java.lang.ClassNotFoundException
        at java.net.URLClassLoader$1.run()
        at java.security.AccessController.doPrivileged()
        at java.net.URLClassLoader.findClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.ClassLoader.loadClass()
        at java.lang.Class.forName0()
        at java.lang.Class.forName()
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource()

Typical exception messages

  1. 9 crashes - com.mysql.jdbc.Driver
  2. 6 crashes - com.mongodb.hadoop.streaming.MongoStreamJob
  3. 6 crashes - -libjars
  4. 6 crashes - example.hello.Hello
  5. 6 crashes - org.gjt.mm.mysql.Driver
  6. 4 crashes - javax.mail.internet.MimeMessage
  7. 4 crashes - oracle.jdbc.pool.OracleDataSource
  8. 4 crashes - hudson.plugins.view.dashboard.DashboardPortlet
  9. 4 crashes - org.jnp.interfaces.NamingContextFactory
  10. 3 crashes - -D