Class.forName0() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
Javadoc
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
(Source)
at java.net.URLClassLoader$1.run
(Source)
at java.security.AccessController.doPrivileged
(Source)
at java.net.URLClassLoader.findClass
(Source)
at java.lang.ClassLoader.loadClass
(Source)
at sun.misc.Launcher$AppClassLoader.loadClass
(Source)
at java.lang.ClassLoader.loadClass
(Source)
at java.lang.Class.forName0
(Source)
8 frames hidden

Typical Exception Messages

  1. com.mysql.jdbc.Driver
  2. org.postgresql.Driver
  3. com.microsoft.sqlserver.jdbc.SQLServerDriver
  4. sun.jdbc.odbc.JdbcOdbcDriver
  5. org.apache.mahout.math.Vector
  6. org.sqlite.JDBC
  7. oracle.jdbc.driver.OracleDriver
  8. com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
  9. org.apache.nutch.indexer.solr.SolrDeleteDuplicates$SolrInputFormat
  10. oracle.jdbc.OracleDriver

Origin

Similar

Specific cases

We have seen this error pattern in the following webpages (832)

  1. com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory
  2. Bjarnivia Stack Overflow1 month ago
    org.postgresql.Driver
  3. Failed to create Ignite component (consider adding ignite-spring module to classpath) [comp onent=SPRING, cls=org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl]
  4. sho-suzukivia GitHub1 month ago
    com.filemaker.jdbc.Driver
  5. Markvia Stack Overflow1 month ago
    Error creating bean with name 'appUserRestController': Unsatisfied dependency expressed through field 'appUserRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository': Cannot create inner bean '(inner bean)#69ec93c2' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#69ec93c2': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.jdbc.datasource.init.UncategorizedScriptException: Failed to execute database script; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to load class: com.mysql.jdbc.Driver from ClassLoader:sun.misc.Launcher$AppClassLoader@119d7047;ClassLoader:sun.misc.Launcher$AppClassLoader@119d7047
  6. MajiDvia Stack Overflow1 month ago
    com.mysql.jdbc.Driver