jdbc nullpointerexceptions on null fields

From: Joshua Introne <jintrone(at)cs(dot)brandeis(dot)edu>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: jdbc nullpointerexceptions on null fields
Date: 1999-02-10 04:26:47
Message-ID: Pine.SGI.3.95.990209231809.28679B-100000@biotite.cs.brandeis.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cs(dot)brandeis(dot)edu

Browse pgsql-interfaces by date

  From Date Subject
Next Message James Thompson 1999-02-10 05:36:12 Re: [INTERFACES] question on accessing PostgreSQL with C
Previous Message Rudhuwan Abu Bakar 1999-02-10 04:03:32 Applix Data and Postgresql