zoukankan      html  css  js  c++  java
  • Exception 04 : java.lang.ClassNotFoundException: Could not load requested class : org.hsqldb.jdbcDriver

    异常详细信息

    org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.hsqldb.jdbcDriver]

           at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:243)

           at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.loadDriverIfPossible(DriverManagerConnectionProviderImpl.java:200)

           at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.buildCreator(DriverManagerConnectionProviderImpl.java:156)

           at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:95)

           at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)

           at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)

           at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)

           at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)

           at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)

           at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)

           at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)

           at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)

           at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)

           at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)

           at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930)

           at cn.itsource.hibernate.hello.Hello.testsave(Hello.java:20)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

           at java.lang.reflect.Method.invoke(Unknown Source)

           at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

           at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

           at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

           at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

           at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

           at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

           at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

           at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

           at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

           at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

           at 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)

           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

           at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

    Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.hsqldb.jdbcDriver

           at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:228)

           at java.lang.ClassLoader.loadClass(Unknown Source)

           at java.lang.ClassLoader.loadClass(Unknown Source)

           at java.lang.Class.forName0(Native Method)

           at java.lang.Class.forName(Unknown Source)

           at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:240)

           ... 38 more

    异常排除流程

    误将hibernate.properties导入到resources文件夹中导致,删除即可

  • 相关阅读:
    topsort模板,poj 2585
    CUG2012年暑期ACM训练赛(单人赛)
    第一个QT, "hello linux"
    AOE网络,最长路关键路径的学习
    种类位置信息:geometry
    标准对话框:StandardDialogs
    最近整理的模板
    单调队列的学习
    118 ZOJ Monthly, July 2012
    离散化 + unique + lower_bound的学习,hdu4325
  • 原文地址:https://www.cnblogs.com/applerosa/p/5950933.html
Copyright © 2011-2022 走看看