pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nico <nicohmail-postgresql@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: first() causes NullPointerException
Date: Thu, 23 Dec 2004 12:06:36 +0100
Message-ID: <cqe8ru$1v5f$1@news.hub.org> (raw)
References: <cqe4r8$1969$1@news.hub.org>
	<Pine.BSO.4.56.0412230526470.22886@leary.csoft.net>

Thanks. I will try it right away.
Nico.
"Kris Jurka" <books@ejurka.com> schreef in bericht 
news:Pine.BSO.4.56.0412230526470.22886@leary.csoft.net...
>
>
> On Thu, 23 Dec 2004, Nico wrote:
>
>> I have a servlet that extracts data from a postgresql database and makes 
>> a
>> nice menu of it. The connection works fine, I can execute my 
>> sql-statement
>> without any problems, but when I try the first() method of ResultSet it
>> fails: it throws a NullPointerException at line 216.
>>
>>             resultsetL1=getQuery("SELECT * FROM \"qryMenuL1\" ORDER BY "+
>>                 "\"MenuL1Order\"");
>>             resultsetL1C=getQuery("SELECT COUNT(\"MenuL1ID\") FROM
>> \"qryMenuL1\"");
>
> According to the JDBC spec you are only allowed to have one ResultSet open
> per Statement.  When you create the second ResultSet the first is
> automatically closed.  This causes the NPE or in the CVS version of the
> driver an error message indicating that the result is already closed.
>
> Kris Jurka
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 





view thread (3+ messages)

Message-ID: <cqe8ru$1v5f$1@news.hub.org>
Permalink:  ../cqe8ru$1v5f$1@news.hub.org/
Also on:    postgresql.org/message-id/cqe8ru$1v5f$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: nicohmail-postgresql@yahoo.com
  Subject: Re: first() causes NullPointerException
  In-Reply-To: <cqe8ru$1v5f$1@news.hub.org>
  References: <cqe4r8$1969$1@news.hub.org> <Pine.BSO.4.56.0412230526470.22886@leary.csoft.net> <cqe8ru$1v5f$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox