CREATE FUNCTION distributors_id_max() RETURNS INT4 AS Bad Timestamp Format thrown by jdbc7.0-1.2.jar

From: Kevin Gilpin <kevin(dot)gilpin(at)alum(dot)mit(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: CREATE FUNCTION distributors_id_max() RETURNS INT4 AS Bad Timestamp Format thrown by jdbc7.0-1.2.jar
Date: 2000-12-11 14:51:35
Message-ID: 3A34E9F7.206D4FCB@alum.mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I have created a table with a DATETIME column:

create table registereduser
(
...

registeredDate DATETIME NOT NULL
)

I inserted a new record into this table, with the registeredDate = new
Timestamp(new Date().getTime()))

On retrieving this record, the following stack trace ensued:

Exception in thread "main" Bad Timestamp Format at 19 in 2000-12-11
09:43:50.20-05
at
org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:447)
at weblogic.db.jdbc.Value.<init>(Value.java:129)
at weblogic.db.jdbc.Record.internal_fetch(Record.java:1376)
at weblogic.db.jdbc.DataSet.fetchRecords(DataSet.java:284)
at
weblogic.db.jdbc.TableDataSet.fetchRecords(TableDataSet.java:173)
at weblogic.db.jdbc.DataSet.fetchRecords(DataSet.java:234)
at test.database.TInsert_1.run(TInsert_1.java:138)
at test.database.TInsert_1.main(TInsert_1.java:26)

The weblogic classes are dbKona.

I expect that for some reason the JDBC driver is not dealing with the
'-5' time zone data (I am in US Central Time).

- kevin

Browse pgsql-bugs by date

  From Date Subject
Next Message peter 2000-12-11 15:23:25 Re: 7.1beta1 JDBC Nested cursor problem
Previous Message pgsql-bugs 2000-12-11 07:49:19 Can't use NULL in IN conditional?