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 34F549DC8AD for ; Tue, 28 Feb 2006 08:03:55 -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 87608-04 for ; Tue, 28 Feb 2006 08:03:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 59B529DC8A3 for ; Tue, 28 Feb 2006 08:03:52 -0400 (AST) Received: (qmail 20506 invoked from network); 28 Feb 2006 12:03:55 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 28 Feb 2006 12:03:55 -0000 In-Reply-To: <6c1017c20602280255q5d636ef2vbb484808d4399ea3@mail.gmail.com> References: <6c1017c20602280042i9f38cb2g17b6acf722349ef8@mail.gmail.com> <3C5A526C-645D-41A0-B461-99F2F259393F@fastcrypt.com> <6c1017c20602280255q5d636ef2vbb484808d4399ea3@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: multipart/alternative; boundary=Apple-Mail-55--387723248 Message-Id: Cc: pgsql-jdbc@postgresql.org From: Dave Cramer Subject: Re: Bad Value for Data Type Timestamp Date: Tue, 28 Feb 2006 07:03:53 -0500 To: Jonathan Vallar X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.122 required=5 tests=[AWL=0.121, HTML_MESSAGE=0.001] X-Spam-Score: 0.122 X-Spam-Level: X-Archive-Number: 200602/179 X-Sequence-Number: 14776 --Apple-Mail-55--387723248 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Jonathan, It means that the data in the timestamp column, or what it thinks is the timestamp column is not formatted correctly as a timestamp. What you sent as sample data is formatted correctly. So the only thing I can think of is that the mapping of the columns is not correct. Have you tried a very simple java program which reads the timestamp via the jdbc driver without websphere in the middle ? Dave On 28-Feb-06, at 5:55 AM, Jonathan Vallar wrote: > Hi! > > The Postgres JDBC driver is being used by IBM Websphere to get data > from the 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 > timestamp : [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 < pg@fastcrypt.com> 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=> \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 > > > > > > --Apple-Mail-55--387723248 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Jonathan,

It means that the data in = the timestamp column, or what it thinks is the timestamp column is not = formatted correctly as a timestamp.

What you sent as sample = data is formatted correctly. So the only thing I can think of is that = the mapping of the columns is not correct.

Have you tried a very = simple java program which reads the timestamp via the jdbc driver = without websphere in the middle ?

Dave

On 28-Feb-06, at 5:55 AM, = Jonathan Vallar wrote:

Hi!

The Postgres JDBC driver is being used by IBM = Websphere to get data from the 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 timestamp : [C ( at ) 56c55d28=A0 Exception: = java.lang.NumberFormatException: Expected time to be colon-separated, = got ' Stack Trace:=A0 java.lang.NumberFormatException : Expected time to = be colon-separated, got '=A0 at = org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java = :151)=A0=A0 at = org.postgresql.jdbc2.TimestampUtils.toTimestamp(TimestampUtils.java:307)=A0= =A0 at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp = (AbstractJdbc2ResultSet.java:419)=A0=A0 at = org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp = (AbstractJdbc2ResultSet.java:2088)=A0=A0 at = com.crossworlds.connectors.JDBC.JDBCBOhandler.doContainerRetrieve(JDBCBOha= ndler.java:3697)=A0=A0 at = com.crossworlds.connectors.JDBC.JDBCBOhandler.doRecursiveRetrieve(JDBCBOha= ndler.java:3316)=A0=A0 at = com.crossworlds.connectors.JDBC.JDBCBOhandler.doRetrieve(JDBCBOhandler.jav= a:3265)=A0=A0 at com.crossworlds.connectors.JDBC.JDBCBOhandler.doVerbFor = (JDBCBOhandler.java:1346)=A0=A0 at = com.crossworlds.cwconnectorapi.CWConnectorBOHandler.doVerbFor = (CWConnectorBOHandler.java:127)=A0=A0 at = CxCommon.BusinessObject.doVerbFor(BusinessObject.java:2128)=A0=A0 at = com.crossworlds.cwconnectorapi.CWConnectorBusObj.doVerbFor = (CWConnectorBusObj.java:126)=A0=A0 at = com.crossworlds.connectors.JDBC.JDBCConnectorAgent.pollForEvents = (JDBCConnectorAgent.java:1137)=A0=A0 at = AppSide_Connector.BusObjJavaInterface.poll(BusObjJavaInterface.java:355)=A0= =A0 at AppSide_Connector.AppCalls.poll( AppCalls.java:191)=A0=A0 at = AppSide_Connector.AgentBusinessObjectManager.poll( = AgentBusinessObjectManager.java:719)=A0=A0 at = AppSide_Connector.AppPolling.poll(AppPolling.java:294)=A0=A0 at = AppSide_Connector.AppPolling.doPollingContinuousWait( = AppPolling.java:556)=A0=A0 at = AppSide_Connector.AppPolling.run(AppPolling.java :121)=A0=A0 at = java.lang.Thread.run(Thread.java:513)=A0 End of Stack Trace=A0=A0 = SQLException {2}]


On = 2/28/06, Dave Cramer < pg@fastcrypt.com> = 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.=A0=A0I am using a=A0=A0the JDBC type Driver for Postgres = ,
> version 8.1-405=A0=A0(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=A0=A0Exception:
> = java.lang.NumberFormatException: Expected time to be colon-
> = separated, got ' Stack Trace:=A0=A0java.lang.NumberFormatException = :
> Expected time to be colon-separated, got '=A0=A0at
> = org.postgresql.jdbc2.TimestampUtils.loadCalendar
> = (TimestampUtils.java:151)=A0=A0 at
> = org.postgresql.jdbc2.TimestampUtils.toTimestamp(TimestampUtils.java:
&g= t; 307)=A0=A0 at = org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp
> = (AbstractJdbc2ResultSet.java :419)=A0=A0 at
> = org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp
> = (AbstractJdbc2ResultSet.java:2088)=A0=A0 at
> = com.crossworlds.connectors.JDBC.JDBCBOhandler.doContainerRetrieve
> = (JDBCBOhandler.java :3697)=A0=A0 at
> = com.crossworlds.connectors.JDBC.JDBCBOhandler.doRecursiveRetrieve
> = (JDBCBOhandler.java:3316)=A0=A0 at
> = com.crossworlds.connectors.JDBC.JDBCBOhandler.doRetrieve
> = (JDBCBOhandler.java:3265)=A0=A0 at
> = com.crossworlds.connectors.JDBC.JDBCBOhandler.doVerbFor
> = (JDBCBOhandler.java:1346)=A0=A0 at
> = com.crossworlds.cwconnectorapi.CWConnectorBOHandler.doVerbFor
> = (CWConnectorBOHandler.java:127)=A0=A0 at
> = CxCommon.BusinessObject.doVerbFor(BusinessObject.java:2128)=A0=A0 = at
> = com.crossworlds.cwconnectorapi.CWConnectorBusObj.doVerbFor
> = (CWConnectorBusObj.java:126)=A0=A0 at
> = com.crossworlds.connectors.JDBC.JDBCConnectorAgent.pollForEvents =
> (JDBCConnectorAgent.java:1137)=A0=A0 at
> = AppSide_Connector.BusObjJavaInterface.poll(BusObjJavaInterface.java:
&g= t; 355)=A0=A0 at AppSide_Connector.AppCalls.poll( AppCalls.java:191)=A0=A0= at
> AppSide_Connector.AgentBusinessObjectManager.poll
> = (AgentBusinessObjectManager.java:719)=A0=A0 at
> = AppSide_Connector.AppPolling.poll(AppPolling.java:294)=A0=A0 at
> = AppSide_Connector.AppPolling.doPollingContinuousWait
> ( = AppPolling.java:556)=A0=A0 at AppSide_Connector.AppPolling.run
> = (AppPolling.java:121)=A0=A0 at = java.lang.Thread.run(Thread.java:513)
> End of Stack Trace=A0=A0 = SQLException {2}]
>
>
>
> Below is the schema of = the table:
>
> wbi_db=3D> \d xworlds_events; =
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Table = "public.xworlds_events"
>=A0=A0=A0=A0=A0=A0Column=A0=A0=A0=A0 = |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Type=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 | Modifiers
> = ----------------+-----------------------------+-----------
>=A0=A0ev= ent_id=A0=A0=A0=A0=A0=A0 | bigint=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0| not null
>=A0=A0connector_id=A0=A0 | = character varying(40)=A0=A0=A0=A0=A0=A0 |
>=A0=A0object_key=A0=A0=A0= =A0 | character varying(80)=A0=A0=A0=A0=A0=A0 | not = null
>=A0=A0object_name=A0=A0=A0=A0| character varying(40)=A0=A0=A0=A0= =A0=A0 | not null
>=A0=A0object_verb=A0=A0=A0=A0| character = varying(40)=A0=A0=A0=A0=A0=A0 | not null
>=A0=A0event_priority | = real=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= | not null
>=A0=A0event_time=A0=A0=A0=A0 | timestamp without time = zone |
>=A0=A0event_status=A0=A0 | integer=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |
>=A0=A0event_comment=A0=A0| = character varying=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | =
>
>
>
> Here is a sample data from the = table:
>
> wbi_db=3D> select * from = xworlds_events;
>=A0=A0event_id | connector_id | object_key |=A0=A0=A0= =A0 object_name=A0=A0=A0=A0=A0=A0|
> object_verb | event_priority = |=A0=A0=A0=A0=A0=A0=A0=A0event_time=A0=A0=A0=A0=A0=A0=A0=A0 |
> = event_status | event_comment
> = ----------+--------------+------------+----------------------
> = +-------------+----------------+---------------------------
> = +--------------+---------------
>=A0=A0=A0=A0=A0=A0=A0=A0 1 | = PostgreSQL=A0=A0 | 8100000000 | POS_to_SAP_1_WRAPPER |
> = Create=A0=A0=A0=A0=A0=A0|=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A01 | = 2006-02-27 19:51: 22.58118
> |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 -1 | = Test
> (1 row)
>
> wbi_db=3D>
>
>
>= How can I go about the problem? Is this a bug?
>
> = Thanks!
>
> Regards,
>
> = Jonathan
>
>


=
= --Apple-Mail-55--387723248--