Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 56094 invoked from network); 11 Sep 2008 12:35:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 12:35:03 -0000 Received: (qmail 97387 invoked by uid 500); 11 Sep 2008 12:34:58 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 97372 invoked by uid 500); 11 Sep 2008 12:34:58 -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 97361 invoked by uid 99); 11 Sep 2008 12:34:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 05:34:58 -0700 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 giovanni.cuccu@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 12:34:00 +0000 Received: by py-out-1112.google.com with SMTP id x79so276378pyg.21 for ; Thu, 11 Sep 2008 05:34:32 -0700 (PDT) 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 :content-transfer-encoding:content-disposition:references; bh=BZ6daP7WjSRMG9AWRYz80DG1nmJ3gKRHPvCKNx2HKwQ=; b=HEaFRShLrVSo73Fm3VIAVVmRa+v3T7hoVqSIniQWH1AmyIGyTKAFDRyzKMhgmnX1gP LjiUvQgG0Yt1IgprrbDXdwftQ2WJ65htjj3u80xBeJr4GeKiawOxygLL4jNfSGAMoFjJ wwYhcSrnow13SkUnE1+mTBBR7DuwFHJt6yg/M= 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:content-transfer-encoding:content-disposition :references; b=c0RG0AulOXDvtenLIhq+/gfKVFJVD+PTai1kicrXY8Z5Lwg56PkKxo5pWWStxSIR7v Bb7jHOZ5b0clRpMjU0I+aCYHz4MIl9aYvbTXizQ6FKdnCm8BVzP09r8D25ZDuDGzfg3D XXy4sZVSnErxsuhn3/ZxaGiwNePwHTkeMZnjU= Received: by 10.142.172.12 with SMTP id u12mr926144wfe.35.1221136471727; Thu, 11 Sep 2008 05:34:31 -0700 (PDT) Received: by 10.142.158.11 with HTTP; Thu, 11 Sep 2008 05:34:31 -0700 (PDT) Message-ID: <23e0d1170809110534w522c020bjd800c885f7f02060@mail.gmail.com> Date: Thu, 11 Sep 2008 14:34:31 +0200 From: "Giovanni Cuccu" To: user-java@ibatis.apache.org Subject: Re: IBatis Random ORA-01722: invalid number error In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <23e0d1170809102354g754f4915i5c4806f134652964@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org a logon trigger is ok, if you like you could transform them in two alter system statements. Once you got the oracle trace file with the errors we can get in touch to see what is happening. Giovanni On Thu, Sep 11, 2008 at 2:05 PM, Givler, Eric wrote: > For the first two alter session statements, would those occur within a logon trigger for the account? I'm wondering what you mean by "after you get the connection". For the other two, I can just write two additional statements that are fired before and after this query. > > I really appreciate the assistance on this. It's happening sporadically in 3 different queries. They all use HashMaps as parameters and HashMaps as the return results. I don't know if that's an issue, but I thought I'd mention it again. > > -----Original Message----- > From: Giovanni Cuccu [mailto:giovanni.cuccu@gmail.com] > Sent: Thursday, September 11, 2008 2:55 AM > To: user-java@ibatis.apache.org > Subject: Re: IBatis Random ORA-01722: invalid number error > > > Eric, > if you have the iBatis logs and all seems ok I suggest you to enable the oracle trace with the following instructions these one should be issued after you get the connection alter session set timed_statistics=true; alter session set max_dump_file_size=unlimited; > > these one should be issued before executing the sql > alter session set events '10046 trace name context forever, level 12' ; > > these one should be issued after executing the sql > alter session set events '10046 trace name context off'; > > Oracle should produce a trc file in the $ORACLE_HOME//udump directory of the server you can analyze the file by yourself (it's not veary understandable at firt sigth) or with tkprof. in the trc files you can see the value of the bind variable, the type and the error. with these information it should be easy to diagnose the issue. Giovanni > > > On Thu, Sep 11, 2008 at 3:05 AM, Givler, Eric wrote: >> We have a production application that is periodically returning an >> error from a query. In fact, the user refreshes the page and the same >> query runs fine. The query takes a hashmap as a parameter and returns >> an ArrayList of hashmaps. When we examine the logs, in which we can >> see the query and the jdbc parameters and resultsets, the parameters >> and query are identical between calls, except the first call fails. >> >> The mapping query is like this: >> >> >> >> The call is like: >> HashMap params = new HashMap(); >> params.add( "id", new Long("123"); >> List result = (ArrayList) >> sqlMap.queryForList("Namespace.getDatabaseRows", params ); >> >> If we cut&paste the query that is failing into other tools, like >> SQL*Plus, or TOAD for Oracle, it runs fine. In fact, if we step it, >> it runs fine. Today, out of the 70 times it executed, it failed 4 >> times. The user refreshed the page each time and the query ran >> without error. >> >> Is there anything we can do to track down what is happening here? It >> seems like the parameter must be somehow read/treated as a character >> on the first call which would make it fail, but we see in the log that >> it's a java.lang.Long. If it helps, we are in a Java 1.4.2 >> environment under ORacle Application Server 10.1.2.1, and the iBATIS >> version is 2.1.7.597. The backend database is Oracle 10G Release 2 >> 10.2.0.3 I think. >> >> Thanks for any help, >> Eric >> > > > > -- > -------------------------------------------------------------------- > "You don't know the power of dark side" - Darth Vader > -- -------------------------------------------------------------------- "You don't know the power of dark side" - Darth Vader