Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 32927 invoked from network); 7 Sep 2005 12:39:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Sep 2005 12:39:51 -0000 Received: (qmail 81620 invoked by uid 500); 7 Sep 2005 12:39:49 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 81489 invoked by uid 500); 7 Sep 2005 12:39:48 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 81471 invoked by uid 99); 7 Sep 2005 12:39:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2005 05:39:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of matt.koranda@edb.com designates 212.18.128.227 as permitted sender) Received: from [212.18.128.227] (HELO mail5.EDB.local) (212.18.128.227) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2005 05:39:59 -0700 Received: from edboslaex010.edb.local (edboslaex010.edb.local) by mail5.EDB.local (Content Technologies SMTPRS 4.3.17) with ESMTP id ; Wed, 7 Sep 2005 14:39:43 +0200 Received: from EDBCL01AP010.EDB.local ([212.18.134.93]) by edboslaex010.edb.local with Microsoft SMTPSVC(6.0.3790.211); Wed, 7 Sep 2005 14:39:43 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Connection hangs with SQL query string 1983 of length, can this be a SQLMap bug ? Date: Wed, 7 Sep 2005 14:39:42 +0200 Message-ID: <6D8222F55B8A004FB28713CC2104F9D287A358@EDBCL01CN011.EDB.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Connection hangs with SQL query string 1983 of length, can this be a SQLMap bug ? Thread-Index: AcWzphaeg93++a2PQlq/M26lBTcphQAAvKVQ From: "Koranda Matthew James" To: , X-OriginalArrivalTime: 07 Sep 2005 12:39:43.0231 (UTC) FILETIME=[38B750F0:01C5B3A9] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I agree with the driver advice, classes12 is pretty old, have you tried ojdbc14.jar? Matt=20 -----Original Message----- From: Larry Meadors [mailto:larry.meadors@gmail.com]=20 Sent: 7. september 2005 14:17 To: user-java@ibatis.apache.org Subject: Re: Connection hangs with SQL query string 1983 of length, can this be a SQLMap bug ? Wow, that is a wacky one..it seems most likely that it is a driver issue (i can promise that there is no "if(sql.length() =3D=3D 1983) = blowChunks();" code in SQL Maps. Can you try it with the latest Oracle drivers? From all reports, the 10g drivers resolved a ton of bugs that were popping up. It might not hurt to update to a more recent iBATIS build, too. Larry On 9/7/05, erlend.bjorge@aftenposten.no wrote: > Hi there! >=20 > When digging for the error in my previous message: >=20 > "Possible to set timeout on the connection ?" >=20 > I came over a very strange bug somewhere from SQLMap, the Oracle=20 > driver classes12.jar and to the database Oracle 9.2. >=20 > I do a plain SQL without binding variables (I do $complexWhere$ ->=20 > myBean.geComplexWhere) in the xml file) the query looks like this from the debug info: >=20 > DEBUG 2005-09-07 11:55:50,003 com.ibatis.common.jdbc.logging.PreparedStatementLogProxy (Line: 48) - {pstm-100007} > PreparedStatement: select C.COMPANYID, C.DMID, .......... where ... > and (( C.ORGANIZATIONNO like '%Galleri Henrik%' > or lower(C.BUSINESSNAME) like lower('%Galleri Henrik%') > or lower(C.MARKETNAME) like lower('%Galleri Henrik%') ......) ) ) > order by ..... >=20 > DEBUG 2005-09-07 11:55:50,023=20 > com.ibatis.common.jdbc.logging.PreparedStatementLogProxy (Line: 49) -=20 > {pstm-100007}Parameters: [] DEBUG 2005-09-07 11:55:50,033=20 > com.ibatis.common.jdbc.logging.PreparedStatementLogProxy (Line: 50) -=20 > {pstm-100007} Types: [] >=20 > (mine lineshifts in the query, and mine replacments of sql with .....) >=20 > --- >=20 > The query string is of 1983 length (if you count the spaces before the > "select" statment), or 1973 without the spaces, no tail whitespaces=20 > counted. When I search e.g. for 'Galleri Henrik', the query string get exactly total 1983 of length. But lets say it's 1983 then. >=20 > SO WHEN the query string is of exactly 1983 of length the SQLMap=20 > connection hangs and I get some kind of lock in the database (CURSOR=20 > BIND). Believe it or not !!! I still can't believe it :-) >=20 > One Oracle guru told me that the case could be that Oracle are not=20 > able to return the result back again after doing this query and goes into somekind of wait modus. Waiting for "something" > for the connection ?? I don't have a clue. >=20 > It's nothing wrong with the data or the SQL. I can copy&paste this=20 > query string into a SQL tool, using the same Oracle JDBC driver as=20 > SQLMap does (I use DbVisualizer), and run the query with or without the whitespaces in front, and the query runs just fine under 1 second. >=20 > This make me think, can this has something with SQLMap to do ? Do=20 > SQLMap somekind of string manipulating that could result in some kind of "modus" when the query string is of 1983 in length ? > Oracle can handle more then that of course and should be discovered=20 > for a long time agao if that was the case ? Same with the driver, but what about SQLMap ??? A bug ? >=20 > It's a actually unbelievably this case, when the query string is less=20 > or larger than 1983, no problem at all, makes it even more strange. As > my previous e-mail, when size is 1982 or 1984 no problem, And it's not related to Galleri Henrik .. I can typ in '1234567 123456' -> same error, it's the length !! >=20 > -- >=20 > Have you heard of this before ? :-) Any wild ideas ?? Something I should test ? >=20 > -- >=20 > The quick solution is to remove many whitespaces in the sql string =3D = > become less that 1983 of length with normal searches. Not that quick is to make binding variables. > Tested both, works just fine. >=20 > We use the SQLMap version available in january 2005. >=20 > Clues ? >=20 >=20 > Cheers, > Erlend >