struts2,hibernate4,spring3配置时问题汇总及解决办法 1.java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor 缺少asm-3.3.jar 2.java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor 缺少asm-commons-3.3.jar 3.java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener 缺少spring-web-3.2.3.RELEASE.jar 4.java.lang.ClassNotFoundException: org.springframeworntext.ContextLoaderListener 缺少spring-web-3.2.3.RELEASE.jar 5.java.lang.ClassNotFoundException: org.springframeworntext.request.RequestContextListener 缺少spring-web-3.2.3.RELEASE.jar 6.java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListenr 缺少spring-web-3.2.3.RELEASE.jar 7.java.lang.NoClassDefFoundError: org/springframework/context/ConfigurableApplicationContet 缺少spring-context-3.2.3.RELEASE.jar 8.Caused by: java.lang.ClassNotFoundException: org.springframework.beans.FatalBeanException 缺少spring-beans-3.2.3.RELEASE.jar 9.Caused by: java.lang.ClassNotFoundException: orre.NestedRuntimeException 缺少spring-core-3.2.3.RELEASE.jar 10.java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator 缺少log4j-1.2.16.jar 11. org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [] 缺少spring-tx-3.2.3.RELEASE.jar 12.org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [resource/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor 缺少aopalliance-1.0.jar 13. org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [] 缺少spring-aop-3.2.3.RELEASE.jar 14.java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor 缺少spring-expression-3.2.3.RELEASE.jar 15. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [resource/applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot resolve reference to bean 'pointcut' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointcut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException 缺少spring-aspects-3.2.3.RELEASE.jar、aspectjweaver.jar、aspectjrt.jar 16. org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate4.LocalSessionFactoryBean] for bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.orm.hibernate4.LocalSessionFactoryBean 缺少spring-orm-3.2.3.RELEASE.jar 17. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/ReflectionManager 缺少hibernate-commons-annotations-4.0.2.Final.jar 18. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException 缺少dom4j-1.6.1.jar 19.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger 缺少jboss-logging-3.1.1.GA.jar 20. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/transaction/SystemException 缺少jboss-transaction-api_1.1_spec-1.0.1.Final.jar 21. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/persistence/Entity 缺少hibernate-jpa-2.0-api-1.0.1.Final.jar 22. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.cache.NoCacheRegionFactoryAvailableException: Second-level cache is used in the application, but property hibernate.cache.region.factory_class is not given, please either disable second level cache or set correct region factory class name to property hibernate.cache.region.factory_class (and make sure the second level cache provider, hibernate-infinispan, for example, is available in the classpath). hibernate.cfg.xml配置中需添加: <property name="hibernate.cache.use_second_level_cache">true</property> <property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property> <property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property> 23. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory 缺少slf4j-api-1.6.1.jar 24. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [resource/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy 缺少spring-jdbc-3.2.3.RELEASE.jar 25. org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.cjjt.dao.impl.BaseDaoImpl] for bean with name 'baseDao' defined in class path resource [resource/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.cjjt.dao.impl.BaseDaoImpl 26.Caused by: Cannot locate the chosen ObjectFactory implementation: spring - [unknown location] 缺少struts2-spring-plugin-2.3.15.jar 27.org.springframework.orm.hibernate4.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 28.java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 问题及解决办法:缺少commons-logging.jar,需要在lib中添加。 29.NoClassDefFoundError: org/logicalcobwebs/cglib/core/NamingPolicy 问题及解决办法:默认hibernate4下连接池jar包为较老的proxool-0.8.3.jar。需要换成proxool-0.9.1.jar和proxool-cglib.jar 30.org.logicalcobwebs.proxool.ShutdownHook - Problem calling "get cause" on IllegalStateException. 问题及解决办法:默认hibernate4下连接池jar包为较老的proxool-0.8.3.jar。需要换成proxool-0.9.1.jar和proxool-cglib.jar
相关推荐
### Struts2、Spring、Hibernate 分页显示技术详解 #### 一、背景介绍 在现代Web应用开发中,特别是基于Java平台的企业级应用,Struts2、Spring 和 Hibernate 是非常重要的三大框架。其中,Struts2 负责前端表现层...
<exception-mapping exception="java.lang.RuntimeException" result="Exception"/> </global-exception-mappings> <result name="success" type="dispatcher">/org/index.jsp ...
6. 错误和异常处理:利用Struts的ActionError和Exception Handler,以及Spring的AOP通知,统一处理错误和异常。 在"testS1sh"这个项目中,可能包含了整合后的代码示例、配置文件、测试用例等,通过这些资源可以更...
这是一个基于Java技术栈的会员管理系统源码,使用了经典的SSH框架——Struts、Hibernate和Spring。这个系统的主要目的是实现对会员信息的有效管理和操作,通过这三个框架的集成,实现了业务层、持久层和表现层的解耦...
### 使用Hibernate与Spring实现分页功能 #### 一、引言 在开发Web应用程序时,分页是一项常用的功能。它可以显著提升用户体验,并减轻服务器压力。本文将详细介绍如何结合使用Hibernate和Spring框架来实现数据的...
在Java Spring框架的学习过程中,SSH(Struts + Spring + Hibernate)的整合是一个重要的环节。本课程主要介绍如何使用注解的方式来进行SSH整合,这种方式可以减少XML配置的复杂度,并且更符合现代软件开发的趋势。 ...
### Hibernate与Spring集成分页方法详解 在Java企业级应用开发中,经常需要处理大量数据的展示和查询问题。为了提高用户体验并优化服务器资源利用,分页查询是一种非常实用的技术手段。本文将详细介绍如何在...
Spring 和 Hibernate 的整合是企业级 Java 应用开发中的常见实践,它将 Spring 框架的控制反转(IoC)和面向切面编程(AOP)优势与 Hibernate 的持久化能力相结合,提供了更高效、灵活的数据库操作。下面我们将深入...
### JSF + Hibernate + Spring 集成案例详解 #### 一、项目概述与环境搭建 本案例旨在通过集成JSF、Spring 和 Hibernate 框架来构建一个具备登录、浏览、注册、修改、删除及退出功能的Web应用。通过这个示例,我们...
Struts、Hibernate、Spring是Java Web开发中的三大框架,它们的集成使用能够构建高效、松耦合的应用。本文将详细讲解如何将这三个框架整合在一起,通过一个网站登录的例子进行实战演示。 首先,我们需要搭建基本的...
### j2ee中struts+hibernate+spring+pager-taglib分页实例 #### 概述 在Java企业级应用开发中,Struts、Hibernate、Spring与Pager Taglib经常被联合使用,以构建高性能、高灵活性的应用系统。本文将详细介绍如何...
### Struts + Hibernate + Spring 应用下的实用分页实例详解 #### 一、背景介绍 在基于Struts + Hibernate + Spring(SSH)框架的Web应用程序开发中,数据展示是必不可少的一部分,特别是在需要处理大量数据的情况...
标题与描述中的关键词“Struts2+Spring3+Hibernate3集成方法”指向了一种常见的企业级应用架构,这种架构结合了MVC(Model-View-Controller)、IoC(Inversion of Control)和ORM(Object Relational Mapping)的...
day49_Tax3_jQuery.ajax_Exception_StrutsResultSupport day50_Tax4 day51_UML&SVN; day52_Tax5_EDrawmax_PowerDesigner_ueditor day53_Tax6_QueryHelper_Echo_PageResult day54_Tax7_Complain day55_Tax8_...
在IT领域,Spring和Hibernate是两个非常重要的框架,它们分别在应用上下文管理和持久化层提供了强大的支持。Spring是一个全面的后端开发框架,而Hibernate则是一个对象关系映射(ORM)工具,使得Java开发者可以方便...
Struts2+Spring+Hibernate 中的Action单元测试环境搭建 在软件开发中,单元测试是一种非常重要的测试方法,可以帮助我们确保代码的可靠性和稳定性。在 Struts2+Spring+Hibernate 框架中,对 Action 的单元测试环境...
"Struts,Spring,Hibernate优缺点" Struts 的优点: 1. 实现 MVC 模式,结构清晰,使开发者只关注业务逻辑的实现。 2. 有丰富的 tag 可以用,Struts 的标记库(Taglib),如能灵活动用,则能大大提高开发效率。 3. ...