ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <larry.mead...@gmail.com>
Subject Re: iBATIS: NullPointerException when returning value from a stored procedure in MSSQL
Date Fri, 22 Feb 2008 16:17:46 GMT
I only see IN parameters.

Larry


On Fri, Feb 22, 2008 at 8:46 AM, Ahmed, Arshad <aahmed@cavtel.com> wrote:
>
>
>
>
> Hi,
>  I'm using iBATIS as a persistent mechanism to write data to MSSQL. there is
> a stored procedure that i'm executing and it returns an integer value, the
> procedure executes fine but when i try to collect the result back, i get the
> following error:
>
>  com.ibatis.common.jdbc.exception.NestedSQLException:
>  --- The error occurred in VendorOrder.xml.
>  --- The error occurred while applying a parameter map.
>  --- Check the VendorOrder.paramVendorOrder.
>  --- Check the results (failed to retrieve results).
>  --- Cause: java.lang.NullPointerException
>  Caused by: java.lang.NullPointerException
>        at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
>        at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
>        at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:561)
>        at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:536)
>        at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:93)
>        at
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:70)
>        at
> com.talk.provisioning.ebtacomservice.server.persistence.ibatis.VendorOrderDAO.insert(VendorOrderDAO.java:91)
>        at
> com.talk.provisioning.ebtacomservice.server.EBondingHelper.insertVendorOrder(EBondingHelper.java:451)
>        at
> com.talk.provisioning.ebtacomservice.server.EBondingHelper.persistCreateTicketPreBinding(EBondingHelper.java:703)
>        at
> com.talk.provisioning.ebtacomservice.server.EBondingWebService.CreateTicket(EBondingWebService.java:158)
>        at
> com.talk.provisioning.ebtacomservice.server.Test.main(Test.java:15)
>  Caused by: java.lang.NullPointerException
>        at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:355)
>        at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQueryProcedure(SqlExecutor.java:291)
>        at
> com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement.sqlExecuteQuery(ProcedureStatement.java:34)
>        at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
>        ... 10 more
>
>
>  the following is an extract from my SQLConfig map file
>
>
>    <parameterMap id="paramVendorOrder" class="vendor_order_class">
>      <parameter property="workQueueIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="orderItemIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="vendorIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="vendorOrderTypeIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="vendorStatusIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="vendorTicket" jdbcType="VARCHAR"
> javaType="java.lang.String" mode="IN" />
>      <parameter property="createdBy" jdbcType="VARCHAR"
> javaType="java.lang.String" mode="IN" />
>      <parameter property="contactName" jdbcType="VARCHAR"
> javaType="java.lang.String" nullValue="" mode="IN" />
>      <parameter property="contactPhone" jdbcType="VARCHAR"
> javaType="java.lang.String" nullValue="" mode="IN" />
>      <parameter property="updatedBy" jdbcType="VARCHAR"
> javaType="java.lang.String" mode="IN" />
>      <parameter property="actionCode" jdbcType="VARCHAR"
> javaType="java.lang.String" mode="IN" />
>      <parameter property="incidentIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="vendorMeet" jdbcType="VARCHAR"
> javaType="java.lang.String" mode="IN" />
>      <parameter property="callingSystemIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="DBSystemIDAsLong" jdbcType="INT"
> javaType="java.lang.Long" mode="IN" />
>      <parameter property="commitTime" jdbcType="DATETIME"
> javaType="java.util.Date" mode="IN" />
>    </parameterMap>
>
>    <procedure id="sp_insert_ebonding_vendororder_b"
> resultClass="java.lang.Long" parameterMap="paramVendorOrder">
>      {call
> sp_insert_ebonding_vendororder_b(?,?,?,?,?,?,?,?,?,null,null,?,null,null,?,?,?,?,?,?)}
>    </procedure>
>
>  can someone please help me?
>
>  Thanks.

Mime
View raw message