Org.hibernate.service.classloading.spi.ClassLoadingException:Specified JDBC Driver Com.mysql.jdbc.Driver class not Found

Source: Internet
Author: User

Today, when using hibernate to build a development environment, there is an incredible problem:

1Org.hibernate.service.classloading.spi.ClassLoadingException:Specified JDBC Driver Com.mysql.jdbc.DriverclassNot found2At Org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure ( drivermanagerconnectionproviderimpl.java:107)3At Org.hibernate.service.internal.StandardServiceRegistryImpl.configureService (Standardserviceregistryimpl.java : 75)4At Org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService ( abstractserviceregistryimpl.java:159)5At Org.hibernate.service.internal.AbstractServiceRegistryImpl.getService (abstractserviceregistryimpl.java:131)6At Org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess (jdbcservicesimpl.java:223)7At Org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure (jdbcservicesimpl.java:89)8At Org.hibernate.service.internal.StandardServiceRegistryImpl.configureService (Standardserviceregistryimpl.java : 75)9At Org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService ( abstractserviceregistryimpl.java:159)TenAt Org.hibernate.service.internal.AbstractServiceRegistryImpl.getService (abstractserviceregistryimpl.java:131) OneAt Org.hibernate.cfg.SettingsFactory.buildSettings (settingsfactory.java:71) AAt Org.hibernate.cfg.Configuration.buildSettingsInternal (configuration.java:2277) -At Org.hibernate.cfg.Configuration.buildSettings (configuration.java:2273) -At Org.hibernate.cfg.Configuration.buildSessionFactory (configuration.java:1742) theAt Com.hibtest.entity.TestUsers.testShemaExport (testusers.java:23) - At sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) -At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39) -At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25) +At Java.lang.reflect.Method.invoke (method.java:597) -At Org.junit.runners.model.frameworkmethod$1.runreflectivecall (frameworkmethod.java:45) +At Org.junit.internal.runners.model.ReflectiveCallable.run (reflectivecallable.java:15) AAt Org.junit.runners.model.FrameworkMethod.invokeExplosively (frameworkmethod.java:42) atAt Org.junit.internal.runners.statements.InvokeMethod.evaluate (invokemethod.java:20) -At Org.junit.runners.ParentRunner.runLeaf (parentrunner.java:263) -At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:68) -At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:47) -At Org.junit.runners.parentrunner$3.run (parentrunner.java:231) -At Org.junit.runners.parentrunner$1.schedule (parentrunner.java:60) inAt Org.junit.runners.ParentRunner.runChildren (parentrunner.java:229) -At org.junit.runners.parentrunner.access$000 (parentrunner.java:50) toAt Org.junit.runners.parentrunner$2.evaluate (parentrunner.java:222) +At Org.junit.runners.ParentRunner.run (parentrunner.java:300) -At Org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (junit4testreference.java:50) theAt Org.eclipse.jdt.internal.junit.runner.TestExecution.run (testexecution.java:38) *At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:467) $At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:683)Panax NotoginsengAt Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:390) -At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:197) thecaused By:org.hibernate.service.classloading.spi.ClassLoadingException:Unable to loadclass[Com.mysql.jdbc.Driver] +At Org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName (Classloaderserviceimpl.java : 141) AAt Org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure ( drivermanagerconnectionproviderimpl.java:104) the... 36 More +caused by:java.lang.ClassNotFoundException:Could not load requestedclass: Com.mysql.jdbc.Driver -At Org.hibernate.service.classloading.internal.classloaderserviceimpl$1.findclass (ClassLoaderServiceImpl.java : 99) $At Java.lang.ClassLoader.loadClass (classloader.java:306) $At Java.lang.ClassLoader.loadClass (classloader.java:247) - At JAVA.LANG.CLASS.FORNAME0 (Native Method) -At Java.lang.Class.forName (class.java:247) theAt Org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName (Classloaderserviceimpl.java : 138) -... Panax Notoginseng More

1, my jar package has:

    

2, the previously used database connection driver package is:

    

3, Summary:

In summary, this problem is generally caused by problems with the imported database connection jar package, possible versions, or other reasons. So the solution is to try another version of the jar package.

    

Org.hibernate.service.classloading.spi.ClassLoadingException:Specified JDBC Driver Com.mysql.jdbc.Driver class not Found

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.