Spring JPA 缺少 JAR 引起异常

Spring JPA 缺少 JAR 引起异常

记录整合中缺少 JAR 文件引起的异常 

版本 Spring 3+  Hibernate 4+  JPA  

 

1、Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/aop]

 缺少:spring-aop-3.2.0.RELEASE.jar

 

2、Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

 缺少:aopalliance-1.0.jar

 

3、 Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around

  缺少:aspectjrt-1.6.9.jar

 

4、 nested exception is java.lang.ClassNotFoundException: org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor

  缺少:spring-orm-3.2.0.RELEASE.jar

 

5、java.lang.NoClassDefFoundError: org/springframework/dao/DataAccessException

  缺少:spring-tx-3.2.0.RELEASE.jar

 

6、nested exception is java.lang.ClassNotFoundException: com.alibaba.druid.pool.DruidDataSource

  缺少:druid-0.2.11.jar

 

7、java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/lookup/DataSourceLookup

  缺少:spring-jdbc-3.2.0.RELEASE.jar

 

8、Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No PersistenceProvider specified in EntityManagerFactory configuration, and chosen PersistenceUnitInfo does not specify a provider class name either

  加上:

    <property name="jpaVendorAdapter">
      <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
    </property>

 

9、Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger

  缺少:jboss-logging-3.1.0.GA.jar

 

10、nested exception is java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence

  缺少:hibernate-entitymanager-4.1.7.Final.jar

 

11、nested exception is java.lang.NoClassDefFoundError: org/hibernate/proxy/EntityNotFoundDelegate

  缺少:hibernate-core-4.1.7.Final.jar

 

12、nested exception is java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/MetadataProvider

  缺少:hibernate-commons-annotations-4.0.1.Final.jarSpring JPA 缺少 JAR 引起异常

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值