X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D203B9DCA2D for ; Tue, 28 Feb 2006 06:55:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75326-08 for ; Tue, 28 Feb 2006 06:55:06 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.201]) by postgresql.org (Postfix) with ESMTP id 616A49DC9A0 for ; Tue, 28 Feb 2006 06:55:02 -0400 (AST) Received: by xproxy.gmail.com with SMTP id s19so713202wxc for ; Tue, 28 Feb 2006 02:55:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Vcgh3rsRNQ6STUN+riEMdNJX/arTUIFut3PLHQ+kQQsV0njFwH77zB3iZJe3pr3S22CfDVaM++nl/1eIpZTdDLRcteczEzsLTgLa0J/Jy9BKxbZpUYDIkoOwv+EJwZ8NBB7yfeV0y+H51KxehKreI2g1Hg3e5t+/z2UtJN41ar8= Received: by 10.70.67.1 with SMTP id p1mr481395wxa; Tue, 28 Feb 2006 02:55:05 -0800 (PST) Received: by 10.70.60.14 with HTTP; Tue, 28 Feb 2006 02:55:05 -0800 (PST) Message-ID: <6c1017c20602280255q5d636ef2vbb484808d4399ea3@mail.gmail.com> Date: Tue, 28 Feb 2006 18:55:05 +0800 From: "Jonathan Vallar" To: "Dave Cramer" Subject: Re: Bad Value for Data Type Timestamp Cc: pgsql-jdbc@postgresql.org In-Reply-To: <3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8233_27916842.1141124105051" References: <6c1017c20602280042i9f38cb2g17b6acf722349ef8@mail.gmail.com> <3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.191 required=5 tests=[AWL=0.190, HTML_MESSAGE=0.001] X-Spam-Score: 0.191 X-Spam-Level: X-Archive-Number: 200602/178 X-Sequence-Number: 14775 ------=_Part_8233_27916842.1141124105051 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! The Postgres JDBC driver is being used by IBM Websphere to get data from th= e postgres database. The websphere product also gets timestamp data from MS Sql Server. What does the error mean? Retrieve Operation failed on the BusinessObject Bad value for type timestam= p : [C ( at ) 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}] On 2/28/06, Dave Cramer wrote: > > 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=3D> \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=3D> 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=3D> > > > > > > How can I go about the problem? Is this a bug? > > > > Thanks! > > > > Regards, > > > > Jonathan > > > > > > ------=_Part_8233_27916842.1141124105051 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi!

The Postgres JDBC driver is being used by IBM Websphere to get d= ata from the postgres database. The websphere product also gets timestamp d= ata from MS Sql Server.

What does the error mean?


Retrie= ve Operation failed on the BusinessObject Bad value for type timestamp : [C= ( at ) 56c55d28  Exception:=20 java.lang.NumberFormatException: Expected time to be colon-separated, got '= Stack Trace:  java.lang.NumberFormatException : Expected time to be c= olon-separated, got '  at org.postgresql.jdbc2.TimestampUtils.loadCale= ndar(TimestampUtils.java :151)   at org.postgresql.jdbc2.TimestampUtils.toTimestamp(Timest= ampUtils.java:307)   at org.postgresql.jdbc2.AbstractJdbc2ResultS= et.getTimestamp (AbstractJdbc2ResultSet.java:419)   at org.postgr= esql.jdbc2.AbstractJdbc2ResultSet.getTimestamp (AbstractJdbc2ResultSet.java:2088)   at com.crossworlds.connector= s.JDBC.JDBCBOhandler.doContainerRetrieve(JDBCBOhandler.java:3697) &nbs= p; at com.crossworlds.connectors.JDBC.JDBCBOhandler.doRecursiveRetrieve(JDB= CBOhandler.java:3316)   at=20 com.crossworlds.connectors.JDBC.JDBCBOhandler.doRetrieve(JDBCBOhandler.java= :3265)   at com.crossworlds.connectors.JDBC.JDBCBOhandler.doVerbF= or (JDBCBOhandler.java:1346)   at com.crossworlds.cwconnectorapi.= CWConnectorBOHandler.doVerbFor (CWConnectorBOHandler.java:127)   at CxCommon.BusinessObject.doVe= rbFor(BusinessObject.java:2128)   at com.crossworlds.cwconnectora= pi.CWConnectorBusObj.doVerbFor (CWConnectorBusObj.java:126)   at = com.crossworlds.connectors.JDBC.JDBCConnectorAgent.pollForEvents (JDBCConnectorAgent.java:1137)   at AppSide_Connector.BusObjJavaI= nterface.poll(BusObjJavaInterface.java:355)   at AppSide_Connecto= r.AppCalls.poll( AppCalls.java:191)   at AppSide_Connector.AgentB= usinessObjectManager.poll( AgentBusinessObjectManager.java:719)   at AppSide_Connector.AppPo= lling.poll(AppPolling.java:294)   at AppSide_Connector.AppPolling= .doPollingContinuousWait( AppPolling.java:556)   at AppSide_Conne= ctor.AppPolling.run(AppPolling.java :121)   at java.lang.Thread.run(Thread.java:513)  End of Sta= ck Trace   SQLException {2}]


On 2/28/06, Dave Cramer < pg@fastcrypt.com> wrote:
There doesn't appear to be anything wrong with the dat= a, and the
driver can handle that data fine.

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

Da= ve
On 28-Feb-06, at 3:42 AM, Jonathan Vallar wrote:

> Hi!
>
> Good day!
>
> I encountered an error in getting da= ta from a timestamp field
> datatype.  I am using a &n= bsp;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.
>
&g= t; Basically the java application gets data from the "xworlds_events&q= uot;
> table. The application returns an error in retrieving data fro= m the
> event_time field.
>
> Below is the stacktrace of the j= ava program:
>
> Retrieve Operation failed on the BusinessObjec= t Bad value for type
> timestamp : [C@56c55d28  Exception:<= br>>=20 java.lang.NumberFormatException: Expected time to be colon-
> separat= ed, got ' Stack Trace:  java.lang.NumberFormatException :
>= Expected time to be colon-separated, got '  at
> org.postg= resql.jdbc2.TimestampUtils.loadCalendar
> (TimestampUtils.java:151)   at
> org.postgresql.jd= bc2.TimestampUtils.toTimestamp(TimestampUtils.java:
> 307)  = ; at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp
> (Abst= ractJdbc2ResultSet.java :419)   at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.ge= tTimestamp
> (AbstractJdbc2ResultSet.java:2088)   at
>= ; com.crossworlds.connectors.JDBC.JDBCBOhandler.doContainerRetrieve
>= (JDBCBOhandler.java :3697)   at
> com.crossworlds.connectors.JDBC.JDBCBOhandler= .doRecursiveRetrieve
> (JDBCBOhandler.java:3316)   at
&g= t; com.crossworlds.connectors.JDBC.JDBCBOhandler.doRetrieve
> (JDBCBO= handler.java:3265)   at
> com.crossworlds.connectors.JDBC.JDBCBOhandler.doVerbFor
> (J= DBCBOhandler.java:1346)   at
> com.crossworlds.cwconnectora= pi.CWConnectorBOHandler.doVerbFor
> (CWConnectorBOHandler.java:127)&n= bsp;  at
> CxCommon.BusinessObject.doVerbFor(BusinessObject.java:2128)  = ; at
> com.crossworlds.cwconnectorapi.CWConnectorBusObj.doVerbFor
= > (CWConnectorBusObj.java:126)   at
> com.crossworlds.co= nnectors.JDBC.JDBCConnectorAgent.pollForEvents
> (JDBCConnectorAgent.java:1137)   at
> AppSide_Conn= ector.BusObjJavaInterface.poll(BusObjJavaInterface.java:
> 355) =   at AppSide_Connector.AppCalls.poll( AppCalls.java:191)   a= t
> AppSide_Connector.AgentBusinessObjectManager.poll
> (AgentBusinessObjectManager.java:719)   at
> AppSi= de_Connector.AppPolling.poll(AppPolling.java:294)   at
> Ap= pSide_Connector.AppPolling.doPollingContinuousWait
> ( AppPolling.jav= a:556)   at AppSide_Connector.AppPolling.run
> (AppPolling.java:121)   at java.lang.Thread.run(Thread.j= ava:513)
> End of Stack Trace   SQLException {2}]
>>
>
> Below is the schema of the table:
>
> wb= i_db=3D> \d xworlds_events;
>           &= nbsp;   Table "public.xworlds_events"
> &nbs= p;    Column     |   = ;         Type  &nbs= p;          | Modifiers
>= ; ----------------+-----------------------------+-----------
> &= nbsp;event_id       | bigint   = ;            &n= bsp;      | not null
>  connector_id   | character varying(40) &= nbsp;     |
>  object_key  &n= bsp;  | character varying(80)       | no= t null
>  object_name    | character va= rying(40)       | not null
>  = ;object_verb    | character varying(40)  &nbs= p;    | not null
>  event_priority | real     &nbs= p;            &= nbsp;     | not null
>  event_time=      | timestamp without time zone |
>  = ;event_status   | integer      &nbs= p;            &= nbsp; |
>  event_comment  | character varying&nbs= p;          |
>
>
>
> Here is a sample data from the table:
&= gt;
> wbi_db=3D> select * from xworlds_events;
>  = event_id | connector_id | object_key |     object_name&= nbsp;     |
> object_verb | event_priority |=         event_time   = ;      |
> event_status | event_comment
> ----------+--------------+---= ---------+----------------------
> +-------------+----------------+--= -------------------------
> +--------------+---------------
>&n= bsp;        1 | PostgreSQL   |= 8100000000 | POS_to_SAP_1_WRAPPER |
> Create      |    = ;          1 | 2006-02-27= 19:51: 22.58118
> |        &= nbsp;  -1 | Test
> (1 row)
>
> wbi_db=3D>
>=
>
> How can I go about the problem? Is this a bug?
>
> Thanks!
>
> Regards,
>
> Jonathan
>
&= gt;


------=_Part_8233_27916842.1141124105051--