• java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataProvider


    Caused by: java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/MetadataProvider
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.getDeclaredConstructor(Class.java:1985)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newConfiguration(LocalSessionFactoryBean.java:818)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:549)
        at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
        ... 39 more
    Caused by: java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataProvider
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 49 more

    错误原因:使用了hibernate-commons-annotations 3.3.0.ga

    解答:http://forum.springsource.org/showthread.php?t=89693

    You have to use hibernate-commons-annotations version 3.2.0.Final, because 3.3.0.ga is an invalid version as stated in the README.TXT in the maven repository folder:

    "Version '3.3.0.ga' was a mistake during the release process, please disregard.
    There is not such version 3.3.0.ga."

    Version 3.2.0.Final includes the missing MetadataProvider

     

  • 相关阅读:
    [课程设计]任务进度条&开发日志目录
    《软件工程》课程设计-团队成立
    软件工程学期总结
    第三次冲刺及课程设计 617
    学术诚信与职业道德
    第二个冲刺
    操作系统 实验四主存空间的分配和回收
    0526 《构建之法》第8-10章读后感
    SCRUM项目 6.0
    SCRUM项目 5.0
  • 原文地址:https://www.cnblogs.com/toSeeMyDream/p/4518581.html
Copyright © 2020-2023  润新知