Re: pgjdbc7.2 - Mailing list pgsql-jdbc

From Raymund
Subject Re: pgjdbc7.2
Date
Msg-id 000b01c2385b$f604bc00$1611a8c0@amazinglifestyles.com
Whole thread Raw
In response to Re: pgjdbc7.2  (Dave Cramer <Dave@micro-automation.net>)
List pgsql-jdbc
Hello dave,

Thanks!!

I used these code to initialize the database:
try {
/*** initialize ***/
Class.forName(driver);
conn = DriverManager.getConnection(url, "postgres", "postgres");
stmt = conn.createStatement();
} catch(ClassNotFoundException cnfex) {
    cnfex.printStackTrace(System.err);
    submit(cnfex.getMessage(), "Database error encountered");
} catch(SQLException sqlex) {
    sqlex.printStackTrace(System.err);
    submit(sqlex.getMessage(), "Database error encountered");
}

/*** method ***/
sqlStr = "SELECT * FROM chatmsgstbl WHERE (status = 'queued' or status =
'rejected') AND location in('manila') order by     priority, date";
rs = stmt.executeQuery(sqlStr);
while(rs.next()) { /** this is line 73 **/
    /** some code ***/
}

java.lang.NullPointerException
at org.postgresql.jdbc2.ResultSet.next(ResultSet.java:113)
at com.amazing.ChatTv.ChatTvMsgHandler.run(ChatTvMsgHandler.java:73)
at java.lang.Thread.run(Thread.java:484)

Is it from the sql statement that I made. Because there where other
Statements that call the rs.next but does not return a null value.  It
seems that the stmt.executeQuery returned a null resultset.

raymund

-----Original Message-----
From: Dave Cramer [mailto:Dave@micro-automation.net]
Sent: Tuesday, July 30, 2002 7:15 PM
To: Raymund
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] pgjdbc7.2

Raymund,

Can you give me more information, like what the statement is, etc

or even a repeatable test case?

Dave
On Tue, 2002-07-30 at 06:51, Raymund wrote:
> Gud day!
>
> Is there something I would have to configure when I am using the
> pgjdbc7.2.
> My program is working with jdbc7.0-1.2.  But when I used the same
> program using the new driver, some modules throw null pointer
exception
> when I call the rs.next.
>
> Hope to hear from u soon :)
>
> raymund
>
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>


pgsql-jdbc by date:

Previous
From: "G.L. Grobe"
Date:
Subject: XA capable driver
Next
From: Aaron Mulder
Date:
Subject: Re: XA capable driver