• 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文件夹中导致,删除即可

  • 相关阅读:
    Google是不是真的不能用了?非常奇怪的问题
    九度机试 题目1165:字符串匹配 2008年北京航空航天大学计算机研究生机试真题
    UNIX网络编程卷1 时间获取程序server TCP 协议相关性
    uva 1557
    C经典之14-双向链表存储1-10---ShinePans
    Java 内部类
    HiPAC高性能规则匹配算法之查找过程
    Objective-C之成魔之路【9-类构造方法和成员变量作用域、以及变量】
    NSRange,判断字符串的各种操作~
    NSRange类详解
  • 原文地址:https://www.cnblogs.com/applerosa/p/5950933.html
Copyright © 2020-2023  润新知