日期:2014-05-18  浏览次数:20771 次

大家帮忙总结下,使用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" 做一个像CSDN上发帖的框?该怎么解决