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 A970A9DCAAA for ; Tue, 28 Feb 2006 05:03:31 -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 60185-08 for ; Tue, 28 Feb 2006 05:03:32 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.199]) by postgresql.org (Postfix) with ESMTP id 592CE9DC8AD for ; Tue, 28 Feb 2006 05:03:29 -0400 (AST) Received: by xproxy.gmail.com with SMTP id s13so696690wxc for ; Tue, 28 Feb 2006 01:03:31 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=rS+XRWSJJPnMKZv8FKlfYlY760LNZn85tBjgdMYj/PTBQN7cgT0qiewOP/oQhFfygmlysvTZTE1Tc2drxDopB/nMZpBaUaVcODy+88phaJasseW2b+jrK4fscRa+9FWJq75xIs0n+CgFVXtXf2DitQiXI9zCEB9/uic3yOWR14U= Received: by 10.70.122.4 with SMTP id u4mr409063wxc; Tue, 28 Feb 2006 01:03:31 -0800 (PST) Received: by 10.70.60.14 with HTTP; Tue, 28 Feb 2006 01:03:31 -0800 (PST) Message-ID: <6c1017c20602280103p77abe7d2s5293fecfc996a4bf@mail.gmail.com> Date: Tue, 28 Feb 2006 17:03:31 +0800 From: "Jonathan Vallar" To: pgsql-jdbc@postgresql.org Subject: Bad Value for Data Type Timestamp MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7065_4323170.1141117411220" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.238 required=5 tests=[AWL=0.237, HTML_MESSAGE=0.001] X-Spam-Score: 0.238 X-Spam-Level: X-Archive-Number: 200602/176 X-Sequence-Number: 14773 ------=_Part_7065_4323170.1141117411220 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=20 (8.1-405JDBC 2). The database run on a Cent 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 timestam= p : [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_7065_4323170.1141117411220 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi!

Good day!

I encountered an error in getting data from a t= imestamp 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 Ce= nt Linux OS and the postgres database version is=20 8.1.3.

Basically the java application gets data from the "xworl= ds_events" table. The application returns an error in retrieving data = from the event_time field.

Below is the stacktrace of the java progr= am:

Retrieve Operation failed on the BusinessObject Bad value for type = timestamp : [C@56c55d28  Exception: java.lang.NumberFormatException: E= xpected time to be colon-separated, got ' Stack Trace:  java.lang.Numb= erFormatException : Expected time to be colon-separated, got '  at org.postgresql.jdbc2= .TimestampUtils.loadCalendar(TimestampUtils.java:151)   at org.po= stgresql.jdbc2.TimestampUtils.toTimestamp(TimestampUtils.java:307) &nb= sp; at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp (AbstractJdbc2ResultSet.java:419)   at org.postgresql.jdbc2.Abst= ractJdbc2ResultSet.getTimestamp(AbstractJdbc2ResultSet.java:2088) &nbs= p; at com.crossworlds.connectors.JDBC.JDBCBOhandler.doContainerRetrieve(JDB= CBOhandler.java :3697)   at=20 com.crossworlds.connectors.JDBC.JDBCBOhandler.doRecursiveRetrieve(JDBCBOhan= dler.java:3316)   at com.crossworlds.connectors.JDBC.JDBCBOhandle= r.doRetrieve(JDBCBOhandler.java:3265)   at com.crossworlds.connec= tors.JDBC.JDBCBOhandler.doVerbFor (JDBCBOhandler.java:1346)   at com.crossworlds.cwconnectorapi.CW= ConnectorBOHandler.doVerbFor(CWConnectorBOHandler.java:127)   at = CxCommon.BusinessObject.doVerbFor(BusinessObject.java:2128)   at = com.crossworlds.cwconnectorapi.CWConnectorBusObj.doVerbFor (CWConnectorBusObj.java:126)   at com.crossworlds.connectors.JDB= C.JDBCConnectorAgent.pollForEvents(JDBCConnectorAgent.java:1137)  = ; at AppSide_Connector.BusObjJavaInterface.poll(BusObjJavaInterface.java:35= 5)   at AppSide_Connector.AppCalls.poll(=20 AppCalls.java:191)   at AppSide_Connector.AgentBusinessObjectMana= ger.poll(AgentBusinessObjectManager.java:719)   at AppSide_Connec= tor.AppPolling.poll(AppPolling.java:294)   at AppSide_Connector.A= ppPolling.doPollingContinuousWait(=20 AppPolling.java:556)   at AppSide_Connector.AppPolling.run(AppPol= ling.java:121)   at java.lang.Thread.run(Thread.java:513)  E= nd of Stack Trace   SQLException {2}]



Below is the= schema of the table:

wbi_db=3D> \d xworlds_events;
            = ;  Table "public.xworlds_events"
    = Column     |       =      Type       &nbs= p;     | Modifiers
----------------+----------------= -------------+-----------
 event_id     &n= bsp; | bigint          &n= bsp;           | not null
 connector_id   | character varying(40)   = ;    |
 object_key     | charact= er varying(80)       | not null
 obje= ct_name    | character varying(40)    &n= bsp;  | not null
 object_verb    | character va= rying(40)       | not null
 event_priority | real       &n= bsp;            = ;    | not null
 event_time     = | timestamp without time zone |
 event_status   | integer=             &nb= sp;        |
 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&nbs= p;        | event_status | event_comment
----------+--------------+------------+----------------------+---------= ----+----------------+---------------------------+--------------+----------= -----
        1 | PostgreSQL &nb= sp; | 8100000000 | POS_to_SAP_1_WRAPPER | Create    &nb= sp; |           &nbs= p;  1 | 2006-02-27 19:51:=20 22.58118 |           -1 |= Test
(1 row)

wbi_db=3D>


How can I go about the pro= blem? Is this a bug?

Thanks!

Regards,

Jonathan

=
------=_Part_7065_4323170.1141117411220--