From: | "Raymund" <rasejo(at)amazing-lifestyles(dot)com> |
---|---|
To: | "'Dave Cramer'" <Dave(at)micro-automation(dot)net> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: pgjdbc7.2 |
Date: | 2002-07-31 06:31:53 |
Message-ID: | 000b01c2385b$f604bc00$1611a8c0@amazinglifestyles.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)micro-automation(dot)net]
Sent: Tuesday, July 30, 2002 7:15 PM
To: Raymund
Cc: pgsql-jdbc(at)postgresql(dot)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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron Mulder | 2002-07-31 15:31:01 | Re: XA capable driver |
Previous Message | G.L. Grobe | 2002-07-30 23:30:00 | XA capable driver |