Mybatis + stored procedure - How to Pass a long value to a procedure using mybatis

uutooober

I read up most of the websites with examples and the mybatis documentation. I am definitely missing something simple and am going to look really stupid.

Can someone please take a look at why this procedure does not even get called when my DAO invokes the id?

Here is what I added to my .xml file.

<parameterMap id="validateProcedure_paramMap" class="java.lang.Long">
  <parameter property="requestId" jdbcType="NUMERIC"  mode="IN">
</parameterMap> 
<!--  Calls stored procedure -->

<procedure id="validateRequest" parameterMap="validateProcedure_paramMap">
{call NG_PKG.validateRequest_sp(?)}
</procedure>

I just call it normally via the DAO. The DAO is getting the long parameter passed in

 public void validateRequest(long reqId) throws SQLException
{       

    sqlMap.queryForObject("validateRequest", reqId);

}

Can someone see if I am doing anything wrong - and what is it that I am doing wrong :( Control just goes over the DAObut does the procedure is not getting called in the database.

uutooober

Sorry, Folks I should have posted what I found out.

I was looking in the wrong place. My procedure seems to have been getting called. It is just that my transaction handling that was being done was not committing this part of it.

I had a separate method that has a starttransaction and a commit transaction and an endtransaction using the ibatis SQLTransactionManager.

The method that calls this stored procedure gets called after that. For some reason, it wouldn't commit this. I removed the endtransaction on the different method and am only ending it in one palce - which is actually what I want. I only want to commit at the end of the validation procedure anyways. So, it works after I played around with my transactionmanagement.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

execute Oracle stored procedure using MyBatis/Spring and parse results to a POJO

From Dev

how to get value of parameter and pass it to a stored procedure?

From Dev

How to Pass null value to stored procedure in sql

From Dev

MyBatis and Sybase Stored Procedure - ResultSet with unnamed columns

From Dev

how to pass multiple values using stored procedure?

From Dev

How do I pass my variable value into my stored procedure

From Dev

From C#, How to pass a clob value to oracle stored procedure

From Dev

How to pass Nullable Bit type value into to SQL Server stored procedure?

From Dev

MyBatis annotations to call Stored Procedure and get Out Params

From Dev

how to pass parameters to a stored procedure using @NamedNativeQuery in spring hibernate

From Dev

how to pass parameters to a stored procedure using @NamedNativeQuery in spring hibernate

From Dev

How to pass multiple parameters to stored procedure using pdo in php

From Dev

How to call a stored procedure and get return value in Slick (using Scala)

From Dev

How can I send a null value to a stored procedure using SqlParameter?

From Dev

How return value exec in table function without using a stored procedure?

From Dev

SQL Procedure call from mybatis

From Dev

SQL Procedure call from mybatis

From Dev

How to pass an array of <List> to a stored procedure

From Dev

How to pass output parameter to a Stored Procedure?

From Dev

How to pass a variable to a query in Oracle stored procedure?

From Dev

How should I pass a formula in stored procedure?

From Dev

How do I pass a table to a stored procedure?

From Dev

How to pass output parameter to a Stored Procedure?

From Dev

pymysql how to pass parameters for a stored procedure

From Dev

How to set a value with the return value of a stored procedure

From Dev

Textbox value to database using stored procedure

From Dev

How to use mybatis to return a table or setof from procedure call with postgresql?

From Dev

stored procedure not returning a value

From Dev

stored procedure not returning a value

Related Related

  1. 1

    execute Oracle stored procedure using MyBatis/Spring and parse results to a POJO

  2. 2

    how to get value of parameter and pass it to a stored procedure?

  3. 3

    How to Pass null value to stored procedure in sql

  4. 4

    MyBatis and Sybase Stored Procedure - ResultSet with unnamed columns

  5. 5

    how to pass multiple values using stored procedure?

  6. 6

    How do I pass my variable value into my stored procedure

  7. 7

    From C#, How to pass a clob value to oracle stored procedure

  8. 8

    How to pass Nullable Bit type value into to SQL Server stored procedure?

  9. 9

    MyBatis annotations to call Stored Procedure and get Out Params

  10. 10

    how to pass parameters to a stored procedure using @NamedNativeQuery in spring hibernate

  11. 11

    how to pass parameters to a stored procedure using @NamedNativeQuery in spring hibernate

  12. 12

    How to pass multiple parameters to stored procedure using pdo in php

  13. 13

    How to call a stored procedure and get return value in Slick (using Scala)

  14. 14

    How can I send a null value to a stored procedure using SqlParameter?

  15. 15

    How return value exec in table function without using a stored procedure?

  16. 16

    SQL Procedure call from mybatis

  17. 17

    SQL Procedure call from mybatis

  18. 18

    How to pass an array of <List> to a stored procedure

  19. 19

    How to pass output parameter to a Stored Procedure?

  20. 20

    How to pass a variable to a query in Oracle stored procedure?

  21. 21

    How should I pass a formula in stored procedure?

  22. 22

    How do I pass a table to a stored procedure?

  23. 23

    How to pass output parameter to a Stored Procedure?

  24. 24

    pymysql how to pass parameters for a stored procedure

  25. 25

    How to set a value with the return value of a stored procedure

  26. 26

    Textbox value to database using stored procedure

  27. 27

    How to use mybatis to return a table or setof from procedure call with postgresql?

  28. 28

    stored procedure not returning a value

  29. 29

    stored procedure not returning a value

HotTag

Archive