|
Hi, Apologies, errors in previous mail. I’m trying to get the return values from a stored procedure. Working
from the standard example below, Would I be calling the
procedure like this: try {
map.put(“id”,
null);
map.put(“email”, “[EMAIL PROTECTED]”); sqlMapClient.queryForObject("saveTouch", map);
log.info("id:
" + (String)map.get("id")); log.info("email: " + (String)map.get("email")); } catch
(Exception e) { e.printStackTrace(); } <parameterMap
id="emailParameters" class="java.util.HashMap" > <parameter
property="id"
jdbcType="NUMBER"
javaType="java.lang.Integer" mode="INOUT"/> <parameter
property="email" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN"/> </parameterMap> <procedure
id="saveEmailAddresses" parameterMap="emailParameters" > {call
save_email_address (?, ?)} </procedure> Currently returning this
error: --- The error occurred in
SqlMapEMDB.xml. --- The error occurred while applying a
parameter map. --- Check the touchParameters. --- Check the output parameters (retrieval of
output parameters failed). --- Cause: java.lang.NullPointerException Caused by: java.lang.NullPointerException 15:04:47,765 ERROR [STDERR] at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:184) 15:04:47,765 ERROR [STDERR] at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:100) Is there any reassignment
necessary from the queryForObject method??? I’m using SQL
Server and the id parameter in the stored procedure is set to INOUT. Thanks, Kevin |
- returning value from stored procedure Broderick, Kevin
- FW: returning value from stored procedure Broderick, Kevin
