From user-javaohampton@example.com Tue Jan 01 17:20:25 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 95643 invoked from network); 1 Jan 2008 17:20:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jan 2008 17:20:25 -0000 Received: (qmail 10050 invoked by uid 500); 1 Jan 2008 17:20:07 -0000 Delivered-To: ohampton@example.com Received: (qmail 10036 invoked by uid 500); 1 Jan 2008 17:20:07 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 10025 invoked by uid 99); 1 Jan 2008 17:20:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jan 2008 09:20:07 -0800 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO n8a.bullet.ukl.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 01 Jan 2008 17:19:53 +0000 Received: from [83.161.120.155] by n8.bullet.ukl.yahoo.com with NNFMP; 01 Jan 2008 17:19:45 -0000 Received: from [83.161.120.155] by t1.bullet.ukl.yahoo.com with NNFMP; 01 Jan 2008 17:19:45 -0000 Received: from [83.161.120.155] by t1.bullet.sp1.yahoo.com with NNFMP; 01 Jan 2008 17:19:45 -0000 Received: from [83.161.120.155] by omp204.mail.sp1.yahoo.com with NNFMP; 01 Jan 2008 17:19:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: ohampton@example.com Received: (qmail 41420 invoked by uid 60001); 1 Jan 2008 17:19:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.mx; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=JVWix53R/X+nDpqmh/SmfvE/srvYzN2v/esx8u0sUuWnl7oNOsT5LDJ0Ao9epAukDxhD0zWgshYvXqdks5qjvWSWWIF1RoJGMcC1ZPxYOTDE3VtZZ7zKBmM+r6i9GAVnYLo9NlTyHUwnHCWske/qpatIz9ghD6GImUlPzspbXDc=; X-YMail-OSG: 1GCYMg0VM1luUX55dV1E8pmPtKEzDA9.BXjaQB5kQs30AoNh9zReoNzAnnYNUE3HEUo6r723M4VZQpiDCfefNFRyFI7Ymk0CeuhQveoF5SesId_YPydvwIVIiknN4g-- Received: from [83.161.120.155] by web44803.mail.sp1.yahoo.com via HTTP; Tue, 01 Jan 2008 09:19:44 PST X-Mailer: YahooMailRC/818.31 YahooMailWebService/83.161.120.155 Date: Tue, 1 Jan 2008 09:19:44 -0800 (PST) From: Carlos de Luna Saenz <ohampton@example.com> Subject: Re: hardcoding value in result map To: ohampton@example.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-750801286-1199207984=:41066" Message-ID: <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-750801286-1199207984=:41066 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable What about something like=0ASelect #value.hardCodeValue#, column1, column2 = from table1 where column1=3D #value.hardCodeValue2 and column2=3D'whatever'= =0A=0A----- Mensaje original ----=0ADe: bhaarat Sharma <ohampton@example.com= >=0APara: ohampton@example.com=0AEnviado: lunes, 31 de diciembre, 20= 07 15:49:36=0AAsunto: hardcoding value in result map=0A=0AHi,=0A=0AWe are c= onverting our traditional ResultSet code to iBatis. But are=0Afacing a pro= blem now.=0A=0AIs there a way to pass a hardcoded value in the resultMap in= stead of a=0Acolumn? this hard coded value will come from a javaCode.=0A=0A= so something like this=0A=0A<result property=3D\"numberMembers\" column=3D\= "value passed from java=0Acode will come here\"/>=0A=0AThanks..=0A=0A=0A=0A= =0A=0A=0A ____________________________________________________________= ________________________=0A=C2=A1Capacidad ilimitada de almacenamiento en t= u correo!=0ANo te preocupes m=C3=A1s por el espacio de tu cuenta con Correo= Yahoo!: =0Ahttp://correo.espanol.yahoo.com/ --0-750801286-1199207984=:41066 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he= ad><body><div style=3D"font-family:times new roman,new york,times,serif;fon= t-size:10pt"><div style=3D"font-family: times new roman,new york,times,seri= f; font-size: 10pt;">What about something like<br>Select #value.hardCodeVal= ue#, column1, column2 from table1 where column1=3D #value.hardCodeValue2 an= d column2=3D'whatever'<br><br><div style=3D"font-family: times new roman,ne= w york,times,serif; font-size: 12pt;">----- Mensaje original ----<br>De: bh= aarat Sharma &lt;ohampton@example.com&gt;<br>Para: ohampton@example.com= rg<br>Enviado: lunes, 31 de diciembre, 2007 15:49:36<br>Asunto: hardcoding = value in result map<br><br>Hi,<br><br>We are converting our traditional Res= ultSet code to iBatis.&nbsp; But are<br>facing a problem now.<br><br>Is the= re a way to pass a hardcoded value in the resultMap instead of a<br>column?= this hard coded value will come from a javaCode.<br><br>so something like this<br><br>&lt;result property=3D\"numberMembers\" column=3D\"value passe= d from java<br>code will come here\"/&gt;<br><br>Thanks..<br></div><br></di= v></div><br>=0A=0A=0A=0A=0A <hr size=3D1><br><font face=3D"Verdana" si= ze=3D"-2">=C2=A1Capacidad ilimitada de almacenamiento en tu correo!<br>No t= e preocupes m=C3=A1s por el espacio de tu cuenta con Correo Yahoo!:<br>=0Ah= ttp://correo.espanol.yahoo.com/</font></body></html> --0-750801286-1199207984=:41066-- From user-javaohampton@example.com Tue Jan 01 22:09:10 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 80249 invoked from network); 1 Jan 2008 22:09:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jan 2008 22:09:10 -0000 Received: (qmail 43105 invoked by uid 500); 1 Jan 2008 22:08:52 -0000 Delivered-To: ohampton@example.com Received: (qmail 43094 invoked by uid 500); 1 Jan 2008 22:08:52 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 43083 invoked by uid 99); 1 Jan 2008 22:08:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jan 2008 14:08:52 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail.gmx.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 01 Jan 2008 22:08:27 +0000 Received: (qmail invoked by alias); 01 Jan 2008 22:08:30 -0000 Received: from stgt-4dbe46bd.pool.einsundeins.de (EHLO [83.161.120.155]) [83.161.120.155] by mail.gmx.net (mp047) with SMTP; 01 Jan 2008 23:08:30 +0100 X-Authenticated: #286618 X-Provags-ID: V01U2FsdGVkX1+u9m051ZmuEmLDAtu/b4HOMKUObNUFASf0HRvbmG YcW7gCHEjMXGGZ Message-ID: <ohampton@example.com> Date: Tue, 01 Jan 2008 23:08:30 +0100 From: =?ISO-8859-1?Q?Heinrich_G=F6tzger?= <ohampton@example.com> User-Agent: Thunderbird 83.161.120.155 (X11/20071115) MIME-Version: 1.0 To: ohampton@example.com Subject: storing BLOBs in Oracle (again) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Hello, there has been a lot of discussion about writing and reading BLOBs already on the list. But none of them satisfies me right now. The requirement is to store files of any type (images, docs, or even movies) and almost any size (not just a view kilos) into the db and make them accessible later within a web application. We probably do not want to hold the file in the memory, as we do not need it ohampton@example.com. It's just from the disc to db and back. In an earlier project, where all the db-access has been done in god old well-written JDBC code we used to have a routine to store which just uses an inputstream from the caller and writes it directly into an outputstream which comes from the resultset like this: [...] SELECT content FROM record WHERE id = ? FOR UPDATE [...] Blob blob = rs.getBlob(1); OutputStream out = ((BLOB) blob).getBinaryOutputStream(); [...] So I'm not sure if this is possible in any way with ohampton@example.com. Or would we just store the content of the stream in a local array and pass it to the DB using the iBATIS way as described here: http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+a+BLOB+or+CLOB Is there an upper limit for the array size? How is it with performance? Thanks for sharing some thoughts. Cheers Heinrich PS: And happy new year, btw. From user-javaohampton@example.com Wed Jan 02 07:49:51 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 1311 invoked from network); 2 Jan 2008 07:49:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 07:49:51 -0000 Received: (qmail 12831 invoked by uid 500); 2 Jan 2008 07:49:34 -0000 Delivered-To: ohampton@example.com Received: (qmail 12817 invoked by uid 500); 2 Jan 2008 07:49:34 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 12806 invoked by uid 99); 2 Jan 2008 07:49:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jan 2008 23:49:34 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO fk-out-0910.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 07:49:12 +0000 Received: by fk-out-0910.google.com with SMTP id f40so6281840fka.0 for <ohampton@example.com>; Tue, 01 Jan 2008 23:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=dgP6simbRPe3Xh/aFzVF0NwryoycQvyReYX5/xJnAh4=; b=oMuRpacZtCiDRiGsZj3x+HBoxgTSBDprR5XytMJYpluvRSvCVHFOnb1fh1HnU5/MAhEZPYeqAggK4L8g0jN65xPRBTQFHaZbOsqgAn+2bRW+pKVr7gbQVpni4d35Xdqy48jrRvhAPejeMSFkmt0YLohBi6WS/TfAXC5vrjL1tQ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=NBEjgmLJ0n9UL6AfdCVcNTDB1KO7VeL3VfnoLpygDc7NNPzHUwkox5OLfnEdk+FI7R6mmWRJx0lWYDDXTi7xvlui6F7vJORAeDfn8ECx1gsP1n5s6dXU3IBkr6Gdt0LJRfEgCTjUxTVZpbotM0Z+Au5+1jF6eFku0Vy6tnw/dTk= Received: by 83.161.120.155 with SMTP id b16mr16247484hud.39.1199260155193; Tue, 01 Jan 2008 23:49:15 -0800 (PST) Received: by 83.161.120.155 with HTTP; Tue, 1 Jan 2008 23:49:15 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 08:49:15 +0100 From: Curro <ohampton@example.com> To: ohampton@example.com Subject: Re: Problem with DB2 and BLOB!! In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27291_27389066.1199260155193" References: <ohampton@example.com> <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_27291_27389066.1199260155193 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi and happy new year for everyone... This is one of the querys that is failing <resultMap id="imagenModel" class="beans.ImagenModelBean"> <result property="idImagen" column="ID_IMAGEN" /> <result property="cdgoTipoImagen" column="CDGO_TIPO_IMG"/> <result property="fileName" column="FILE_NAME"/> <result property="contentType" column="CONTENT_TYPE"/> <result property="length" column="LENGTH"/> <result property="imagenBlob" column="IMAGEN" jdbcType="BLOB"/> <result property="idModelo" column="ID_MODELO" /> </resultMap> <sql id="getImagen"> SELECT imagen.ID_IMAGEN, imagen.CDGO_TIPO_IMG, imagen.FILE_NAME, imagen.CONTENT_TYPE, imagen.LENGTH, imagen.IMAGEN </sql> <select id="getImageByPk" parameterClass="beans.ImagenModelBean" resultMap="imagenModeloCoche"> <include refid="getImagen"/> FROM schema.T_IMAGES imagen, schema.T_MODELS modelo LEFT OUTER JOIN schema.T_MODEL_PZ as clase ON modelo.CDGO_CLASE_PLZ = clase.CDGO_CLASE_PLZ WHERE imagen.ID_IMAGEN = $idImagen$ AND imagen.ID_MODELO = modelo.ID_MODELO </select> The only error code that i have is this: SQL state [FFFFF]; error code [-4]; I hope that anyone can help me. Thanks. 2007/12/18, Abhigyan Agrawal1 <ohampton@example.com>: > > Hi, > To solve the problem, I will require the error code and the query > that is failing. All other queries without BLOB (in same table) are > working > in both, right? > > Cheers, > Abhigyan Agrawal > > > > > > Curro > <ohampton@example.com > om> To > ohampton@example.com > 17/12/2007 14:30 cc > > Subject > Please respond to Problem with DB2 and BLOB!! > ohampton@example.com. > apache.org > > > > > > > > > Hi, > > I have a problem with all the querys that work with BLOB data in DB2 v8.1. > In my local site (Windows) works fine, but in production (Unix) don't > work, > this is the log error: > > > ---> SqlMapClient operation; uncategorized SQLException for SQL []; SQL > state [FFFFF]; error code [-4]; > > > --- The error occurred in mySqlMap.xml. > > > --- The error occurred while executing query. . > > > --- Check the SQL Statement (preparation failed). > > > --- Cause: java.sql.SQLException: DB2JDBCCursor Received Error in > Method describe:RETURN CODE==> -4 SQLSTATE ==> FFFFF Error Tokens ==> > <<DB2 > 8.1 SQLJ/JDBC>> ; nested exception is > com.ibatis.common.jdbc.exception.NestedSQLException : > > > I'm using ibatis 83.161.120.1557 > > Any idea? > > ------=_Part_27291_27389066.1199260155193 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div>Hi and happy new year for everyone...</div> <div>&nbsp;</div> <div>This is one of the querys that is failing</div> <div>&nbsp;</div> <div>&lt;resultMap id=&quot;imagenModel&quot; class=&quot;beans.ImagenModelBean&quot;&gt;<br>&nbsp;&lt;result property=&quot;idImagen&quot; &nbsp;&nbsp;column=&quot;ID_IMAGEN&quot; /&gt;&nbsp;&nbsp;<br>&nbsp;&lt;result property=&quot;cdgoTipoImagen&quot; &nbsp;column=&quot;CDGO_TIPO_IMG&quot;/&gt; <br>&nbsp;&lt;result property=&quot;fileName&quot; &nbsp;&nbsp;column=&quot;FILE_NAME&quot;/&gt;<br>&nbsp;&lt;result property=&quot;contentType&quot; &nbsp;&nbsp;column=&quot;CONTENT_TYPE&quot;/&gt;<br>&nbsp;&lt;result property=&quot;length&quot;&nbsp; &nbsp;column=&quot;LENGTH&quot;/&gt; <br>&nbsp;&lt;result property=&quot;imagenBlob&quot; &nbsp;&nbsp;column=&quot;IMAGEN&quot; jdbcType=&quot;BLOB&quot;/&gt;<br>&nbsp;&lt;result property=&quot;idModelo&quot; &nbsp;&nbsp;column=&quot;ID_MODELO&quot; /&gt;<br>&lt;/resultMap&gt;</div> <div>&nbsp;</div> <div>&lt;sql id=&quot;getImagen&quot;&gt;<br>&nbsp;SELECT<br>&nbsp;&nbsp;imagen.ID_IMAGEN,<br>&nbsp;&nbsp;imagen.CDGO_TIPO_IMG,<br>&nbsp;&nbsp;imagen.FILE_NAME,<br>&nbsp;&nbsp;imagen.CONTENT_TYPE,<br>&nbsp;&nbsp;imagen.LENGTH,<br>&nbsp;&nbsp;imagen.IMAGEN<br>&lt;/sql&gt;<br>&nbsp;<br>&lt;select id=&quot;getImageByPk&quot; parameterClass=&quot; beans.ImagenModelBean&quot; resultMap=&quot;imagenModeloCoche&quot;&gt;<br>&nbsp;&lt;include refid=&quot;getImagen&quot;/&gt;<br>&nbsp;FROM <br>&nbsp;&nbsp;schema.T_IMAGES imagen,<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;schema.T_MODELS modelo<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;LEFT OUTER JOIN schema.T_MODEL_PZ as clase<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;ON modelo.CDGO_CLASE_PLZ = clase.CDGO_CLASE_PLZ<br>&nbsp;WHERE<br>&nbsp;&nbsp;imagen.ID_IMAGEN = $idImagen$<br>&nbsp;&nbsp;AND imagen.ID_MODELO = modelo.ID_MODELO<br>&lt;/select&gt;</div> <div>&nbsp;</div> <div>The only error code that i have is this:&nbsp;<font color="#993300" size="2">&nbsp;SQL state [FFFFF]; error code [-4];</font></div> <div>I hope that anyone can help me.</div> <div>&nbsp;</div> <div>Thanks.</div> <div><br>&nbsp;</div> <div><span class="gmail_quote">2007/12/18, Abhigyan Agrawal1 &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ohampton@example.com" target="_blank">ohampton@example.com</a>&gt;:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br>&nbsp;&nbsp;&nbsp;&nbsp; To solve the problem, I will require the error code and the query<br>that is failing. All other queries without BLOB (in same table) are working <br>in both, right?<br><br>Cheers,<br>Abhigyan Agrawal<br><br><br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Curro<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ohampton@example.com" target="_blank">ohampton@example.com </a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;om&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ohampton@example.com" target="_blank"> ohampton@example.com</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;17/12/2007 14:30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cc<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subject <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please respond to&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Problem with DB2 and BLOB!! <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ohampton@example.com.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://apache.org/" target="_blank">apache.org</a><br><br><br><br><br><br><br><br><br>Hi,<br><br>I have a problem with all the querys that work with BLOB data in DB2 v8.1.<br>In my local site (Windows) works fine, but in production (Unix) don&#39;t work,<br>this is the log error:<br><br><br>---&gt; SqlMapClient operation; uncategorized SQLException for SQL []; SQL<br>state [FFFFF]; error code [-4]; <br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- The error occurred in mySqlMap.xml.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- The error occurred while executing query.&nbsp;&nbsp;.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- Check the SQL Statement (preparation failed).<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--- Cause: java.sql.SQLException: DB2JDBCCursor Received Error in<br>Method describe:RETURN CODE==&gt; -4 SQLSTATE ==&gt; FFFFF Error Tokens ==&gt; &lt;&lt;DB2<br>8.1 SQLJ/JDBC&gt;&gt; ; nested exception is<br>com.ibatis.common.jdbc.exception.NestedSQLException :<br><br><br>I&#39;m using ibatis 83.161.120.1557<br><br>Any idea?<br><br></blockquote></div><br> ------=_Part_27291_27389066.1199260155193-- From user-javaohampton@example.com Wed Jan 02 12:05:19 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 47905 invoked from network); 2 Jan 2008 12:05:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 12:05:19 -0000 Received: (qmail 2820 invoked by uid 500); 2 Jan 2008 12:05:01 -0000 Delivered-To: ohampton@example.com Received: (qmail 2800 invoked by uid 500); 2 Jan 2008 12:05:01 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 2789 invoked by uid 99); 2 Jan 2008 12:05:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 04:05:01 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 12:04:37 +0000 Received: by wa-out-1112.google.com with SMTP id j5so10158894wah.24 for <ohampton@example.com>; Wed, 02 Jan 2008 04:04:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=8OyXJkwIdZd27TCyDD0ZlKzUbGUk5dXPwH/QWqx5Cyk=; b=TG3G+ktpraNvZPuMGLZZf7IkcYqxmd3J7QXVXQFK5bwe6Wy5b2onMdbF5JjECGxqsFrtfjgv8bkYG1q0R4fbwHk40nG1p1sLzVXwb+Vqsxz7EOWqVoqI551LCHtyl0vKU4zUQ9x5EalfTaHWRGM/ZGI+AcAvTjSSj88fbYwPd1E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=A6QOds0ooOknyS2zcdzgmZOS1v6Jh395wyUooe0ofViET786uCr08U8a96FOQz084NAOkUbDF+JUAnyxHcrMW5tM0OKbV3xz82ccmPgC4JMvScvN4etTtLz5DaRxbwlZy/3aSATk/72jmou43TKcGFUZ2M9WxTv5lxNOL9LXfPs= Received: by 83.161.120.155 with SMTP id g1mr15735392wal.2.1199275482222; Wed, 02 Jan 2008 04:04:42 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 04:04:42 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 13:04:42 +0100 From: Chema <ohampton@example.com> To: ohampton@example.com Subject: Re: storing BLOBs in Oracle (again) In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_41080_13031909.1199275482251" References: <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_41080_13031909.1199275482251 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I think that the lastest iBatis version + JDBC driver 10g release solve all about this. Then, use byte[] arrays and BLOB JDBC datatype into your SQLMap config file= . 2008/1/1, Heinrich G=F6tzger <ohampton@example.com>: > > Hello, > > there has been a lot of discussion about writing and reading BLOBs > already on the list. > But none of them satisfies me right now. > > The requirement is to store files of any type (images, docs, or even > movies) and almost any size (not just a view kilos) into the db and make > them accessible later within a web application. > > We probably do not want to hold the file in the memory, as we do not > need it ohampton@example.com. It's just from the disc to db and back. > > In an earlier project, where all the db-access has been done in god old > well-written JDBC code we used to have a routine to store which just > uses an inputstream from the caller and writes it directly into an > outputstream which comes from the resultset like this: > > [...] > SELECT content FROM record WHERE id =3D ? FOR UPDATE > [...] > Blob blob =3D rs.getBlob(1); > OutputStream out =3D ((BLOB) blob).getBinaryOutputStream(); > [...] > > So I'm not sure if this is possible in any way with ohampton@example.com. > Or would we just store the content of the stream in a local array and > pass it to the DB using the iBATIS way as described here: > > > http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+us= e+a+BLOB+or+CLOB > > Is there an upper limit for the array size? > > How is it with performance? > > Thanks for sharing some thoughts. > > Cheers > > Heinrich > > PS: And happy new year, btw. > > ------=_Part_41080_13031909.1199275482251 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <br>I think that the lastest iBatis version + JDBC driver 10g release solve= all about this.&nbsp; <br>Then, use byte[] arrays and BLOB JDBC datatype = into your SQLMap config file.<br><br><br><br><br><div><span class=3D"gmail_= quote"> 2008/1/1, Heinrich G=F6tzger &lt;<a href=3D"mailto:ohampton@example.com">goetzge= ohampton@example.com</a>&gt;:</span><blockquote class=3D"gmail_quote" style=3D"border-l= eft: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:= 1ex;"> Hello,<br><br>there has been a lot of discussion about writing and reading = BLOBs<br>already on the list.<br>But none of them satisfies me right now.<b= r><br>The requirement is to store files of any type (images, docs, or even <br>movies) and almost any size (not just a view kilos) into the db and mak= e<br>them accessible later within a web application.<br><br>We probably do = not want to hold the file in the memory, as we do not<br>need it there at a= ll. It&#39;s just from the disc to db and back. <br><br>In an earlier project, where all the db-access has been done in god= old<br>well-written JDBC code we used to have a routine to store which jus= t<br>uses an inputstream from the caller and writes it directly into an <br>outputstream which comes from the resultset like this:<br><br>[...]<br>= SELECT content FROM record WHERE id =3D ? FOR UPDATE<br>[...]<br>Blob blob = =3D rs.getBlob(1);<br>OutputStream out =3D ((BLOB) blob).getBinaryOutputStr= eam(); <br>[...]<br><br>So I&#39;m not sure if this is possible in any way with iB= ohampton@example.com.<br>Or would we just store the content of the stream in a local= array and<br>pass it to the DB using the iBATIS way as described here: <br><br><a href=3D"http://opensource.atlassian.com/confluence/oss/display/I= BATIS/How+do+I+use+a+BLOB+or+CLOB">http://opensource.atlassian.com/confluen= ce/oss/display/IBATIS/How+do+I+use+a+BLOB+or+CLOB</a><br><br>Is there an up= per limit for the array size? <br><br>How is it with performance?<br><br>Thanks for sharing some thoughts= .<br><br>Cheers<br><br>Heinrich<br><br>PS: And happy new year, btw.<br><br>= </blockquote></div><br> ------=_Part_41080_13031909.1199275482251-- From user-javaohampton@example.com Wed Jan 02 22:06:01 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 16683 invoked from network); 2 Jan 2008 22:06:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 22:06:01 -0000 Received: (qmail 8622 invoked by uid 500); 2 Jan 2008 22:05:47 -0000 Delivered-To: ohampton@example.com Received: (qmail 8609 invoked by uid 500); 2 Jan 2008 22:05:47 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 8598 invoked by uid 99); 2 Jan 2008 22:05:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 14:05:47 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 22:05:35 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <ohampton@example.com>) id 1JABiJ-0002lk-76 for ohampton@example.com; Wed, 02 Jan 2008 14:05:27 -0800 Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 14:05:27 -0800 (PST) From: KWeisser <ohampton@example.com> To: ohampton@example.com Subject: Re: Stored Procedure Problem In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ohampton@example.com References: <ohampton@example.com> <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org I'm not sure I explained it clearly. I'm able to bring up the server, perform a search, and then view the details of my business object. I then click the back button in the browser, and reclick the "View" button for the same business object. On the second attempt, I get the error I mention below. I've put in breakpoints, and the data is the same in the procedures both times. Additionally, if I comment out part of the code that executes the procedure it is failing on the problem disappears. Also I've noticed, that no matter what action I'm trying to perform it is continuing to try to execute the procedure that fails (whether that procedure has anything to do with action I select or not). I just seems odd that everything works, I click the back the button, then resubmit the same request and I receive an error. The connection is being managed through a data source, so I know that this is consistent from execution to execution. Any other thoughts on what could be causing this issue? Regards, Kevin Weisser Stephen Boyd-3 wrote: > > Turn on debug for java.sql.Connection and make sure all the parameters are > being passed correctly. > > On Dec 20, 2007 12:32 PM, KWeisser <ohampton@example.com> wrote: > >> >> I'm currently running a Web project in RSA 7.0 using Ibatis. >> >> When I start my local server, I'm able to successfully retrieve a set of >> data using several strored procedures. If I click the back button in the >> browser, and then try to re-retrieve that same exact data I get an error. >> >> The error tells me that: >> The error occurred in storedProcedureMapping/CMSP3023.xml >> The error occurred while applying the parameter map. >> Check the the GetOffense.params >> Check the results (failed to the retrieve results). >> >> This is an exceptionally odd situation, because it works with no issues >> the >> first time through. Then if I try to run the exact same set of code with >> the same inputs I'm getting this error. I've also verified that I can >> run >> the procedure many times from the command line in DB2. >> >> Any ideas why this would be happening? >> >> Regards, >> >> Kevin Weisser >> -- >> View this message in context: >> http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14441018.html >> Sent from the iBATIS - User - Java mailing list ohampton@example.com. >> >> > > -- View this message in context: http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14587382.html Sent from the iBATIS - User - Java mailing list ohampton@example.com. From user-javaohampton@example.com Wed Jan 02 22:21:49 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 22453 invoked from network); 2 Jan 2008 22:21:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 22:21:49 -0000 Received: (qmail 28227 invoked by uid 500); 2 Jan 2008 22:21:36 -0000 Delivered-To: ohampton@example.com Received: (qmail 28210 invoked by uid 500); 2 Jan 2008 22:21:36 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 28199 invoked by uid 99); 2 Jan 2008 22:21:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 14:21:36 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 22:21:12 +0000 Received: by wa-out-1112.google.com with SMTP id j5so10461871wah.24 for <ohampton@example.com>; Wed, 02 Jan 2008 14:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=ijoT2kBPpHWakShauPfHKRXCktQ4EYqu0UPk8A0wcvg=; b=UFg82Uo6g1oIXaqtNxNmUFRUus4tlxpmjC0uP2UoaiZatstce28ls6WfxQe0Z5cShqN+VT41Y4r0sJiyTgnW6Eyd104G3BuFvfEoZZM/9GjqEqtyIzFPVhSUV5JMj+qYiZCrYJ1BPUtlUNFYnFgqMea9H/Zi4kitKba/NiLKtdQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=WExXAp+/FleeqIqSoFfFseDYUNNggv+sverVyZXS2U/YKmjJGL7DmzrB2W8oD8/b9SCX1xz3QcJ/UPQg/8CmttmwEBb8pR39//rbsaqsqCLxhO7ad6mU46V+NAzdWw+HRiKmmspSPh88hkcYu1++stQmuP9MaDInAnHYRwEDcdA= Received: by 83.161.120.155 with SMTP id q17mr192159wab.70.1199312477212; Wed, 02 Jan 2008 14:21:17 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 14:21:17 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 16:21:17 -0600 From: "Jeff Butler" <ohampton@example.com> To: ohampton@example.com Subject: Re: Stored Procedure Problem In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4841_27815713.1199312477208" References: <ohampton@example.com> <ohampton@example.com> <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_4841_27815713.1199312477208 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline You haven't given us much to go on. I think that turning on logging (as suggested last time) would be a good thing to do. Also, you might try sending the relevant parts of the XML. The only thing I can think of with no other information is that you might be doing some string substitution, or the proc is returning different resultsets. Possibly adding remapResults="true" would fix that. But the logs would help us know for sure! Jeff Butler On Jan 2, 2008 4:05 PM, KWeisser <ohampton@example.com> wrote: > > I'm not sure I explained it clearly. > > I'm able to bring up the server, perform a search, and then view the > details > of my business object. I then click the back button in the browser, and > reclick the "View" button for the same business object. On the second > attempt, I get the error I mention below. > > I've put in breakpoints, and the data is the same in the procedures both > times. Additionally, if I comment out part of the code that executes the > procedure it is failing on the problem disappears. Also I've noticed, > that > no matter what action I'm trying to perform it is continuing to try to > execute the procedure that fails (whether that procedure has anything to > do > with action I select or not). > > I just seems odd that everything works, I click the back the button, then > resubmit the same request and I receive an error. > > The connection is being managed through a data source, so I know that this > is consistent from execution to execution. > > Any other thoughts on what could be causing this issue? > > Regards, > > Kevin Weisser > > > Stephen Boyd-3 wrote: > > > > Turn on debug for java.sql.Connection and make sure all the parameters > are > > being passed correctly. > > > > On Dec 20, 2007 12:32 PM, KWeisser <ohampton@example.com> wrote: > > > >> > >> I'm currently running a Web project in RSA 7.0 using Ibatis. > >> > >> When I start my local server, I'm able to successfully retrieve a set > of > >> data using several strored procedures. If I click the back button in > the > >> browser, and then try to re-retrieve that same exact data I get an > error. > >> > >> The error tells me that: > >> The error occurred in storedProcedureMapping/CMSP3023.xml > >> The error occurred while applying the parameter map. > >> Check the the GetOffense.params > >> Check the results (failed to the retrieve results). > >> > >> This is an exceptionally odd situation, because it works with no issues > >> the > >> first time through. Then if I try to run the exact same set of code > with > >> the same inputs I'm getting this error. I've also verified that I can > >> run > >> the procedure many times from the command line in DB2. > >> > >> Any ideas why this would be happening? > >> > >> Regards, > >> > >> Kevin Weisser > >> -- > >> View this message in context: > >> http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14441018.html > >> Sent from the iBATIS - User - Java mailing list ohampton@example.com<http://nabble.com/> > . > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14587382.html > Sent from the iBATIS - User - Java mailing list ohampton@example.com<http://nabble.com/> > . > > ------=_Part_4841_27815713.1199312477208 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div>You haven&#39;t given us much to go on.&nbsp; I think that turning on logging (as suggested last time) would be a good thing to do.&nbsp; Also, you might try sending the relevant parts of the XML.</div> <div>&nbsp;</div> <div>The only thing I can think of with no other information is that you might be doing some string substitution, or the proc is returning different resultsets.&nbsp;&nbsp;Possibly adding&nbsp;remapResults=&quot;true&quot; would fix that.&nbsp; But the logs would help us know for sure! </div> <div>&nbsp;</div> <div>Jeff Butler<br><br></div> <div class="gmail_quote">On Jan 2, 2008 4:05 PM, KWeisser &lt;<a href="mailto:ohampton@example.com">ohampton@example.com</a>&gt; wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>I&#39;m not sure I explained it clearly.<br><br>I&#39;m able to bring up the server, perform a search, and then view the details <br>of my business object. &nbsp;I then click the back button in the browser, and<br>reclick the &quot;View&quot; button for the same business object. &nbsp;On the second<br>attempt, I get the error I mention below.<br><br>I&#39;ve put in breakpoints, and the data is the same in the procedures both <br>times. &nbsp;Additionally, if I comment out part of the code that executes the<br>procedure it is failing on the problem disappears. &nbsp;Also I&#39;ve noticed, that<br>no matter what action I&#39;m trying to perform it is continuing to try to <br>execute the procedure that fails (whether that procedure has anything to do<br>with action I select or not).<br><br>I just seems odd that everything works, I click the back the button, then<br>resubmit the same request and I receive an error. <br><br>The connection is being managed through a data source, so I know that this<br>is consistent from execution to execution.<br><br>Any other thoughts on what could be causing this issue?<br><br>Regards,<br><br>Kevin Weisser <br> <div> <div></div> <div class="Wj3C7c"><br><br>Stephen Boyd-3 wrote:<br>&gt;<br>&gt; Turn on debug for java.sql.Connection and make sure all the parameters are<br>&gt; being passed correctly.<br>&gt;<br>&gt; On Dec 20, 2007 12:32 PM, KWeisser &lt; <a href="mailto:ohampton@example.com">ohampton@example.com</a>&gt; wrote:<br>&gt;<br>&gt;&gt;<br>&gt;&gt; I&#39;m currently running a Web project in RSA 7.0 using Ibatis.<br>&gt;&gt;<br>&gt;&gt; When I start my local server, I&#39;m able to successfully retrieve a set of <br>&gt;&gt; data using several strored procedures. &nbsp;If I click the back button in the<br>&gt;&gt; browser, and then try to re-retrieve that same exact data I get an error.<br>&gt;&gt;<br>&gt;&gt; The error tells me that: <br>&gt;&gt; The error occurred in storedProcedureMapping/CMSP3023.xml<br>&gt;&gt; The error occurred while applying the parameter map.<br>&gt;&gt; Check the the GetOffense.params<br>&gt;&gt; Check the results (failed to the retrieve results). <br>&gt;&gt;<br>&gt;&gt; This is an exceptionally odd situation, because it works with no issues<br>&gt;&gt; the<br>&gt;&gt; first time through. &nbsp;Then if I try to run the exact same set of code with<br>&gt;&gt; the same inputs I&#39;m getting this error. &nbsp;I&#39;ve also verified that I can <br>&gt;&gt; run<br>&gt;&gt; the procedure many times from the command line in DB2.<br>&gt;&gt;<br>&gt;&gt; Any ideas why this would be happening?<br>&gt;&gt;<br>&gt;&gt; Regards,<br>&gt;&gt;<br>&gt;&gt; Kevin Weisser<br> &gt;&gt; --<br>&gt;&gt; View this message in context:<br>&gt;&gt; <a href="http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14441018.html" target="_blank">http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14441018.html </a><br>&gt;&gt; Sent from the iBATIS - User - Java mailing list archive at <a href="http://nabble.com/" target="_blank">Nabble.com</a>.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br><br></div></div><font color="#888888">--<br> View this message in context: <a href="http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14587382.html" target="_blank">http://www.nabble.com/Stored-Procedure-Problem-tp14441018p14587382.html</a><br></font> <div> <div></div> <div class="Wj3C7c">Sent from the iBATIS - User - Java mailing list archive at <a href="http://nabble.com/" target="_blank">Nabble.com</a>.<br><br></div></div></blockquote></div><br> ------=_Part_4841_27815713.1199312477208-- From user-javaohampton@example.com Wed Jan 02 22:55:13 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 33258 invoked from network); 2 Jan 2008 22:55:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 22:55:13 -0000 Received: (qmail 56869 invoked by uid 500); 2 Jan 2008 22:55:00 -0000 Delivered-To: ohampton@example.com Received: (qmail 56844 invoked by uid 500); 2 Jan 2008 22:55:00 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 56833 invoked by uid 99); 2 Jan 2008 22:55:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 14:55:00 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO py-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 22:54:38 +0000 Received: by py-out-1112.google.com with SMTP id d32so1628418pye.21 for <ohampton@example.com>; Wed, 02 Jan 2008 14:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=+uY8HgcqGQpzq9uqgNpAfjnNMcWer2vK0bnuyhJJYUs=; b=GQC54XrjlT16ZhfU9+a2X1qa06mN4qs4e3JtDVsSjGrFAmxA0YiD7P9SX+FXGtuqlpnIZI9WKsUBKMjnJBPTb2bBeXnFeg/4Vle+hapt5DhA30FvYvmmOwvDxvNWMKAtxZouirmiWFUf4CYvcUk6d9BSjNAfRYR28AlugJzjJ4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=EKTeHhIBUVcU05MaasJRowK7g+Mz3cLOf2/puTTjHtPSrEktegIaxFJlOvb4MC585awgybyeke88Szg9L79vwoHN7d+6n9sreC2Cpn+KEi6kk9R0Sh9WDMmdkiBzrTj/ihbUyolmE2b4rTTRZ64nwhJmFJG/xwBCUhHyeKoVgH4= Received: by 83.161.120.155 with SMTP id a2mr468754wfp.168.1199314481339; Wed, 02 Jan 2008 14:54:41 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 14:54:41 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 17:54:41 -0500 From: "Justin Stanczak" <ohampton@example.com> To: ohampton@example.com Subject: MySQL LAST_INSERT_ID selectKey? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5454_5342488.1199314481341" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5454_5342488.1199314481341 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm currently using this to return the inserted objects generated key. These are auto increment columns and I was wondering if this is correct. I notice if I put the selectKey before the insert it returns the wrong key, is this correct? Just wanted to verify. <insert id="insertRole" parameterClass="Role"> INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES (#name#,#type#,#description#); <selectKey keyProperty="id" resultClass="long"> SELECT LAST_INSERT_ID(); </selectKey> </insert> -- "All that is necessary for the triumph of evil is that good men do nothing." Edmund Burke ------=_Part_5454_5342488.1199314481341 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I&#39;m currently using this to return the inserted objects generated key. These are auto increment columns and I was wondering if this is correct. I notice if I put the selectKey before the insert it returns the wrong key, is this correct? Just wanted to verify. <br><br>&lt;insert id=&quot;insertRole&quot; parameterClass=&quot;Role&quot;&gt;<br>&nbsp; INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES (#name#,#type#,#description#);<br>&nbsp; &lt;selectKey keyProperty=&quot;id&quot; resultClass=&quot;long&quot;&gt; <br>&nbsp; SELECT LAST_INSERT_ID();<br>&nbsp; &lt;/selectKey&gt;<br>&nbsp; &lt;/insert&gt;<br clear="all"><br>-- <br>&quot;All that is necessary for the triumph of evil is that good men do nothing.&quot; &nbsp; Edmund Burke ------=_Part_5454_5342488.1199314481341-- From user-javaohampton@example.com Wed Jan 02 22:59:50 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 34779 invoked from network); 2 Jan 2008 22:59:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 22:59:50 -0000 Received: (qmail 58427 invoked by uid 500); 2 Jan 2008 22:59:38 -0000 Delivered-To: ohampton@example.com Received: (qmail 58412 invoked by uid 500); 2 Jan 2008 22:59:38 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 58400 invoked by uid 99); 2 Jan 2008 22:59:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 14:59:38 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 22:59:15 +0000 Received: by wa-out-1112.google.com with SMTP id j5so10481521wah.24 for <ohampton@example.com>; Wed, 02 Jan 2008 14:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=EzfdJEf5axdHKGppA0TbSts1xAU6X02KFNuuBglbxOI=; b=lViKoyueN7uEdkWUv+frAonmk8S5b7pGFJpQiKEVFVfDYFBjtyo57gAjok3X2YlAxobL2wysLVMghGs1ZjG96jMrMDiw63YGQRZbd8ysotYBpXGf21Kb8WsfH1RqkpGIjw8DZOw5ThlQZ2ZVHXpDE9xrcPwwn/QF1qUgXRuqMfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=rrcPJAX0UXZfR8aC9oJnpqBQzE8xmpRX0THp5xAUhHiIT4hqX0t/7JVHNcKekY6snxS4QINC4Y6qkYo0ACa4ubJy6pvJblmEQfMh8QZYwPyyDB6xryc0MLGvVpn8QSZ+RpD5z8rjwH7l8tu/0XZtUKSeud8i8mICfYIRcaIqQ9Y= Received: by 83.161.120.155 with SMTP id k1mr16234246wam.141.1199314760006; Wed, 02 Jan 2008 14:59:20 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 14:59:19 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 15:59:19 -0700 From: "Nathan Maves" <ohampton@example.com> To: ohampton@example.com Subject: Re: MySQL LAST_INSERT_ID selectKey? In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28565_32469200.1199314760000" References: <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_28565_32469200.1199314760000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline This is correct with mysql. You can also specify the selectKey to be a "pre" or "post" then the placement of the code is not crucial. Nathan On Jan 2, 2008 3:54 PM, Justin Stanczak <ohampton@example.com> wrote: > I'm currently using this to return the inserted objects generated key. > These are auto increment columns and I was wondering if this is correct. I > notice if I put the selectKey before the insert it returns the wrong key, is > this correct? Just wanted to verify. > > <insert id="insertRole" parameterClass="Role"> > INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES > (#name#,#type#,#description#); > <selectKey keyProperty="id" resultClass="long"> > SELECT LAST_INSERT_ID(); > </selectKey> > </insert> > > -- > "All that is necessary for the triumph of evil is that good men do > nothing." Edmund Burke ------=_Part_28565_32469200.1199314760000 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline This is correct with mysql.&nbsp; You can also specify the selectKey to be a &quot;pre&quot; or &quot;post&quot; then the placement of the code is not crucial.<br><br>Nathan<br><br><div class="gmail_quote">On Jan 2, 2008 3:54 PM, Justin Stanczak &lt; <a href="mailto:ohampton@example.com">ohampton@example.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m currently using this to return the inserted objects generated key. These are auto increment columns and I was wondering if this is correct. I notice if I put the selectKey before the insert it returns the wrong key, is this correct? Just wanted to verify. <br><br>&lt;insert id=&quot;insertRole&quot; parameterClass=&quot;Role&quot;&gt;<br>&nbsp; INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES (#name#,#type#,#description#);<br>&nbsp; &lt;selectKey keyProperty=&quot;id&quot; resultClass=&quot;long&quot;&gt; <br>&nbsp; SELECT LAST_INSERT_ID();<br>&nbsp; &lt;/selectKey&gt;<br>&nbsp; &lt;/insert&gt;<br clear="all"><font color="#888888"><br>-- <br>&quot;All that is necessary for the triumph of evil is that good men do nothing.&quot; &nbsp; Edmund Burke </font></blockquote></div><br> ------=_Part_28565_32469200.1199314760000-- From user-javaohampton@example.com Wed Jan 02 23:02:53 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 35896 invoked from network); 2 Jan 2008 23:02:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 23:02:53 -0000 Received: (qmail 61725 invoked by uid 500); 2 Jan 2008 23:02:41 -0000 Delivered-To: ohampton@example.com Received: (qmail 61707 invoked by uid 500); 2 Jan 2008 23:02:41 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 61696 invoked by uid 99); 2 Jan 2008 23:02:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 15:02:41 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO nz-out-0506.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 23:02:18 +0000 Received: by nz-out-0506.google.com with SMTP id x3so975957nzd.6 for <ohampton@example.com>; Wed, 02 Jan 2008 15:02:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=JmTMS8PzfLqfY8GsCBFPG173j1ToqQN6+0HDw8DWP+Q=; b=dmgaCmZ7xaTKYSce60oZ+CWuk1C7/STWQtXxyUP9sllqBRTStjk45JQw6Xkw6G5M5bTdJYgTRZzMazLVO4dRqNLYLnYMtD6cZ7j/ds+AK0nF7EIXymvUfZsv90Ua+Bh9XwP9EHuE3G4np0iXmuTxRayQ4Q4J/4xItAdD4iZSb+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=LaDh2F5caFIRcAJjD/h3YOEtdFp/lIwulPJBbAMvUOsKoXcDLM7fN2puEG3DVo1YlRKsl++0cicm+Yi/eTsklnmqJtowD9SSpGKwmCfoPqaSzJMh6vPJaikAoDeAkkdbJ97jLrVA8armL7n04loEmZxPBG4uGbGri2DmVQezaMs= Received: by 83.161.120.155 with SMTP id a13mr4348172wfg.148.1199314942229; Wed, 02 Jan 2008 15:02:22 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 15:02:22 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 18:02:22 -0500 From: "Justin Stanczak" <ohampton@example.com> To: ohampton@example.com Subject: Re: MySQL LAST_INSERT_ID selectKey? In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5466_21043551.1199314942189" References: <ohampton@example.com> <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5466_21043551.1199314942189 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cool, how do you do that? On Jan 2, 2008 5:59 PM, Nathan Maves <ohampton@example.com> wrote: > This is correct with mysql. You can also specify the selectKey to be a > "pre" or "post" then the placement of the code is not crucial. > > Nathan > > > On Jan 2, 2008 3:54 PM, Justin Stanczak < ohampton@example.com> wrote: > > > I'm currently using this to return the inserted objects generated key. > > These are auto increment columns and I was wondering if this is correct. I > > notice if I put the selectKey before the insert it returns the wrong key, is > > this correct? Just wanted to verify. > > > > <insert id="insertRole" parameterClass="Role"> > > INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES > > (#name#,#type#,#description#); > > <selectKey keyProperty="id" resultClass="long"> > > SELECT LAST_INSERT_ID(); > > </selectKey> > > </insert> > > > > -- > > "All that is necessary for the triumph of evil is that good men do > > nothing." Edmund Burke > > > -- "All that is necessary for the triumph of evil is that good men do nothing." Edmund Burke ------=_Part_5466_21043551.1199314942189 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cool, how do you do that?<br><br><div class="gmail_quote">On Jan 2, 2008 5:59 PM, Nathan Maves &lt;<a href="mailto:ohampton@example.com">ohampton@example.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> This is correct with mysql.&nbsp; You can also specify the selectKey to be a &quot;pre&quot; or &quot;post&quot; then the placement of the code is not crucial.<br><font color="#888888"><br>Nathan</font><div><div></div><div class="Wj3C7c"> <br><br><div class="gmail_quote">On Jan 2, 2008 3:54 PM, Justin Stanczak &lt; <a href="mailto:ohampton@example.com" target="_blank">ohampton@example.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m currently using this to return the inserted objects generated key. These are auto increment columns and I was wondering if this is correct. I notice if I put the selectKey before the insert it returns the wrong key, is this correct? Just wanted to verify. <br><br>&lt;insert id=&quot;insertRole&quot; parameterClass=&quot;Role&quot;&gt;<br>&nbsp; INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES (#name#,#type#,#description#);<br>&nbsp; &lt;selectKey keyProperty=&quot;id&quot; resultClass=&quot;long&quot;&gt; <br>&nbsp; SELECT LAST_INSERT_ID();<br>&nbsp; &lt;/selectKey&gt;<br>&nbsp; &lt;/insert&gt;<br clear="all"><font color="#888888"><br>-- <br>&quot;All that is necessary for the triumph of evil is that good men do nothing.&quot; &nbsp; Edmund Burke </font></blockquote></div><br> </div></div></blockquote></div><br><br clear="all"><br>-- <br>&quot;All that is necessary for the triumph of evil is that good men do nothing.&quot; &nbsp; Edmund Burke ------=_Part_5466_21043551.1199314942189-- From user-javaohampton@example.com Wed Jan 02 23:07:12 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 38343 invoked from network); 2 Jan 2008 23:07:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 23:07:12 -0000 Received: (qmail 66520 invoked by uid 500); 2 Jan 2008 23:06:58 -0000 Delivered-To: ohampton@example.com Received: (qmail 66511 invoked by uid 500); 2 Jan 2008 23:06:58 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 66499 invoked by uid 99); 2 Jan 2008 23:06:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 15:06:58 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO nz-out-0506.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 23:06:47 +0000 Received: by nz-out-0506.google.com with SMTP id x3so976731nzd.6 for <ohampton@example.com>; Wed, 02 Jan 2008 15:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=e1XmCYbslW7E7G50EwWSIyJeAqcvU6/EDqkcn78cwdU=; b=qVnR4MhbmoDOVdr45PuOEGF2aYJv2S2lpkUBZ+ciUprWluoYcWj26lmPHxadjifXCtmICMcHgoa2n0T5cWrTqLNJ5lnmOjkEC70ReWHaa2qwRhU3fFppjXaS1V9td/FbPOYxZMvva1wi3G1PH/hPraQboi5u1gY2ZIGYnoVQUkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=oepG/J2XrYGCuPCfaiSA5nzJzzwhyrg9K8DotY2t9YqK0zRH3/DQLbS8SDfZJ4oNx94ZCr0dMJVmN/Np71XFc4kzMWbqXT6eSRP8bHyzOowst95Kj2XQSidL7pNFwJ/QhdMYV1R4ijRNC+fPZKaXkdkJGRa35Jd7pMzJ/5ADTdk= Received: by 83.161.120.155 with SMTP id z9mr4347515wfz.134.1199315198843; Wed, 02 Jan 2008 15:06:38 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 15:06:38 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 18:06:38 -0500 From: "Justin Stanczak" <ohampton@example.com> To: ohampton@example.com Subject: Re: MySQL LAST_INSERT_ID selectKey? In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5472_31754897.1199315198833" References: <ohampton@example.com> <ohampton@example.com> <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5472_31754897.1199315198833 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I see using type="post", thanks. On Jan 2, 2008 6:02 PM, Justin Stanczak <ohampton@example.com> wrote: > Cool, how do you do that? > > > On Jan 2, 2008 5:59 PM, Nathan Maves <ohampton@example.com> wrote: > > > This is correct with mysql. You can also specify the selectKey to be a > > "pre" or "post" then the placement of the code is not crucial. > > > > Nathan > > > > > > On Jan 2, 2008 3:54 PM, Justin Stanczak < ohampton@example.com> wrote: > > > > > I'm currently using this to return the inserted objects generated key. > > > These are auto increment columns and I was wondering if this is correct. I > > > notice if I put the selectKey before the insert it returns the wrong key, is > > > this correct? Just wanted to verify. > > > > > > <insert id="insertRole" parameterClass="Role"> > > > INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES > > > (#name#,#type#,#description#); > > > <selectKey keyProperty="id" resultClass="long"> > > > SELECT LAST_INSERT_ID(); > > > </selectKey> > > > </insert> > > > > > > -- > > > "All that is necessary for the triumph of evil is that good men do > > > nothing." Edmund Burke > > > > > > > > > -- > "All that is necessary for the triumph of evil is that good men do > nothing." Edmund Burke > -- "All that is necessary for the triumph of evil is that good men do nothing." Edmund Burke ------=_Part_5472_31754897.1199315198833 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I see using type=&quot;post&quot;, thanks.<br><br><div class="gmail_quote">On Jan 2, 2008 6:02 PM, Justin Stanczak &lt;<a href="mailto:ohampton@example.com">ohampton@example.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Cool, how do you do that?<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Jan 2, 2008 5:59 PM, Nathan Maves &lt;<a href="mailto:ohampton@example.com" target="_blank">ohampton@example.com</a>&gt; wrote: <br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> This is correct with mysql.&nbsp; You can also specify the selectKey to be a &quot;pre&quot; or &quot;post&quot; then the placement of the code is not crucial.<br><font color="#888888"><br>Nathan</font><div><div></div><div> <br><br><div class="gmail_quote">On Jan 2, 2008 3:54 PM, Justin Stanczak &lt; <a href="mailto:ohampton@example.com" target="_blank">ohampton@example.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m currently using this to return the inserted objects generated key. These are auto increment columns and I was wondering if this is correct. I notice if I put the selectKey before the insert it returns the wrong key, is this correct? Just wanted to verify. <br><br>&lt;insert id=&quot;insertRole&quot; parameterClass=&quot;Role&quot;&gt;<br>&nbsp; INSERT INTO SAVVYLMS.SVV_ROLE (SVV_NAME,SVV_TYPE_ID,SVV_DESC) VALUES (#name#,#type#,#description#);<br>&nbsp; &lt;selectKey keyProperty=&quot;id&quot; resultClass=&quot;long&quot;&gt; <br>&nbsp; SELECT LAST_INSERT_ID();<br>&nbsp; &lt;/selectKey&gt;<br>&nbsp; &lt;/insert&gt;<br clear="all"><font color="#888888"><br>-- <br>&quot;All that is necessary for the triumph of evil is that good men do nothing.&quot; &nbsp; Edmund Burke </font></blockquote></div><br> </div></div></blockquote></div><br><br clear="all"><br>-- <br>&quot;All that is necessary for the triumph of evil is that good men do nothing.&quot; &nbsp; Edmund Burke </div></div></blockquote></div><br><br clear="all"><br>-- <br>&quot;All that is necessary for the triumph of evil is that good men do nothing.&quot; &nbsp; Edmund Burke ------=_Part_5472_31754897.1199315198833-- From user-javaohampton@example.com Wed Jan 02 23:57:32 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 50963 invoked from network); 2 Jan 2008 23:57:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jan 2008 23:57:32 -0000 Received: (qmail 8369 invoked by uid 500); 2 Jan 2008 23:57:15 -0000 Delivered-To: ohampton@example.com Received: (qmail 8356 invoked by uid 500); 2 Jan 2008 23:57:15 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 8344 invoked by uid 99); 2 Jan 2008 23:57:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 15:57:15 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO ug-out-1314.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 23:56:53 +0000 Received: by ug-out-1314.google.com with SMTP id e2so2621448ugf.21 for <ohampton@example.com>; Wed, 02 Jan 2008 15:56:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=l5fQ+b8N3c/BL+qS5le3Tm3A+HQylztGUfXP+tlHG/Q=; b=cORxLtYFu49f6MnpI0cSPrlJF+jq9cHaqmfNW41P1A7TZwxUCGyxkopMTsTuAdUqBhkJ7w8zPg0nWSQJGUTyYRYkqnXfQG+t5Jm16fvLd7FIlLwep5L9nn5csEIXgn8gm8B0MX9DBLTLb8ztAbNvDW0s/YV1tRkGhGuFFVsgVyc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=TenD+Og1Nui68zEWtajh7bKRnBzpdz3xPNtB0CNkaxddrBejB+rbbYWTrNG5mEDU4UN4O4bJflL6VwrtcL5IkoOaW++4Krq/ozG4Xp6cp/91Wy20qCSLUb8Mr3JomO2X0VVClnONVzs/C3CunQzUunvKFVsGq1Z0I69DbN1ncxo= Received: by 83.161.120.155 with SMTP id v5mr14439068ugh.17.1199318216403; Wed, 02 Jan 2008 15:56:56 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 15:56:56 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 17:56:56 -0600 From: "Gregg Bolinger" <ohampton@example.com> To: ohampton@example.com Subject: Batch Inserts and <selectKey /> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8283_4913516.1199318216397" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8283_4913516.1199318216397 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline If doing a batch insert on several objects I can't seem to retrieve the auto_increment key using the <selectKey /> tag. Individual inserts work just fine. Is this expected? Thanks. Gregg ------=_Part_8283_4913516.1199318216397 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline If doing a batch insert on several objects I can&#39;t seem to retrieve the auto_increment key using the &lt;selectKey /&gt; tag.&nbsp; Individual inserts work just fine.&nbsp; Is this expected?<br><br>Thanks.<br><br>Gregg<br> ------=_Part_8283_4913516.1199318216397-- From user-javaohampton@example.com Thu Jan 03 00:38:17 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 64749 invoked from network); 3 Jan 2008 00:38:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Jan 2008 00:38:17 -0000 Received: (qmail 37171 invoked by uid 500); 3 Jan 2008 00:38:04 -0000 Delivered-To: ohampton@example.com Received: (qmail 37148 invoked by uid 500); 3 Jan 2008 00:38:04 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 37137 invoked by uid 99); 3 Jan 2008 00:38:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 16:38:04 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 00:37:42 +0000 Received: by wa-out-1112.google.com with SMTP id j5so10535422wah.24 for <ohampton@example.com>; Wed, 02 Jan 2008 16:37:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=LMm+J16EDdQ1ABMG0eJRRwJ4aOeN2WDryKGSLL4AF7o=; b=lIclPBdYCO8Byvv2Jtfaz3qu7GTtFHiiHyzNI4PY4WGDxvw+tm75nrpsOz35vCCmEIhMkE7NqY2UQMp8zDgQHGUTOpWgdqXrqDOt/wdqaOY0etryF1/rivM3AZCOEqCjNNnUw/Ssx9/1VQmtrnTJjFdehbGYGLTbxIRFnztpbOc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=nPgIH940kLVng/Xx5IqH559ePRNKKSwtYTtLcorS0EfL99kjQfCPCgjaOqjzkbHnE0rA1INTIy0SoEL/wE45DlzPFNKSlUaL4wR7zaBfpWh7jWKnQ+ylTGQrdBoua3vWlsIbPRvFjBndzgPce1W6dobFm39OUESbIfv+2i6oscQ= Received: by 83.161.120.155 with SMTP id v1mr13841229wad.21.1199320666632; Wed, 02 Jan 2008 16:37:46 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 16:37:46 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 17:37:46 -0700 From: "Nathan Maves" <ohampton@example.com> To: ohampton@example.com Subject: Re: Batch Inserts and <selectKey /> In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28854_26262602.1199320666624" References: <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_28854_26262602.1199320666624 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Gregg, The underlyng call is to http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#executeBatch()which as you can see from the javadocs only returns the number of effected rows. I don't know of any way that would allow you to return the ids for each batched insert with the current java.sql api's. Nathan On Jan 2, 2008 4:56 PM, Gregg Bolinger <ohampton@example.com> wrote: > If doing a batch insert on several objects I can't seem to retrieve the > auto_increment key using the <selectKey /> tag. Individual inserts work > just fine. Is this expected? > > Thanks. > > Gregg > ------=_Part_28854_26262602.1199320666624 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Gregg,<div><br class="webkit-block-placeholder"></div><div>The underlyng call is to&nbsp;<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#executeBatch()">http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#executeBatch() </a> which as you can see from the javadocs only returns the number of effected rows.</div><div><br class="webkit-block-placeholder"></div><div>I don&#39;t know of any way that would allow you to return the ids for each batched insert with the current java.sql api&#39;s.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>Nathan<br><br><div class="gmail_quote">On Jan 2, 2008 4:56 PM, Gregg Bolinger &lt;<a href="mailto:ohampton@example.com"> ohampton@example.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">If doing a batch insert on several objects I can&#39;t seem to retrieve the auto_increment key using the &lt;selectKey /&gt; tag.&nbsp; Individual inserts work just fine.&nbsp; Is this expected? <br><br>Thanks.<br><font color="#888888"><br>Gregg<br> </font></blockquote></div><br></div> ------=_Part_28854_26262602.1199320666624-- From user-javaohampton@example.com Thu Jan 03 00:56:10 2008 Return-Path: <user-javaohampton@example.com> Delivered-To: ohampton@example.com Received: (qmail 67155 invoked from network); 3 Jan 2008 00:56:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Jan 2008 00:56:10 -0000 Received: (qmail 43466 invoked by uid 500); 3 Jan 2008 00:55:53 -0000 Delivered-To: ohampton@example.com Received: (qmail 43449 invoked by uid 500); 3 Jan 2008 00:55:53 -0000 Mailing-List: contact ohampton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ohampton@example.com> List-Unsubscribe: <mailto:ohampton@example.com> List-Post: <mailto:ohampton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ohampton@example.com Delivered-To: mailing list ohampton@example.com Received: (qmail 43438 invoked by uid 99); 3 Jan 2008 00:55:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 16:55:53 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ohampton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO ug-out-1314.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 00:55:31 +0000 Received: by ug-out-1314.google.com with SMTP id e2so2625992ugf.21 for <ohampton@example.com>; Wed, 02 Jan 2008 16:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=aArowJ7Du3bX8iEC7rubMbfJkJd3tyUeHOW6ghk/gDE=; b=VrNvn4aglS6XCukbr9t3Ql4mhhMq4AFZmqvC8c6Ds9b84d7xRwP3HhLS0jh4gbcFvjei/OYqEF14Gj0ytpv5yw2DYLaRW9ratsiDWVAqyzZj15v6UFOAH7sgBc9k+YiBsy1Ll07iDTajPh0N7aGbYoD4BVvspxGuKKWXUCNALjE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=J4ATKFr5zF8bADrC4mcXmkckwXxkhf1g7g5dKjNNl5m5UxqMu3x+igg7vsexZjCj2K6gsY2q5YHcAEV7M2igCqWbcdef1o/RsNOIAKC3b+P3mClNS34dkNEvYfZPd1VAo4VsZhEJoJep3DBZR+mNKeedKwLHbJGjpw3vKDFoUvM= Received: by 83.161.120.155 with SMTP id u20mr14730809ugl.71.1199321735185; Wed, 02 Jan 2008 16:55:35 -0800 (PST) Received: by 83.161.120.155 with HTTP; Wed, 2 Jan 2008 16:55:34 -0800 (PST) Message-ID: <ohampton@example.com> Date: Wed, 2 Jan 2008 18:55:34 -0600 From: "Gregg Bolinger" <ohampton@example.com> To: ohampton@example.com Subject: Re: Batch Inserts and <selectKey /> In-Reply-To: <ohampton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8440_27616325.1199321734752" References: <ohampton@example.com> <ohampton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8440_27616325.1199321734752 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Well, the problem is that I need them for a parent child relationship. Are there any known solutions? So say I batch insert 100 parents. And then I need to batch insert 100 children for each parent. What is the best way to achieve this? Thanks. Gregg On Jan 2, 2008 6:37 PM, Nathan Maves <ohampton@example.com> wrote: > Gregg, > The underlyng call is to http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#executeBatch() > > <http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#executeBatch%28%29>which as you can see from the javadocs only returns the number of effected > rows. > > I don't know of any way that would allow you to return the ids for each > batched insert with the current java.sql api's. > >
{'source': 'Apache Software Foundation Public Mail Archives'}