X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 75D46D775E for ; Sun, 28 Aug 2005 14:01:55 -0300 (ADT) 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 33638-04 for ; Sun, 28 Aug 2005 17:01:54 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by svr1.postgresql.org (Postfix) with ESMTP id B0537D6ECD for ; Sun, 28 Aug 2005 14:01:52 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i21so470308wra for ; Sun, 28 Aug 2005 10:01:53 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=dgXm/4h2Y03kGq4iR0e8sgbSHttfzlbWh6EuJf46PhNwVTPyOmCOqumXHWCg1wsJbph23EyO1oQStbWYyuRSAdCtwrOL/TwJxKB3WrRyN7G7VeDw3Y4gxe8rchpaE2Vp1eTn6hAULu19BTPSbKxtWcACDPUQMdTqDFZx7mHdfrE= Received: by 10.54.67.8 with SMTP id p8mr5419626wra; Sun, 28 Aug 2005 10:01:53 -0700 (PDT) Received: by 10.54.116.7 with HTTP; Sun, 28 Aug 2005 10:01:53 -0700 (PDT) Message-ID: <194f625505082810015456609c@mail.gmail.com> Date: Sun, 28 Aug 2005 19:01:53 +0200 From: Clemens Eisserer To: pgsql-jdbc@postgresql.org Subject: NullPointerException when calling ResultSet.absolute(int) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 required=5 tests=[RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/188 X-Sequence-Number: 13757 Hi there! I've installed PostgreSQL-7.4 on my system and I am really impressed about the features and stability PostgreSQL provides. Its an excellent piece of software! However I've written a Swing-Table which displays data directly from a ResultSet, and this works great if I select all rows, but when doing a more specific search I get a NullPointerException: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException =09at org.postgresql.jdbc2.AbstractJdbc2ResultSet.absolute(AbstractJdbc2Res= ultSet.java:184) =09at CATableModel.getValueAt(CATableModel.java:88) =09at javax.swing.JTable.getValueAt(JTable.java:1852) Any ideas what could be the cause? Thank you in advance, lg Clemens btw. is there a more intelligent way to find out how many lines have been selected than starting two queries where the one query just queries the row-count? I did not find any better solution, but for complex queries this is really inefficient :-(