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 B09348B9C34 for ; Fri, 4 Feb 2005 00:35:41 +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 29403-10 for ; Fri, 4 Feb 2005 00:35:34 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by svr1.postgresql.org (Postfix) with ESMTP id 1EA1E8B9FED for ; Fri, 4 Feb 2005 00:35:36 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 71so419370wra for ; Thu, 03 Feb 2005 16:35:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=VlFdTf8BdIcRRSjK6DF5JrLAAcew9u1544FdPK4aHTKR1YoE/0BDOoQn/XHvcJJuAbJwNTd9jQE61bl386bvBhuHCKVHqjKRP1AY97n2S3SL6feXFeHmwx2eQw5n4rIcKmbH4w9N4ti+LPYOJVdT8FLwJil1QbvWEeucIlLmWCI= Received: by 10.54.31.20 with SMTP id e20mr4202wre; Thu, 03 Feb 2005 16:35:35 -0800 (PST) Received: by 10.54.35.39 with HTTP; Thu, 3 Feb 2005 16:35:35 -0800 (PST) Message-ID: <714bb51a0502031635613f6fdb@mail.gmail.com> Date: Thu, 3 Feb 2005 18:35:35 -0600 From: Nahum Castro Reply-To: Nahum Castro To: pgsql-jdbc@postgresql.org Subject: Re: next() error In-Reply-To: <4202AE28.2080300@opencloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable References: <714bb51a050203145120066735@mail.gmail.com> <4202AE28.2080300@opencloud.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200502/20 X-Sequence-Number: 12200 On Fri, 04 Feb 2005 12:05:12 +1300, Oliver Jowett wr= ote: > Nahum Castro wrote: >=20 > > javax.servlet.ServletException: ResultSet not positioned properly, > > perhaps you need to call next. >=20 > > Has changed something on the server or on the driver? >=20 > Newer drivers follow the JDBC specification more strictly. >=20 > > ResultSet RecordsetPubs1 =3D StatementRecordsetPubs1.executeQuery(); > > boolean RecordsetPubs1_isEmpty =3D ! RecordsetPubs1.next(); > > boolean RecordsetPubs1_hasData =3D ! RecordsetPubs1_isEmpty; >=20 > [...] >=20 > > <%=3D(((RecordsetPubs1_data =3D > > RecordsetPubs1.getObject("au_id"))=3D=3Dnull || > > RecordsetPubs1.wasNull())?"":RecordsetPubs1_data)%> >=20 > You appear to be calling ResultSet.getObject() even if ResultSet.next() > returned false. You're not allowed to do this -- see the JDBC javadoc. >=20 > -O >=20 Thank you.=20 I solved the problem now. --=20 Nahum Castro Gonz=E1lez Le=F3n, Guanajuato, M=E9xico