ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kezerashvili, Denis" <Denis.Kezerashv...@gs.com>
Subject RE: iBATIS with DB2 stored procedure call problem
Date Mon, 17 Dec 2007 14:28:09 GMT
Thank you! That solves the problem. I really appreciate your help.


________________________________

	From: Stephen Boyd [mailto:swboyd@gmail.com] 
	Sent: Saturday, December 15, 2007 9:00 AM
	To: user-java@ibatis.apache.org
	Subject: Re: iBATIS with DB2 stored procedure call problem
	
	
	You need to set currentFunctionPath=PERMIT on the datasource.
It is a custom property that can be set on the jdbc url.  For example,
	
	
jdbc:db2://host:port/dbname:currentFunctionPath=PERMIT;currentSchema=PER
MIT;
	
	If you are running in websphere, setting this can be done in the
custom properties of the datasource.
	
	
	
	On Dec 14, 2007 2:00 AM, Abhigyan Agrawal1 <
abhigyan_agrawal@in.ibm.com <mailto:abhigyan_agrawal@in.ibm.com> >
wrote:
	


		Are you sure that the user name you are providing in
config file has access to the schema? I tried simulating the problem but
it is working without specifying in the schema name. May be you can send
what config you are using. 
		
		Cheers,
		Abhigyan Agrawal
		
		
		
		
		
"Kezerashvili, Denis" <Denis.Kezerashvili@gs.com> 

14/12/2007 00:11 

Please respond to
user-java@ibatis.apache.org

To
<user-java@ibatis.apache.org> 	
cc
	
Subject
iBATIS with DB2 stored procedure call problem	

		





		We are using iBATIS as a persistence layer running on
top of DB2. 
		We've ran into a problem executing stored procedure. 

		The following works: 
		<procedure id="user.deleteById"
parameterClass="DaoUserId" >             
		               {call
PERMIT.PERMIT_DELETE_USER_BY_ID_SP(#id#, #updateId#)} 
		</procedure> 

		But this does not: 
		<procedure id="user.deleteById"
parameterClass="DaoUserId" >             
		               {call PERMIT_DELETE_USER_BY_ID_SP(#id#,
#updateId#)} 
		</procedure> 

		The error reported is that stored procedure named
PERMIT_DELETE_USER_BY_ID_SP cannot be found. 

		Basically we are forced to specify the schema name for
the stored procedure. The schema name is set up in the config file and
we do not have to specify it for any regular <insert>, <update>,
<delete> elements. 

		Have anyone seen this problem and knows how to solve it?
We have multiple schemas used by different developers, so hard coding it
is not an option. 

		Thank you in advance. 

		



Mime
View raw message