struts2,hibernate4,spring3配置时问题汇总及解决办法
文章转载于wanglihu的博客,原文链接http://wanglihu.iteye.com/blog/1897718
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.springframework.web.context.ContextLoaderListener
缺少spring-web-3.2.3.RELEASE.jar
5.java.lang.ClassNotFoundException: org.springframework.web.context.request.RequestContextListener
缺少spring-web-3.2.3.RELEASE.jar
6.java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener
缺少spring-web-3.2.3.RELEASE.jar
7.java.lang.NoClassDefFoundError: org/springframework/context/ConfigurableApplicationContext
缺少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: org.springframework.core.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 [http://www.springframework.org/schema/tx]
缺少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 [http://www.springframework.org/schema/aop]
缺少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,hibernate4,spring3配置时问题汇总及解决办法的更多相关文章
- struts,hibernate,spring配置时问题汇总及解决办法
1.java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor 缺少asm-3.3.jar 2.java.lang.NoClassDe ...
- Eclipse编辑jsp、js文件时卡死现象的解决办法汇总
使用Eclipse编辑jsp.js文件时,经常出现卡死现象,在网上百度了N次,经过N次优化调整后,卡死现象逐步好转,具体那个方法起到作用,不太好讲.将所有用过的方法罗列如下: 1.取消验证 windo ...
- PHPmailer发送邮件时的常见问题及解决办法
来源:http://www.chinastor.com/a/jishu/mailserver/0G392262014.html 使用PHPmailer发送邮件时的常见问题总结: 一,没有定义发送邮箱$ ...
- Win 2008 R2安装SQL Server 2008“性能计数器注册表配置单元一致性”失败的解决办法
Win 2008 R2安装SQL Server 2008“性能计数器注册表配置单元一致性”失败的解决办法(2011-02-23 19:37:32) 转载▼ 今天在惠普服务器上安装数据库2008时, ...
- android studio 错误汇总以及解决办法
android studio 错误汇总以及解决办法 参考 https://www.jianshu.com/p/7c7de6562231 问题1. Error:Execution failed for ...
- dedecms添加文章时提示标题为空,编辑文章时编辑器空白的解决办法
dedecms添加文章时提示标题为空,编辑文章时编辑器空白的解决办法 dedecms出现这个问题与代码无关,主要是和PHP的版本有关,用的PHP5.4,更换成PHP5.2之后就不会有这个问题了. 问题 ...
- Redis 3.0版本启动时出现警告的解决办法
原文:http://m.blog.csdn.net/article/details?id=50864933 Redis 3.0.7版本启动时出现警告的解决办法 发表于2016/3/12 12:52:4 ...
- [转]delphi 防止刷新时闪烁的终极解决办法
{ 防止刷新时闪烁的终极解决办法(对付双缓冲无效时) }Perform($000B, 0, 0); //锁屏幕 防止闪烁 // 做一些会发生严重闪烁的事情.. //解锁屏幕并重画Perform($00 ...
- struts2+Hibernate4+spring3+EasyUI环境搭建之一:准备工作
SSHE环境搭建第一步:安装软件(经验:安装软件路径最好不要有空格.括弧.中文等特殊符号)1.Jdk72.tomcat73.maven34.MyEclipse10.7 破解及优化设置(设置本地安装jd ...
随机推荐
- Lua游戏脚本语言入门(一)
作者: 沐枫 (第二人生成员) 原文地址:http://job.17173.com/content/2009-01-22/20090122143452606,1.shtml 在这篇文章中,我想向大家介 ...
- Hello_IOS ios开发transform属性
#import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutl ...
- 【如何快速的开发一个完整的 iOS 直播 app】(美颜篇)
来源:袁峥Seemygo 链接:http://www.jianshu.com/p/4646894245ba 前言 在看这篇之前,如果您还不了解直播原理,请查看这篇文章如何快速的开发一个完整的iOS直播 ...
- 1.6.6 De-Duplication(重复数据删除)
1. 重复数据删除 solr通过<Signature>类的类型来支持重复数据删除技术的.一个Signature可以通过以下几种方式实现: 方法 描述 MD5Signature 128 ...
- SQL Server 2008 表值参数用法
下面的示例使用 Transact-SQL 并演示如何执行以下操作:创建表值参数类型,声明变量来引用它,填充参数列表,然后将值传递到存储过程. USE AdventureWorks; GO /*创建表值 ...
- 【Mood-18】github 使用指南
windows下使用教程: http://www.cnblogs.com/dongdong230/p/4211221.html repository not found error问题解决(需确定gi ...
- nginx lua mysql redis设置
最近公司网站改版,程序和数据库全部用新版,旧版的数据要导入,旧网站的30万条数据url要全部重定向到新版网站,正好前段时间在学习nginx+lua+mysql+memcache(redis),找资料真 ...
- 关于使用Exception的一点心得
毫无疑问,Exception有很多优点.查看任何一本面向对象的书籍,都会提到异常相对于返回值标记状态的不足以及避免错误导致程序崩溃的问题.看起来是很好的,用起来也是很好的.可是这么多年过去了,异常用的 ...
- JSON解析总结2
使用json-lib-2.4-jdk15.jar JSON工具类: import java.util.List; import net.sf.json.JSONArray; import net.sf ...
- Oracle数据库作业-5 查询
14.查询所有学生的Sname.Cno和Degree列. select t.sname,c.cno,c.degree from student t inner join score c on t.sn ...