pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Jonathan Vallar <jonathan.vallar@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bad Value for Data Type Timestamp
Date: Tue, 28 Feb 2006 05:00:45 -0500
Message-ID: <3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com> (raw)
In-Reply-To: <6c1017c20602280042i9f38cb2g17b6acf722349ef8@mail.gmail.com>
References: <6c1017c20602280042i9f38cb2g17b6acf722349ef8@mail.gmail.com>

There doesn't appear to be anything wrong with the data, and the  
driver can handle that data fine.

Is this code that wraps the driver mapping columns to types ? Have  
you mapped it correctly ?

Dave
On 28-Feb-06, at 3:42 AM, Jonathan Vallar wrote:

> Hi!
>
> Good day!
>
> I encountered an error in getting data from a timestamp field  
> datatype.  I am using a  the JDBC type Driver for Postgres ,  
> version 8.1-405  (8.1-405 JDBC 2). The database run on a Centronix  
> Linux OS and the postgres database version is 8.1.3.
>
> Basically the java application gets data from the "xworlds_events"  
> table. The application returns an error in retrieving data from the  
> event_time field.
>
> Below is the stacktrace of the java program:
>
> Retrieve Operation failed on the BusinessObject Bad value for type  
> timestamp : [C@56c55d28  Exception:  
> java.lang.NumberFormatException: Expected time to be colon- 
> separated, got ' Stack Trace:  java.lang.NumberFormatException :  
> Expected time to be colon-separated, got '  at  
> org.postgresql.jdbc2.TimestampUtils.loadCalendar 
> (TimestampUtils.java:151)   at  
> org.postgresql.jdbc2.TimestampUtils.toTimestamp(TimestampUtils.java: 
> 307)   at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp  
> (AbstractJdbc2ResultSet.java:419)   at  
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp 
> (AbstractJdbc2ResultSet.java:2088)   at  
> com.crossworlds.connectors.JDBC.JDBCBOhandler.doContainerRetrieve 
> (JDBCBOhandler.java:3697)   at  
> com.crossworlds.connectors.JDBC.JDBCBOhandler.doRecursiveRetrieve 
> (JDBCBOhandler.java:3316)   at  
> com.crossworlds.connectors.JDBC.JDBCBOhandler.doRetrieve 
> (JDBCBOhandler.java:3265)   at  
> com.crossworlds.connectors.JDBC.JDBCBOhandler.doVerbFor  
> (JDBCBOhandler.java:1346)   at  
> com.crossworlds.cwconnectorapi.CWConnectorBOHandler.doVerbFor 
> (CWConnectorBOHandler.java:127)   at  
> CxCommon.BusinessObject.doVerbFor(BusinessObject.java:2128)   at  
> com.crossworlds.cwconnectorapi.CWConnectorBusObj.doVerbFor  
> (CWConnectorBusObj.java:126)   at  
> com.crossworlds.connectors.JDBC.JDBCConnectorAgent.pollForEvents 
> (JDBCConnectorAgent.java:1137)   at  
> AppSide_Connector.BusObjJavaInterface.poll(BusObjJavaInterface.java: 
> 355)   at AppSide_Connector.AppCalls.poll( AppCalls.java:191)   at  
> AppSide_Connector.AgentBusinessObjectManager.poll 
> (AgentBusinessObjectManager.java:719)   at  
> AppSide_Connector.AppPolling.poll(AppPolling.java:294)   at  
> AppSide_Connector.AppPolling.doPollingContinuousWait 
> ( AppPolling.java:556)   at AppSide_Connector.AppPolling.run 
> (AppPolling.java:121)   at java.lang.Thread.run(Thread.java:513)   
> End of Stack Trace   SQLException {2}]
>
>
>
> Below is the schema of the table:
>
> wbi_db=> \d xworlds_events;
>               Table "public.xworlds_events"
>      Column     |            Type             | Modifiers
> ----------------+-----------------------------+-----------
>  event_id       | bigint                      | not null
>  connector_id   | character varying(40)       |
>  object_key     | character varying(80)       | not null
>  object_name    | character varying(40)       | not null
>  object_verb    | character varying(40)       | not null
>  event_priority | real                        | not null
>  event_time     | timestamp without time zone |
>  event_status   | integer                     |
>  event_comment  | character varying           |
>
>
>
> Here is a sample data from the table:
>
> wbi_db=> select * from xworlds_events;
>  event_id | connector_id | object_key |     object_name      |  
> object_verb | event_priority |        event_time         |  
> event_status | event_comment
> ----------+--------------+------------+---------------------- 
> +-------------+----------------+--------------------------- 
> +--------------+---------------
>         1 | PostgreSQL   | 8100000000 | POS_to_SAP_1_WRAPPER |  
> Create      |              1 | 2006-02-27 19:51: 22.58118  
> |           -1 | Test
> (1 row)
>
> wbi_db=>
>
>
> How can I go about the problem? Is this a bug?
>
> Thanks!
>
> Regards,
>
> Jonathan
>
>




view thread (18+ messages)  latest in thread

Message-ID: <3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com>
Permalink:  ../3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com/
Also on:    postgresql.org/message-id/3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg@fastcrypt.com, jonathan.vallar@gmail.com
  Subject: Re: Bad Value for Data Type Timestamp
  In-Reply-To: <3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com>
  References: <6c1017c20602280042i9f38cb2g17b6acf722349ef8@mail.gmail.com> <3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox