SSH框架 bug记录

来源:互联网 发布:淘宝哪家手办店好 编辑:程序博客网 时间:2024/05/16 17:21

遇到bug不要慌,框架的错误太过多样化,baidu能力有限,自己慢慢查才是王道

 

D:\MyEclipse\MyEclipse10\configuration\org.eclipse.osgi\bundles\95\1\.cp\myeclipse-data\3.3

Struts2 99, Spring 98, Hibernate 95

 

网上查,好多人说是没有spring的相关包,但是我有些不赞成,因为我的昨天还能启动的,所以应该不是这个问题

最后我发现可能是tomcat的缓存问题,解决方法为:

把eclipse里面的servers全部删除,然后把工程clean一下,之后重新建一个server运行。这样问题的就解决了。

 

 

2014/7/18

Problem: Exception starting filter struts2 Unableto load configuration.

Explanation: 导入struts2 library 时出现问题,删了也不好使,加入liabrary的时候tomcat会自动部署到自己那个工程的lib里面,进去后发现tmd包重了

 

2014/7/18

Problem: Background Indexer Crash Recoveryjava.lang.StackOverflowError

EX: 直接x,内存溢出

 

2014/7/18

P: IOException parsing XML document fromServletContext resource [/WEB-INF/applicat

E: 将IDE自动生成的applicationContext.xml放到WEB-INF 文件夹下即可

 

 

2014/7/21

P: Unable to load configuration, parsestruts.xml error

E:有可能struts.xml文件配置有问题,也有可能使用约定的时候配置有问题:result 为json时父包和default不一样!!!

 

 

2014/7/22

P:The type org.springframework.dao.DataAccessException cannot be resolved.It is indirectly referenced from required .class files

E: 少包,加了个spring.dao, 具体里面什么包我也不清楚

 

2014/7/23

及时备份稳定版本的工程文件和tomcat lib里的包

 

 

2014/7/23

P: Class 'org.apache.commons.dbcp.BasicDataSource'not found

E: 导入org.apache.commons.dbcp.jar

 

2014/7/23

P:java.lang.RuntimeException:java.lang.RuntimeException:java.lang.reflect.InvocationTargetException - Class:com.opensymphony.xwork2.inject.ContainerBuilder$4

File:ContainerBuilder.java

 

E: javassist-3.7.ga.jar

 

 

2014/7/23

P: 获取不到ApplicationContext

E:// ClassPathXmlApplicationContext 是读取 src 目录下的配置文件
ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");

//  FileSystemXmlApplicationContext 
即系统文件路径,文件的目录。
ApplicationContext context = new FileSystemXmlApplicationContext("WebRoot/WEB-INF/applicationContext.xml");

上面的都不好使,直接把xml多写一个在src下就好了

 

 

2014/7/31

P: column not found, sql语句 selectcount 出错,

E: hibernate 3 中进行查询需要设置返回值的类型,hibernate4中不需要,又是版本的问题

 String sql ="select count(*) as c from  users";
SQLQuery sq =session.createSQLQuery(sql).addScalar("c", Hibernate.INTEGER);

0 0
原创粉丝点击