You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Brian Zhou (JIRA)" <ib...@incubator.apache.org> on 2005/04/14 18:40:16 UTC
[jira] Created: (IBATIS-107) call stored procedure with parameterClass instead of parameterMap
call stored procedure with parameterClass instead of parameterMap
-----------------------------------------------------------------
Key: IBATIS-107
URL: http://issues.apache.org/jira/browse/IBATIS-107
Project: iBatis for Java
Type: Bug
Versions: 2.0.9b
Environment: linux 2.4.22, sun java 1.4.2_07, Microsoft SQL Server 2000, MS JDBC Driver SP1
Reporter: Brian Zhou
Trying to call the stored procedure byroyalty in the pubs sample database that comes with SQL Server.
The following SQL statement and procedure call with parameterMap works
<select id="select-royalty" resultClass="string" parameterClass="int">
select au_id from titleauthor where royaltyper = #value#
</select>
<parameterMap id="pmap1" class="map">
<parameter property="percentage" jdbcType="INTEGER" javaType="java.lang.Integer" mode="IN" />
</parameterMap>
<procedure id="sp-byroyalty" resultClass="string" parameterMap="pmap1">
{call byroyalty(?)}
</procedure>
But calling it with parameterClass (either int or java.lang.Integer)
<procedure id="sp1-byroyalty" resultClass="string" parameterClass="int">
{call byroyalty(?)}
</procedure>
give me the following error:
com.ibatis.common.jdbc.exception.NestedSQLException: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in conf/sql-map.xml.
--- The error occurred while applying a parameter map.
--- Check the sp1-byroyalty-InlineParameterMap.
--- Check the statement (update procedure failed).
--- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Closed: (IBATIS-107) call stored procedure with parameterClass instead of parameterMap
Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATIS-107?page=all ]
Clinton Begin closed IBATIS-107:
--------------------------------
Assign To: Clinton Begin
Resolution: Invalid
The syntax you're using for the inline parameter (i.e. parameter class) is invalid. You must use #param# syntax. For example:
<procedure id="sp1-byroyalty" resultClass="string" parameterClass="int">
{call byroyalty(#value#)}
</procedure>
Cheers,
Clinton
> call stored procedure with parameterClass instead of parameterMap
> -----------------------------------------------------------------
>
> Key: IBATIS-107
> URL: http://issues.apache.org/jira/browse/IBATIS-107
> Project: iBatis for Java
> Type: Bug
> Components: SQL Maps
> Versions: 2.0.9b
> Environment: linux 2.4.22, sun java 1.4.2_07, Microsoft SQL Server 2000, MS JDBC Driver SP1
> Reporter: Brian Zhou
> Assignee: Clinton Begin
>
> Trying to call the stored procedure byroyalty in the pubs sample database that comes with SQL Server.
> The following SQL statement and procedure call with parameterMap works
> <select id="select-royalty" resultClass="string" parameterClass="int">
> select au_id from titleauthor where royaltyper = #value#
> </select>
> <parameterMap id="pmap1" class="map">
> <parameter property="percentage" jdbcType="INTEGER" javaType="java.lang.Integer" mode="IN" />
> </parameterMap>
> <procedure id="sp-byroyalty" resultClass="string" parameterMap="pmap1">
> {call byroyalty(?)}
> </procedure>
> But calling it with parameterClass (either int or java.lang.Integer)
> <procedure id="sp1-byroyalty" resultClass="string" parameterClass="int">
> {call byroyalty(?)}
> </procedure>
> give me the following error:
> com.ibatis.common.jdbc.exception.NestedSQLException: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in conf/sql-map.xml.
> --- The error occurred while applying a parameter map.
> --- Check the sp1-byroyalty-InlineParameterMap.
> --- Check the statement (update procedure failed).
> --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
> Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (IBATIS-107) call stored procedure with parameterClass instead of parameterMap
Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATIS-107?page=all ]
Brandon Goodin updated IBATIS-107:
----------------------------------
Component: SQL Maps
> call stored procedure with parameterClass instead of parameterMap
> -----------------------------------------------------------------
>
> Key: IBATIS-107
> URL: http://issues.apache.org/jira/browse/IBATIS-107
> Project: iBatis for Java
> Type: Bug
> Components: SQL Maps
> Versions: 2.0.9b
> Environment: linux 2.4.22, sun java 1.4.2_07, Microsoft SQL Server 2000, MS JDBC Driver SP1
> Reporter: Brian Zhou
>
> Trying to call the stored procedure byroyalty in the pubs sample database that comes with SQL Server.
> The following SQL statement and procedure call with parameterMap works
> <select id="select-royalty" resultClass="string" parameterClass="int">
> select au_id from titleauthor where royaltyper = #value#
> </select>
> <parameterMap id="pmap1" class="map">
> <parameter property="percentage" jdbcType="INTEGER" javaType="java.lang.Integer" mode="IN" />
> </parameterMap>
> <procedure id="sp-byroyalty" resultClass="string" parameterMap="pmap1">
> {call byroyalty(?)}
> </procedure>
> But calling it with parameterClass (either int or java.lang.Integer)
> <procedure id="sp1-byroyalty" resultClass="string" parameterClass="int">
> {call byroyalty(?)}
> </procedure>
> give me the following error:
> com.ibatis.common.jdbc.exception.NestedSQLException: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in conf/sql-map.xml.
> --- The error occurred while applying a parameter map.
> --- Check the sp1-byroyalty-InlineParameterMap.
> --- Check the statement (update procedure failed).
> --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
> Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira