jdbc nullpointerexceptions on null fields - Mailing list pgsql-interfaces

From Joshua Introne
Subject jdbc nullpointerexceptions on null fields
Date
Msg-id Pine.SGI.3.95.990209231809.28679B-100000@biotite.cs.brandeis.edu
Whole thread Raw
List pgsql-interfaces
Though the changelog for the most recent postgresql jdbc driver seems to
indicate that the issue with the driver returning nullpointerexceptions
when calling getObject on empty fields for non-sql (in particular,
geometric) types was fixed, I'm still getting the same error...

For example, even though the psql interactive monitor returns an empty
column for null values of type POINT, the driver returns...

-------------
java.sql.SQLException: Failed to create object for point:
java.lang.NullPointerException
        at postgresql.Connection.getObject(Connection.java:615)
        at postgresql.jdbc2.ResultSet.getObject(ResultSet.java:749)
        at
ZodiacSystem.Tools.DB.jdbcMachine.processResult(jdbcMachine.java:51)
        at
ZodiacSystem.Tools.DB.jdbcMachine.executeQuery(jdbcMachine.java:92)
        at
ZodiacSystem.Tools.DB.loggingObject.searchTable(loggingObject.java:58)
-------------

Seems the correct behavior should be to return a null object, right?

Perhaps I haven't found the most recent driver? Or am I doing something
wrong?

Any help would be greatly appreciated,


Joshua E. Introne
Department of Computer Science
Brandeis University
jintrone@cs.brandeis.edu



pgsql-interfaces by date:

Previous
From: Rudhuwan Abu Bakar
Date:
Subject: Applix Data and Postgresql
Next
From: James Thompson
Date:
Subject: Re: [INTERFACES] question on accessing PostgreSQL with C