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

 

java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataProvider的更多相关文章

  1. Caused by: java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataPro

    1.错误描述 信息: MLog clients using java 1.4+ standard logging. 2014-7-12 19:29:20 com.mchange.v2.c3p0.C3P ...

  2. java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/ClassLoadingException

    下载高版本的: hibernate-commons-annotations-5.0.1.Final.jar 低版本缺包

  3. Caused by: java.lang.ClassNotFoundException: org.hibernate.engine.FilterDefinition

    1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...

  4. java.lang.ClassNotFoundException: org.hibernate.engine.FilterDefinition的解决方案

    今天在GitHub上面看到一个有意思的项目,下载下来,使用tomcat部署失败,出现异常,网上说JDK版本太高,改低,还是失败. 由于本人有个习惯,更喜欢把项目直接放入tomcat webapps 里 ...

  5. Caused by: java.lang.ClassNotFoundException: org.hibernate.service.jta.platform.spi.JtaPlatform

    1.错误描述 2014-7-12 22:08:01 org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: HHH000232: Schema up ...

  6. java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence 解决方法

    编译遇到错误,如下: May 11, 2017 1:49:42 PM org.springframework.web.context.ContextLoader initWebApplicationC ...

  7. Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version

    <dependency> <groupId>com.alibaba.boot</groupId> <artifactId>dubbo-spring-bo ...

  8. java.lang.ClassNotFoundException: org.hibernate.engine.SessionFactoryImplementor

    Hibernate4.x与spring3.x整合,有关事务的处理,用Junit4测试,出现org.springframework.beans.factory.BeanCreationException ...

  9. spring hiberante 集成出现异常 java.lang.ClassNotFoundException: org.hibernate.engine.SessionFactoryImplementor

    出现如题的异常是由于hibernate和spring集成时的的版本不一致所导致. 如下面,所示,如果你用的hibneate 4.0及以上版本,那么将会报错,因为这里用的事务管理是hibernate 3 ...

随机推荐

  1. Document Set 【一】

    概括介绍: Document Set 是SharePoint2010之后出现的一个新的Feature.这个Feature的主要目的是两个: 1,是帮助 User 以一个文件的管理方式管理一个文件集合. ...

  2. maven工程的如何进行代码调试

    1.maven项目的父项目右键选择:maven build    注意:       1.选择Browser workspace,让BaseDirectory变成:${***}形式.       2. ...

  3. hlsl 的tex函数

    texCUBE http://msdn.microsoft.com/en-us/library/windows/desktop/bb509687(v=vs.85).aspx

  4. 在线最优化求解(Online Optimization)之三:FOBOS

    在线最优化求解(Online Optimization)之三:FOBOS FOBOS (Forward-Backward Splitting)是由John Duchi和Yoram Singer提出的[ ...

  5. uva 757

    贪心  优先队列 #include <cstdio> #include <cstdlib> #include <cmath> #include <map> ...

  6. spoj 138

    离散化  去掉重复点 排序  二分查找 #include<cstdio> #include<cstring> #include<algorithm> #define ...

  7. linux配置mysql,tomcat命令vi

    [root@yangchehome bin]# ./mysqld_safe -user=mysql & [1] 17135 [root@yangchehome bin]# 140316 16: ...

  8. 【入门篇】Nginx + FastCGI 程序(C/C++) 搭建高性能web service的Demo及部署发布

    http://blog.csdn.net/allenlinrui/article/details/19419721 1.介绍     Nginx - 高性能web server,这个不用多说了,大家都 ...

  9. sql over()---转载

    1.使用over子句与rows_number()以及聚合函数进行使用,可以进行编号以及各种操作.而且利用over子句的分组效率比group by子句的效率更高. 2.在订单表(order)中统计中,生 ...

  10. Python Snippet

    python按行读取文件,如何去掉换行符"\n" for line in file.readlines(): line=line.strip('\n') python没有subst ...