ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Jr." <robe...@softsite.com.br>
Subject Stored Procedures
Date Thu, 27 Oct 2005 20:33:20 GMT

Hi everyone.

I'm having this problem and i have no idea of how solve it.
I have a stored procedure that makes some inserts and updates, besides create temp tables
..., that returns some data after all. It's something like that:

CREATE PROCEDURE sp_return_venc ...
...
INSERT INTO....
..
UPDATE..
...
SELECT * FROM TEMP

So I have a procedure that returns a lot of columns.
I tried to use it like a normal procedure

<procedure
		id="br.com.adn.predial.model.sqlmap.Medicao.retrieveVencimentosMedicao2"
		resultClass="java.util.HashMap">

		exec sp_return_venc '003', '2006-01-01', 1000, 1

</procedure>

but it throws an exception

org.springframework.jdbc.UncategorizedSQLException: (SqlMapClientTemplate): encountered SQLException
[  
--- The error occurred in br/com/adn/predial/model/sqlmap/Medicao.xml.  
--- The error occurred while applying a parameter map.  
--- Check the br.com.adn.predial.model.sqlmap.Medicao.retrieveVencimentosMedicao2-InlineParameterMap.
 
--- Check the results (failed to retrieve results).  
--- Cause: java.lang.NullPointerException]; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
  
--- The error occurred in br/com/adn/predial/model/sqlmap/Medicao.xml.  
--- The error occurred while applying a parameter map.  
--- Check the br.com.adn.predial.model.sqlmap.Medicao.retrieveVencimentosMedicao2-InlineParameterMap.
 
--- Check the results (failed to retrieve results).  
--- Cause: java.lang.NullPointerException
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in br/com/adn/predial/model/sqlmap/Medicao.xml.  
--- The error occurred while applying a parameter map.  
--- Check the br.com.adn.predial.model.sqlmap.Medicao.retrieveVencimentosMedicao2-InlineParameterMap.
 
--- 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)

If i execute a procedure that just return values or a procedure that just alter some data
in tables but don't return values, it works, but if i execute a procedure that alter data
in tables and return values, so it doesn't work.

Does anybody knows something for me?

Thank's a lot.
__________________________
Roberto C. Lima Jr.
SoftSite Mobile.
www.softsite.com.br

Mime
View raw message