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 ...
随机推荐
- Testin云測公布首份国内应用质量报告:半数APP平均启动时间不合格
Testin云測公布首份国内应用质量报告:半数APP平均启动时间不合格 2014/10/23 · Testin · 实验室报告 日前,Testin云測旗下质量管家Master通过随机取样1605款国内 ...
- qt creator中使用qwt插件
前提:我用mingw编译的qwt. 将qwt插件集成到qt designer非常easy.仅仅要把qwt编译的qwt_designer_plugin.dll复制到C:\Qt\Qt5.3.1\5.3\m ...
- Media Queries详细
@media only screen and (max-device-width: 480px) { //页面最大宽度480px } <link rel="stylesheet&quo ...
- IOS中类和对象还有,nil/Nil/NULL的区别
转自:http://blog.sina.com.cn/s/blog_5fb39f910101akm1.html 类与对象的概念 类是对同一类事物高度的抽象,类中定义了这一类对象所应具有的静态属性(属性 ...
- 终端I/O之stty命令
所有的终端选项标志,在程序中都可用tcgetattr和tcsetattr函数(http://www.cnblogs.com/nufangrensheng/p/3576682.html)进行检查和更改. ...
- 使用SQL*PLUS,构建完美excel或html输出
通过SQL*PLUS我们可以构建友好的输出,满足多样化用户需求.本例通过简单示例,介绍通过sql*plus输出xls,html两种格式文件.首先创建两个脚本:1.main.sql用以设置环境,调用具体 ...
- C语言中的各种修饰符
C允许同时使用多于一个的修饰符,这就使得可以创建一下各种类型: int board[8][8];//int数组的数组 int **ptr;//指向int的指针的指针 int *risk[10];//具 ...
- java 考试试题
Java基础部分 基础部分的顺序:基本语法,类相关的语法,内部类的语法,继承相关的语法,异常的语法,线程的语法,集合的语法,io 的语法,虚拟机方面的语法,其他.有些题来自网上搜集整理,有些题来自学员 ...
- 浏览器自动化工具-Selenium
Table of Contents 1. 什么是Selenium 2. 简单的例子 3. PS 什么是Selenium Selenium可以自动化操作浏览器,利用Selenium可以模拟用户操作,因此 ...
- 数据分析之sql篇
刚才在琢磨客户分析的时候,突然想到一个假设,如果某个客户的续约率很高,那么证明他在产品的使用上效果是很好的,如果这些些产品的组合十分有效,那么查看其他类似的客户的续约率,做一次论证应该是有意义的.于是 ...