zoukankan      html  css  js  c++  java
  • Caused by: java.lang.ClassNotFoundException: org.hibernate.service.ServiceRegistry

    Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.orm.hibernate5.LocalSessionFactoryBean] from ClassLoader [sun.misc.Launcher$AppClassLoader@b4aac2]
    	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:659)
    	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:556)
    	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:541)
    	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:245)
    	... 55 more
    Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistry
    	at java.lang.Class.getDeclaredMethods0(Native Method)
    	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    	at java.lang.Class.getDeclaredMethods(Class.java:1975)
    	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641)
    	... 58 more
    Caused by: java.lang.ClassNotFoundException: org.hibernate.service.ServiceRegistry
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    	... 62 more
    hibernate5.LocalSessionFactoryBean用到了ServiceRegistry。
    解决办法:将hibernate的core包改为hibernate3。hibernate的包版本问题。


    Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.orm.hibernate5.LocalSessionFactoryBean] from ClassLoader [sun.misc.Launcher$AppClassLoader@b4aac2]at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:659)at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:556)at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:541)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:245)... 55 moreCaused by: java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistryat java.lang.Class.getDeclaredMethods0(Native Method)at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)at java.lang.Class.getDeclaredMethods(Class.java:1975)at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641)... 58 moreCaused by: java.lang.ClassNotFoundException: org.hibernate.service.ServiceRegistryat java.net.URLClassLoader.findClass(URLClassLoader.java:381)at java.lang.ClassLoader.loadClass(ClassLoader.java:424)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)at java.lang.ClassLoader.loadClass(ClassLoader.java:357)... 62 more

  • 相关阅读:
    你云我云•兄弟夜谈会 第三季 企业IT架构
    你云我云•兄弟夜谈会 第二季 5G
    C++ 中的不定参数与格式化字符串 # ## vsprintf
    Python多进程池 multiprocessing Pool
    protobuf语法指南
    linux 监控工具netdata
    C++并发编程 条件变量 condition_variable,线程安全队列示例
    C++ 并发编程,std::unique_lock与std::lock_guard区别示例
    linux设置预留端口号,防止监听端口被占用 ip_local_reserved_ports
    goto语句引起的crosses initialization of XXX
  • 原文地址:https://www.cnblogs.com/super-chao/p/15226687.html
Copyright © 2011-2022 走看看