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 CA9119DCB67 for ; Wed, 1 Mar 2006 02:54:17 -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 15079-03 for ; Wed, 1 Mar 2006 02:54:16 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.203]) by postgresql.org (Postfix) with ESMTP id 00C659DCA2B for ; Wed, 1 Mar 2006 02:54:14 -0400 (AST) Received: by xproxy.gmail.com with SMTP id i31so46264wxd for ; Tue, 28 Feb 2006 22:54:15 -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=o07zTTZLQ3oMqXs4xKnofJWJnV6xpoLcxN6J5gzBDfnqSYOB6br0FAkn5JvpEtRglX66tOjaAz9TYJ9n5Q0m1ID7hxxKyTeyh1/Kx9ykWWH6/LxA1E8kDBrRJhsTvbhiNa8MYMZcoGeTElwm7D6zJTJNMDItKietn/0I7yE88Pk= Received: by 10.70.54.13 with SMTP id c13mr1596285wxa; Tue, 28 Feb 2006 22:54:15 -0800 (PST) Received: by 10.70.60.14 with HTTP; Tue, 28 Feb 2006 22:54:15 -0800 (PST) Message-ID: <6c1017c20602282254p3706fad2vc3cbe7f4ad81a3b4@mail.gmail.com> Date: Wed, 1 Mar 2006 14:54:15 +0800 From: "Jonathan Vallar" To: "Oliver Jowett" Subject: Re: Bad Value for Data Type Timestamp Cc: pgsql-jdbc@postgresql.org In-Reply-To: <4405246C.4080800@opencloud.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3667_14213462.1141196055711" References: <6c1017c20602280042i9f38cb2g17b6acf722349ef8@mail.gmail.com> <4405157C.9060109@opencloud.com> <6c1017c20602282017s4acbd2bwb19b0fed0bd41819@mail.gmail.com> <4405246C.4080800@opencloud.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.153 required=5 tests=[AWL=0.152, HTML_MESSAGE=0.001] X-Spam-Score: 0.153 X-Spam-Level: X-Archive-Number: 200603/3 X-Sequence-Number: 14784 ------=_Part_3667_14213462.1141196055711 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hmmm.. I do not know how to display the actual value because the java program is an IBM product (IBM Websphere WBI). I created a java program tha= t connects to the same postgres database and access the same table and parse the field with the timestamp data type. From my program, I have no problem with the field. I used the java.sql package of java together with the JDBC driver. Attached is the program I made. Am not sure on how to replicate the said problem encountered on the IBM product (which is listed below) Since the problem occurred here " org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:151)", I assume that the problem happened while processing the timestamp field. Retrieve Operation failed on the BusinessObject Bad value for type =3D timestamp : [C@56c55d28 Exception: java.lang.NumberFormatException: =3D Expected time to be colon-separated, got ' Stack Trace: =3D java.lang.NumberFormatException: Expected time to be colon-separated, =3D got ' at =3D org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:151)= =3D at =3D org.postgresql.jdbc2.TimestampUtils.toTimestamp(TimestampUtils.java:307) = =3D at =3D org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2Res= =3D ultSet.java:419) at =3D org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2Res= =3D ultSet.java:2088) at =3D com.crossworlds.connectors.JDBC.JDBCBOhandler.doContainerRetrieve(JDBCBOh= =3D andler.java:3697) at =3D com.crossworlds.connectors.JDBC.JDBCBOhandler.doRecursiveRetrieve(JDBCBOh= =3D andler.java:3316) at =3D com.crossworlds.connectors.JDBC.JDBCBOhandler.doRetrieve(JDBCBOhandler.ja= =3D va:3265) at =3D com.crossworlds.connectors.JDBC.JDBCBOhandler.doVerbFor(JDBCBOhandler.jav= =3D a:1346) at =3D com.crossworlds.cwconnectorapi.CWConnectorBOHandler.doVerbFor(CWConnector= =3D BOHandler.java:127) at =3D CxCommon.BusinessObject.doVerbFor(BusinessObject.java:2128) at =3D com.crossworlds.cwconnectorapi.CWConnectorBusObj.doVerbFor(CWConnectorBus= =3D Obj.java:126) at =3D com.crossworlds.connectors.JDBC.JDBCConnectorAgent.pollForEvents(JDBCConn= =3D ectorAgent.java:1137) at =3D AppSide_Connector.BusObjJavaInterface.poll(BusObjJavaInterface.java:355) = =3D at AppSide_Connector.AppCalls.poll(AppCalls.java:191) at =3D AppSide_Connector.AgentBusinessObjectManager.poll(AgentBusinessObjectMana= =3D ger.java:719) at =3D AppSide_Connector.AppPolling.poll(AppPolling.java:294) at =3D AppSide_Connector.AppPolling.doPollingContinuousWait(AppPolling.java:556)= =3D at AppSide_Connector.AppPolling.run(AppPolling.java:121) at =3D java.lang.Thread.run(Thread.java:513) End of Stack Trace SQLException = =3D {2}] Here is the sample data of the table: wbi_db=3D> 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 the table schema: wbi_db=3D> 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 | On 3/1/06, Oliver Jowett wrote: > > Jonathan Vallar wrote: > > > Is this the problem? If so, what will I do to solve the problem? > > It's not the problem, it would just help in diagnosing the real problem > as we'd be able to see the actual value that is failing to parse. > > -O > ------=_Part_3667_14213462.1141196055711 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hmmm.. I do not know how to display the actual value because the java progr= am is an IBM product (IBM Websphere WBI). I created a java program that con= nects to the same postgres database and access the same table and parse the= field with the timestamp data type. From my program, I have no problem wit= h the field. I used the=20 java.sql package of java together with the JDBC driver. Attached is the pro= gram I made. Am not sure on how to replicate the said problem encountered o= n the IBM product (which is listed below)

Since the problem occurred= here " org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:151)&q= uot;, I assume that the problem happened while processing the timestamp fie= ld.

Retrieve Operation failed on the BusinessObject Bad value for t= ype =3D
timestamp : [C@56c55d28  Exception: java.lang.NumberFormatExceptio= n: =3D
Expected time to be colon-separated, got ' Stack Trace:  =3D=
java.lang.NumberFormatException: Expected time to be colon-separated, = =3D
got '  at =3D
org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:15= 1)=3D
   at =3D
org.postgresql.jdbc2.TimestampUtils.toTimes= tamp(TimestampUtils.java:307) =3D
  at =3D
org.postgresql.jdbc2.= AbstractJdbc2ResultSet.getTimestamp (AbstractJdbc2Res=3D
ultSet.java:419)   at =3D
org.postgres= ql.jdbc2.AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2Res=3D
ultSet.= java:2088)   at =3D
com.crossworlds.connectors.JDBC.JDBCBOhand= ler.doContainerRetrieve(JDBCBOh=3D
andler.java:3697)   at =3D
com.crossworlds.connectors.JDBC= .JDBCBOhandler.doRecursiveRetrieve(JDBCBOh=3D
andler.java:3316) &nb= sp; at =3D
com.crossworlds.connectors.JDBC.JDBCBOhandler.doRetrieve(JDBC= BOhandler.ja=3D
va:3265)   at =3D
com.crossworlds.connectors.JDBC.JDBCBOhandler.doVerbFor(JDBCBOhandler.j= av=3D
a:1346)   at =3D
com.crossworlds.cwconnectorapi.CWCon= nectorBOHandler.doVerbFor(CWConnector=3D
BOHandler.java:127)  = at =3D
CxCommon.BusinessObject.doVerbFor (BusinessObject.java:2128)   at =3D
com.crossworlds.cwconnecto= rapi.CWConnectorBusObj.doVerbFor(CWConnectorBus=3D
Obj.java:126) &n= bsp; at =3D
com.crossworlds.connectors.JDBC.JDBCConnectorAgent.pollForEv= ents(JDBCConn=3D
ectorAgent.java :1137)   at =3D
AppSide_Connector.BusObjJavaInterface.poll(Bus= ObjJavaInterface.java:355) =3D
  at AppSide_Connector.AppCalls.poll= (AppCalls.java:191)   at =3D
AppSide_Connector.AgentBusinessOb= jectManager.poll(AgentBusinessObjectMana=3D
ger.java:719)   at =3D
AppSide_Connector.AppPolling.poll(A= ppPolling.java:294)   at =3D
AppSide_Connector.AppPolling.doPo= llingContinuousWait(AppPolling.java:556)=3D
   at AppSide_Conn= ector.AppPolling.run(AppPolling.java :121)   at =3D
java.lang.Thread.run(Thread.java:513)  End= of Stack Trace   SQLException =3D
{2}]

Here is the sample data of the table:

wbi= _db=3D>
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 the table schema:
= wbi_db=3D>
wbi_db=3D> \d xworlds_events;
   &nbs= p;          Table "public= .xworlds_events"
     Column   &= nbsp; |            T= ype            = | Modifiers
----------------+-----------------------------+-----------
 eve= nt_id       | bigint    &= nbsp;           &nbs= p;     | not null
 connector_id   | c= haracter varying(40)       |
 object_= key     | character varying(80)    =    | not null
 object_name    | character varying(40)  =      | not null
 object_verb    = | character varying(40)       | not null
&= nbsp;event_priority | real        &= nbsp;           &nbs= p;   | not null
 event_time     | tim= estamp without time zone |
 event_status   | integer     &= nbsp;           &nbs= p;   |
 event_comment  | character varying &nbs= p;         |







On 3/1/06, Oliver Jowett <oliver@opencl= oud.com> wrote:
Jonathan Vallar wrote:

> Is this the problem? If so, what will I = do to solve the problem?

It's not the problem, it would just help in= diagnosing the real problem
as we'd be able to see the actual value tha= t is failing to parse.

-O

------=_Part_3667_14213462.1141196055711--