Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5241B9FA5DD for ; Tue, 10 Apr 2007 14:22:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 61694-02 for ; Tue, 10 Apr 2007 14:22:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web50604.mail.re2.yahoo.com (web50604.mail.re2.yahoo.com [206.190.38.91]) by postgresql.org (Postfix) with SMTP id 4BABA9FA4D4 for ; Tue, 10 Apr 2007 14:22:33 -0300 (ADT) Received: (qmail 56389 invoked by uid 60001); 10 Apr 2007 17:14:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=oDh+dW2qmi41f1j4usEtizCosj9AZpNgBzd93XZopstVEPMYQ9KzrtyO7s4hTf6NPKx1zEpP9+bdsoofrWSxxfVF3G9JzmLdazmOEscnBxqORP2UhgWaEr3cPfOtpTvYchEHojiP7r82uRfk7MxdqFtWbgX8ixA/19ao01tgA9Q=; X-YMail-OSG: ccRnNlwVM1mFSuZNHhrfd0vfJiMEOhph9ziXbLnXcsiLrrONLma0eVz3JrkIl94ERLjw6FihtzFkDpF_V5.ae3whjsiTFkAZC2t.T8xFr6O79e5VtkEDg8VjHPevxf6FJYL2TbUCO5WlqJJIcG1xwQ9T Received: from [220.227.207.38] by web50604.mail.re2.yahoo.com via HTTP; Tue, 10 Apr 2007 10:14:11 PDT X-Mailer: YahooMailRC/478 YahooMailWebService/0.7.41.10 Date: Tue, 10 Apr 2007 10:14:11 -0700 (PDT) From: Bellur Ashwin Subject: Exception in running query To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1653894708-1176225251=:44713" Message-ID: <758357.44713.qm@web50604.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.123 tagged_above=0 required=5 tests=AWL=1.232, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447, HTML_50_60=0.134, HTML_MESSAGE=0.001 X-Spam-Level: ** X-Archive-Number: 200704/12 X-Sequence-Number: 16861 --0-1653894708-1176225251=:44713 Content-Type: text/plain; charset=ascii Hi, I issued one query to postgres using JDBC, it returned an exception saying the specified column does not exist. My java code handles this exception and subsequently when i try to run some other queries i am getting the following exception: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.RangeCheck(ArrayList.java:546) at java.util.ArrayList.get(ArrayList.java:321) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1223) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:221) my java code is Statement stmt1=conn.createStatement(); try{ ResultSet rs1=stmt1.executeQuery("select * from emp where e1<=100"); /* col e1 does not exist in table emp but table */ /* emp exist */ }catch(Exception e) { e.printStackTrace(); } Statement stmt2=conn.createStatement(); try{ ResultSet rs2=stmt2.executeQuery("select * from emp"); //Here i am getting exception }catch(Exception e) { e.printStackTrace(); } Can i know where the problem is? With Regards, Bellur Ashwin Send a FREE SMS to your friend's mobile from Yahoo! Messenger. Get it now at http://in.messenger.yahoo.com/ --0-1653894708-1176225251=:44713 Content-Type: text/html; charset=ascii
Hi,
I issued one query to postgres using JDBC, it returned an exception saying the specified column does not exist. My java code handles this exception and subsequently when i try to run some other queries i am getting the following exception:

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at java.util.ArrayList.RangeCheck(ArrayList.java:546)
    at java.util.ArrayList.get(ArrayList.java:321)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1223)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:221)


my java code is

Statement stmt1=conn.createStatement();
try{

    ResultSet rs1=stmt1.executeQuery("select * from emp where e1<=100");  
/* col e1 does not exist in table emp but table  */                                                                                                                       /*      emp exist  */

  }catch(Exception e)
    {
       e.printStackTrace();
    }

Statement stmt2=conn.createStatement();
try{

    ResultSet rs2=stmt2.executeQuery("select * from emp");         //Here i am getting exception

 }catch(Exception e)
{
    e.printStackTrace();                          
}


Can i know where the problem is?

With Regards,
Bellur Ashwin


Check out what you're missing if you're not on Yahoo! Messenger --0-1653894708-1176225251=:44713--