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

  • 相关阅读:
    Ajax World 名人堂
    Chrome Flash插件的手动安装方法
    2009年郭红俊的工作
    动画缓冲或叫缓动函数(Animation Easing)
    2008年郭红俊的工作
    Android下调整多媒体音量方法
    游戏中按概率播放某个音效简单c++实现
    string转int 等(转)
    .NET简谈面“.NET技术”向接口编程 狼人:
    改善代码设计 —— 处理概括关系(Dealing w“.NET技术”ith Generalization) 狼人:
  • 原文地址:https://www.cnblogs.com/super-chao/p/15226687.html
Copyright © 2011-2022 走看看