ibatis的一些错误码解释以及解决方法、一些使用心得
来源:互联网 发布:淘宝看店宝 编辑:程序博客网 时间:2024/05/22 06:53
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=641217
1. --- Cause: java.sql.SQLException: 无效的列类型; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
原因:
某个字段的插入值为空
解决方法:
将该字段的数值添加进去,或者将格式转化为动态的sql
2.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/kompakar/queue/transfusion/dao/ibatis/map/HisInfo.xml.
--- The error occurred while applying a parameter map.
--- Check the getPatientInfoByClinicNo-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-01002: 读取违反顺序
ORA-02063: 紧接着line(源于DBLINKFGHIS)
Caused by: java.sql.SQLException: ORA-01002: 读取违反顺序
ORA-02063: 紧接着line(源于DBLINKFGHIS)
原因:
在不应该提交事务的地方,主动提交了事务。用DBLINK方式连接另一个数据库,在IBATIS中必须声明为事务。
解决方法:
将这个方法声明为事务。
3.
错误码:
com.ibatis.common.beans.ProbeException: There is no READABLE property named 'tAlarmlogId' in class 'com.kompakar.queue.transfusion.bo.TAlarmLogBO'
错误原因:
BO文件中定义的变量,中间有大写的,所以在匹配中出错。--准确的说,是ibatis中的第二个字母不能大写
解决方法:
将BO文件中的所有变量名都修改为小写。
4.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mraServiceTarget' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'patientMedicalAlertDAO' of bean class [com.kompakar.ehealth.service.impl.mra.MRAService]: Bean property 'patientMedicalAlertDAO' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.NotWritablePropertyException: Invalid property 'patientMedicalAlertDAO' of bean class [com.kompakar.ehealth.service.impl.mra.MRAService]: Bean property 'patientMedicalAlertDAO' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:831)
原因:在service中配置了property,但是在具体的service实现类中,却没有声明该property,以及没有实现相应的set和get方法(bean的方法)。
解决方案:
在service的实现类中,增加该属性字段的声明和set、get方法
5、17:12:14,796 ERROR eHealthActionServlet:68 - class com.kompakar.ehealth.common.frame.communicate.eHealthActionServlet Exception occured in performing process(HttpServletRequest request, HttpServletResponse response).javax.servlet.ServletException: There is no statement named WardMstr-getAllwardList in this SqlMap.
at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at com.kompakar.ehealth.common.frame.communicate.eHealthActionServlet.process(eHealthActionServlet.java:64)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
可能原因:
A、在相应的sqlmap配置文件真的没有 “WardMstr-getAllwardList ”
B、在sqlmap配置文件中, 没有引用对应表的配置xml文件。
解决方法:
修改sqlmap相应的配置文件。
6、在sqlmap中,特殊字符需要用 <![CDATA[ ]]>符号将特殊字符括起来
- ibatis的一些错误码解释以及解决方法、一些使用心得
- ibatis的一些错误码解释以及解决方法、一些使用心得(转)
- ibatis的一些错误码解释以及解决方法、一些使用心得
- ibatis的一些错误码解释以及解决方法、一些使用心得
- iBatis net的一些心得
- shell中使用curl时,数据为乱码的解决方法,以及一些参数的解释
- 使用@ResponseBody的一些问题以及解决方法
- 一些错误的解决方法
- Sqlite3的心得理解以及一些使用的经验
- Win2003 下 IIS6 的一些错误以及解决方法
- Linux下安装Oracle出现的一些错误,以及解决方法
- JAVA开发:分享一些SpringMvc+Ibatis+spring的框架使用心得
- MySql的一些错误解决方法
- Git 一些错误的解决方法
- Git 一些错误的解决方法
- Git 一些错误的解决方法
- Git 一些错误的解决方法
- Git 一些错误的解决方法
- 测试
- ibatis使用时容易出的两个小失误
- LINQ to SQL系列Part 4 - Updating our Database
- maven profiles
- 一个初学者的困惑
- ibatis的一些错误码解释以及解决方法、一些使用心得
- linux下使用iso文件
- 史上最简单的AJAXo(∩_∩)o...
- 轻松把Excel数据导入到MS-SQL2000里去
- C++ const用法总结
- 8086/8088的内部寄存器
- ubuntu 配置系统字符集的方法
- CIO慎实施:SaaS无法解决“关键”问题?
- 纽约时报:谷歌与微软的网络大战