<update id="modifystatuees" parameterClass="java.util.HashMap">
update goodsinfo..Base_Attri set STATUE=#statue#
<dynamic prepend="where GOODS_GUID in">
<iterate property="list" open="(" close=")" conjunction=",">
#list#
</iterate>
</dynamic>
</update>测试类:
HashMap hashMap=new HashMap();
List<Integer> list=new ArrayList<Integer>();
list.add(1);
list.add(2);
list.add(3);
base.setStatue("5");
hashMap.put("list", list);
hashMap.put("base", base);
boolean bl=hello.modifyStatuees(hashMap);异常:
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy0.modifyStatuees(Unknown Source)
at com.b2c.test.HessionTest.main(HessionTest.java:63)
Caused by: com.caucho.hessian.io.HessianServiceException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the parameter mapping for the 'list' property.
--- Cause: java.lang.NullPointerException; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the parameter mapping for the 'list' property.
--- Cause: java.lang.NullPointerException
at com.caucho.hessian.io.HessianInput.prepareFault(HessianInput.java:368)
at com.caucho.hessian.io.HessianInput.startReply(HessianInput.java:336)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:199)
... 2 more是不是配置文件有问题啊?我把#list#改成#list[]#,异常信息
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy0.modifyStatuees(Unknown Source)
at com.b2c.test.HessionTest.main(HessionTest.java:63)
Caused by: com.caucho.hessian.io.HessianServiceException: SqlMapClient operation; SQL [];
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: JZ006: 捕获到 IO 例外:java.io.IOException: JZ0SL: 不受支持的 SQL 类型 0。; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: JZ006: 捕获到 IO 例外:java.io.IOException: JZ0SL: 不受支持的 SQL 类型 0。
at com.caucho.hessian.io.HessianInput.prepareFault(HessianInput.java:368)
at com.caucho.hessian.io.HessianInput.startReply(HessianInput.java:336)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:199)
... 2 more
update goodsinfo..Base_Attri set STATUE=#statue#
<dynamic prepend="where GOODS_GUID in">
<iterate property="list" open="(" close=")" conjunction=",">
#list#
</iterate>
</dynamic>
</update>测试类:
HashMap hashMap=new HashMap();
List<Integer> list=new ArrayList<Integer>();
list.add(1);
list.add(2);
list.add(3);
base.setStatue("5");
hashMap.put("list", list);
hashMap.put("base", base);
boolean bl=hello.modifyStatuees(hashMap);异常:
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy0.modifyStatuees(Unknown Source)
at com.b2c.test.HessionTest.main(HessionTest.java:63)
Caused by: com.caucho.hessian.io.HessianServiceException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the parameter mapping for the 'list' property.
--- Cause: java.lang.NullPointerException; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the parameter mapping for the 'list' property.
--- Cause: java.lang.NullPointerException
at com.caucho.hessian.io.HessianInput.prepareFault(HessianInput.java:368)
at com.caucho.hessian.io.HessianInput.startReply(HessianInput.java:336)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:199)
... 2 more是不是配置文件有问题啊?我把#list#改成#list[]#,异常信息
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy0.modifyStatuees(Unknown Source)
at com.b2c.test.HessionTest.main(HessionTest.java:63)
Caused by: com.caucho.hessian.io.HessianServiceException: SqlMapClient operation; SQL [];
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: JZ006: 捕获到 IO 例外:java.io.IOException: JZ0SL: 不受支持的 SQL 类型 0。; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the base_attri.modifystatuees-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: JZ006: 捕获到 IO 例外:java.io.IOException: JZ0SL: 不受支持的 SQL 类型 0。
at com.caucho.hessian.io.HessianInput.prepareFault(HessianInput.java:368)
at com.caucho.hessian.io.HessianInput.startReply(HessianInput.java:336)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:199)
... 2 more
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货