读书人

ssi!救命!

发布时间: 2012-09-05 15:19:35 作者: rapoo

ssi求助!!!救命!!!
本人新人,学校刚毕业,没接触过ssi的架子。现在跟着做项目。老大一天天看不到人。一个添加方法。后台请求doupdate方法。protected Boolean doUpdate() {
System.out.println("juqiuhaoshi....................................");
try{
//if("".equals(staffLicense.getLicense_id()) || staffLicense.getLicense_id()==null){
System.out.println("添加人员资质在action中。。。。。。。。。。。。。。。。。。。。。");
System.out.println(staffLicense.getLicense_id()+"--------------------------");
System.out.println(staffLicense.getStaff_name()+"--------------------------");

this.staffBiz.SaveStaffLicense(staffLicense);
//return true;
//}
//else{
//System.out.println("updata in action ..............................kkkk");
//System.out.println(staffLicense);
//this.staffBiz.updateStaffLicense(staffLicense);
//return false;
//}
}catch(Exception e){
e.printStackTrace();
}
return true;

}
方法已经走进来了。实现类的方法也走进来了。public void SaveStaffLicense(StaffLicense staffLicense){
System.out.println("sava in impl./....................................");
System.out.println(staffLicense.getLicense_id());
this.dao.update("staffLicense.updateStaffLicense",staffLicense);
}

都可以在控制台上面打印出来的。但是程序报错

org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/hpi/sheo/domain/staff/StaffLicense.xml.
--- The error occurred while applying a parameter map.
--- Check the staffLicense.updateStaffLicense-InlineParameterMap.
--- Check the statement (update procedure failed).
--- Cause: java.sql.SQLException: ORA-06550: 第 1 行, 第 176 列:
PLS-00103: 出现符号 ""在需要下列之一时:
. ( ) , * @ % & | = - + < / >
at in is mod remainder not range rem => .. <an exponent (**)>
<> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_
between || multiset member SUBMULTISET_
这样子的错误。//数据库staff_license表对应实体
private String license_id;//人员资质代码
private String staff_id;//人员代码(staff)
private String license_type;//证书类别(param)
private String license_nbr;//证书编号
private String issuing_organ;//发证机关
private String issuing_time;//发证日期
private String expire_time;//到期日期
private String train_id; //培训代码(train)
private String remark;//备注


//后台关联表字段

private String course; //train 表course字段
private String staff_name;//后台staff表中的staff_name字段

//前台文本框id
private String issuingBeginTime; //前台:发证日期:开始时间
private String issuingEndTime; //前台:发证日期:结束时间
private String expireBeginTime; //前台:到期时间:开始时间
private String expireEndTime; //前台:到期时间:结束时间


我的实体类。
id在数据库中是number类型的。我感觉是类型转换的错误页不知道对不对,该怎么改求高手指点。拜谢



<procedure id="updateStaffLicense" parameterClass="stafflicense">
<![CDATA[
{call
sheo_staff.staff_license_u(#license_id#,
#staff_id#,
#license_type#,
#license_nbr#,
#issuing_organ#,
to_date#issuing_time#,
to_date#expire_time#,
#train_id#,
#remark#)}
]]>

</procedure>

这是我的xml配置文件。



[解决办法]
BadSqlGrammarException
数据库语法错误。
检查一下你调用的存储过程和传递的值
------解决方案--------------------


StaffLicense.xml.配置文件里面看看sql语法,把to_date去掉,或者时间先去掉,看看对不对

读书人网 >J2EE开发

热点推荐