X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CC0618B9E7B for ; Thu, 3 Feb 2005 23:05:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14774-04 for ; Thu, 3 Feb 2005 23:05:21 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 732538B9F18 for ; Thu, 3 Feb 2005 23:05:21 +0000 (GMT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1Cwq2E-0002UI-00; Fri, 04 Feb 2005 12:05:14 +1300 Message-ID: <4202AE28.2080300@opencloud.com> Date: Fri, 04 Feb 2005 12:05:12 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0 (X11/20041228) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nahum Castro Cc: pgsql-jdbc@postgresql.org Subject: Re: next() error References: <714bb51a050203145120066735@mail.gmail.com> In-Reply-To: <714bb51a050203145120066735@mail.gmail.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/19 X-Sequence-Number: 12199 Nahum Castro wrote: > javax.servlet.ServletException: ResultSet not positioned properly, > perhaps you need to call next. > Has changed something on the server or on the driver? Newer drivers follow the JDBC specification more strictly. > ResultSet RecordsetPubs1 = StatementRecordsetPubs1.executeQuery(); > boolean RecordsetPubs1_isEmpty = ! RecordsetPubs1.next(); > boolean RecordsetPubs1_hasData = ! RecordsetPubs1_isEmpty; [...] > <%=(((RecordsetPubs1_data = > RecordsetPubs1.getObject("au_id"))==null || > RecordsetPubs1.wasNull())?"":RecordsetPubs1_data)%> You appear to be calling ResultSet.getObject() even if ResultSet.next() returned false. You're not allowed to do this -- see the JDBC javadoc. -O