一. ssh extjs整合时候 在action中不可以写服务对象的get方法否则会报
java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with modifiers "public" org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:250)
二. extjs默认返回的id为字符串形式,需要在action中转换为数字。否则会报setId方法错误
三. 在用myeclipse工具整合ssh时候容易出现如下报错
ava.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
解决办法是:
1.去掉类路径上的关于Hibernate的3个lib
asm.jar
asm-attrs.jar
cglib-2.1.3.jar
2.加入Spring中的以下4个lib
asm-2.2.2.jar
asm-commons-2.2.2.jar
asm-util-2.2.2.jar
cglib-nodep-2.1_3.jar
四.今天遇到一个问题,当action返回一个对象时,在页面上用el表达式取出来,却提示no session错误,如下
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
在网上查了很多出的错误都是用了关联关系,但我没有用关联关系啊,于是把所有字段都加上了lazy="false" 但是还是不行,于是在表头添加了lazy="false"却变好了,郁闷的问题天天有,只是每天郁闷的不一样。。。。。。
五. 将Hibernate Core Libraries下的xerces-2.6.2.jar文件删除
报错内容为
Caused by: Caught exception while loading file struts-default.xml - [unknown location]