MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » org.springframework.orm.hibernate3.HibernateQuer

org.springframework.orm.hibernate3.HibernateQueryException: Instruction

www.MyException.Cn  网友分享于:2013-09-12  浏览:892次
大家帮忙总结下,使用SSH框架容易出现的问题,还有运行时候容易出现的问题!
如题!

------解决方案--------------------
楼主可以参考一下我的这两个博客
就是这两天整理的,希望对大家有帮助
“SSH整合项目中容易出现的错误整理 ”

还有一个博客
“SSH项目中,发布项目出现Error:listenerStart错误”
------解决方案--------------------
最常见的的错误是404,报错提示:Servlet action is not available。页面报错,后台不报错。

这个问题最常见也最不好解决,因为出问题的地方不明确,不过一般出错原因是Struts跟Spring的整合出错了,解决问题的办法是,仔细检查Struts和Spring的配置文件。

一般写SSH项目,最好在Hibernate和Spring整合完后,写测试类测试成功以后整合Spring和Struts,整合时同样要写测试类测试。


------解决方案--------------------
8.spring MVC+hibernate 
Exception in thread "main" 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 

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有