ssh学习笔记(1)
2009-08-25 18:29
190 查看
学习struts2、hibernate、spring也有一段时间了。 这两天集成三个框架,做了个小小的实例。练习过程中出现的异常真的是层出不穷、五花八门搞得我头都大了,其中这几个错误让我记忆犹深。
第一个:<br /> Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMe解决办法是:
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
原因是:spring中的asm jar包和hibernate里的asm jar包冲突,得删除当中一个。
第二个:<br />Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 55<br />execution(*com.compss.sevice.impl.ProductManagerImpl.*(..))<br />可能出现的问题是:*com.compss.sevice.impl.ProductManagerImpl * 后面要留一个空格。
第三个:
Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.springframework.transaction.config.TxNamespaceHandler] for namespace [http://www.springframework.org/schema/tx]: problem with handler class file or dependent class; nested exception is java.lang.AbstractMethodError: org.springframework.transaction.config.TxNamespaceHandler.init()V
可能原因是: struts2.x 版本的问题,我开始时用的struts2.1.6出现这个错误始终没有解决,而换成struts2.0.14后就没有出现这个问题了。
第四个:
java.lang.IllegalArgumentException: attempt to create saveOrUpdate event with null entity
这个问题也让看半天没看明白,网上的答案也是五花八门。
但最后还是从网上找到了这个答案。
一般是因为jsp页面传的对象属性不对 如:
<s:textfield name="author.username" label="name"></s:textfield>
但action中是 Author a; 故应修改为:
<s:textfield name="a.username" label="name"></s:textfield>
第一个:<br /> Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMe解决办法是:
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
原因是:spring中的asm jar包和hibernate里的asm jar包冲突,得删除当中一个。
第二个:<br />Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 55<br />execution(*com.compss.sevice.impl.ProductManagerImpl.*(..))<br />可能出现的问题是:*com.compss.sevice.impl.ProductManagerImpl * 后面要留一个空格。
第三个:
Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.springframework.transaction.config.TxNamespaceHandler] for namespace [http://www.springframework.org/schema/tx]: problem with handler class file or dependent class; nested exception is java.lang.AbstractMethodError: org.springframework.transaction.config.TxNamespaceHandler.init()V
可能原因是: struts2.x 版本的问题,我开始时用的struts2.1.6出现这个错误始终没有解决,而换成struts2.0.14后就没有出现这个问题了。
第四个:
java.lang.IllegalArgumentException: attempt to create saveOrUpdate event with null entity
这个问题也让看半天没看明白,网上的答案也是五花八门。
但最后还是从网上找到了这个答案。
一般是因为jsp页面传的对象属性不对 如:
<s:textfield name="author.username" label="name"></s:textfield>
但action中是 Author a; 故应修改为:
<s:textfield name="a.username" label="name"></s:textfield>
相关文章推荐
- ssh学习笔记
- Linux 学习笔记_12_文件共享服务_4_SSH
- 【学习笔记】Python网络编程(三)利用socket模拟ssh协议
- OA (ssh) 基本实现(poi 生成 Excel , struts2动态下载 mysql) 学习笔记(含源代码)
- NVIDIA TK1 学习笔记(7):SSH远程登录
- Python学习笔记-SSH连接
- Linux的学习笔记-ssh远程连接排错
- ssh学习笔记
- SSH学习笔记(二)
- Linux学习笔记-Linux打开SSH服务
- JavaEE学习笔记之SSH—Hibernate(2)
- ssh学习笔记一:struts框架学习
- 【ssh学习笔记】struts处理json异常之JSONWriter can not access a member of class org.springframework.aop.TruePoin
- 【安全牛学习笔记】SSH远程端口转发和动态端口转发以及X协议转发
- 2016年1月5日 SSH学习笔记
- OA (ssh) 基本实现(poi 生成 Excel , struts2动态下载 mysql数据库文件) 学习笔记(含源代码)
- hadoop学习笔记1:实现ssh免密码登录
- SSH学习笔记1
- ssh之struts学习笔记(三)输入校验