Skip site navigation (1) Skip section navigation (2)

Re: Problem with JDBC driver: is always null

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Sasha <ber0806(at)iperbole(dot)bologna(dot)it>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Problem with JDBC driver: is always null
Date: 2001-02-13 10:00:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Quoting Sasha <ber0806(at)iperbole(dot)bologna(dot)it>:

> Hello there!
> I'm trying to connect to a postgresql via the JDBC interface as follow:
> ...
> Statement st=db.createStatement();
>      ResultSet rs=st.executeQuery("select datname from pg_database");
>      while({
>        out.addItem(rs.getString(1));
>        }
>        rs.close();
>        st.close();
> ....
> The JVM throws a nullPointerException.
> It seems that is null even if the result set is not empty.

rs should never be null from executeQuery(), and never from this one.

> I'm working with Inprise Jbuilder 4 Foundation and Redhat Linux 7.0 
> (kernel 2.2.16) running on my Athlon 750.

What version of the driver? I've just tested with the latest and this doesn't 


> If anyone could help me I would appreciate.
> P.S.:Sorry for my english!

Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver:
RetepPDF PDF library for Java:

In response to

pgsql-interfaces by date

Next:From: Peter T MountDate: 2001-02-13 10:02:45
Subject: Re: [INTERFACES] jdbc fastpath error & Z error (URGENT NEED!!!)
Previous:From: Dave PageDate: 2001-02-13 08:24:09
Subject: RE: [ODBC] RE: 7.1 beta 3 Linux ODBC BEGINBehaviour

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group