首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

在整合时,jar 冲突是个头痛的有关问题.

2013-09-11 
在整合时,jar 冲突是个头痛的问题..........(最近做项目中,报错报的心有点打击,所以上网整理,和把自己的碰

在整合时,jar 冲突是个头痛的问题..........

(最近做项目中,报错报的心有点打击,所以上网整理,和把自己的碰到的错误和大家分享一下)

1.
org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save():
原因:<id>元素配置不正确,<id>元素缺少其子元素<generator></generator>的配置。解决方法:<id>元素映射了相应数据库表的主键字段,对其子元素<generator org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
9.
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean] for bean with name 'userService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/aop/framework/AbstractSingletonProxyFactoryBean
Caused by: java.lang.NoClassDefFoundError: org/springframework/aop/framework/AbstractSingletonProxyFactoryBean
方案:没加 spring 2.0 aop libraries
10.
org.apache.jasper.JasperException: Unable to compile class for JSP:
方案:jsp网页中的java代码有问题
11.
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CompanyController' defined in class path resource [com/company/test/company-config.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'methodNameResolver' of bean class [com.company.action.CompanyController]: Bean property 'methodNameResolver' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'methodNameResolver' of bean class [com.company.action.CompanyController]: Bean property 'methodNameResolver' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?


控制器没继承MultiActionController

12.


Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'turDiffService' defined in class path resource [com/expert/test/expert-config.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'turDifficultDao' of bean class [com.expert.operation.impl.TurDiffSerImpl]: Bean property 'turDifficultDao' is not writable or has an invalid setter method. Did you mean 'truDifficultDao'?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'turDifficultDao' of bean class [com.expert.operation.impl.TurDiffSerImpl]: Bean property 'turDifficultDao' is not writable or has an invalid setter method. Did you mean 'truDifficultDao'?
原因:
在定义时TurDifficultDao turDifficultDao? ,把有个字母写错,后发现错误,改过来了,但没把get()? set()方法中对应的改过来

13.

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in class path resource [com/expert/test/expert-config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '' is defined


原因:
在expert-config.xml中创建
<bean id="urlMapping" /> 可以进行自定义主键值,因为我在设主键时没有设成自动增长的,要求填默认值是受了配置文件里<generator class= "org.apache.commons.dbcp.BasicDataSource " destroy-method=

"close "> 除了需要commons-dbcp-1.2-1.jar之外还需要commons-pool.jar这个包,把后面这个commons-pool.jar包导入进去就应该行了,我的是这样解决的

网友回复:commons-pool.jar:
http://www.apache.org/dist/commons/pool/commons-pool-current.zip
commons-dbcp-1.2.1.jar:
http://archive.apache.org/dist/commons/dbcp/binaries/commons-dbcp-1.2.1.zip

?

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yinyuan1987/archive/2009/03/31/4038846.aspx


我的异常网推荐解决方案:org.springframework.beans.factory.BeanCreationException:,http://www.myexception.cn/j2ee/10759.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html

热点排行