dynamobi/dynamobi — Issue #761: [FRG-109] Error when trying to select column of type timestamp in oracle using foreign server or imported schema
Author: dynamobi-build
Created: 2011-12-30 03:47:32+00:00
State: closed
Labels: FRG, JDBC Foreign Data Wrapper

[reporter="elin", created="Wed, 19 Apr 2006 11:35:53 -0500 (GMT-05:00)"]
The error encountered is:

Error: Cannot assign 'oracle.sql.TIMESTAMP@101fa9e' to a TIMESTAMP value: not in format 'yyyy-MM-dd HH:mm:ss' (state=,code=0)

net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: Cannot assign 'oracle.sql.TIMESTAMP@101fa9e' to a TIMESTAMP value: not in format 'yyyy-MM-dd HH:mm:ss'

To reproduce (change paths as necessary):

===========================

create foreign data wrapper ORCL_JDBC

library '/home/elin/open/luciddb/plugin/FarragoMedJdbc3p.jar'

language java;

create server ORCL_SERVER

foreign data wrapper ORCL_JDBC

options(

url 'jdbc:oracle:thin:@akela.lucidera.com:1521:XE',

user_name 'schoi',

password 'schoi',

driver_class 'oracle.jdbc.driver.OracleDriver'

);

select * from ORCL_SERVER.SCHOI."types" order by 1;

-- Errors here

create schema ORCL_is_schema;

import foreign schema SCHOI

LIMIT TO TABLE_NAME like 'typ%'

from server ORCL_SERVER

into ORCL_is_schema;

select * from ORCL_is_schema."types";

--- Errors here too

Here's the stack trace:

0: jdbc:farrago:> select * from ORCL_SERVER.SCHOI."types" order by 1;

Error: Cannot assign 'oracle.sql.TIMESTAMP@1b2380e' to a TIMESTAMP value: not in format 'yyyy-MM-dd HH:mm:ss' (state=,code=0)

net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: Cannot assign 'oracle.sql.TIMESTAMP@1b2380e' to a TIMESTAMP value: not in format 'yyyy-MM-dd HH:mm:ss'

at net.sf.farrago.resource.FarragoResource$_Def9.ex(FarragoResource.java:1412)

at net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ$SqlTimestamp.parse(SqlDateTimeWithoutTZ.java:359)

at net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ.assignFrom(SqlDateTimeWithoutTZ.java:170)

at net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ.assignFrom(SqlDateTimeWithoutTZ.java:175)

at net.sf.farrago.dynamic.stmt3115.Transformer1$2.makeRow(Unknown Source)

at org.eigenbase.runtime.ResultSetTupleIter.moveToNext(ResultSetTupleIter.java:108)

at org.eigenbase.runtime.ResultSetTupleIter.fetchNext(ResultSetTupleIter.java:59)

at net.sf.farrago.runtime.FarragoTransformImpl.execute(FarragoTransformImpl.java:71)

at net.sf.farrago.fennel.FennelStorage.tupleStreamFetch(Native Method)

at net.sf.farrago.fennel.FennelStreamGraph.fetch(FennelStreamGraph.java:175)

at net.sf.farrago.runtime.FennelTupleIter.populateBuffer(FennelTupleIter.java:110)

at net.sf.farrago.runtime.FennelAbstractTupleIter.fetchNext(FennelAbstractTupleIter.java:99)

at org.eigenbase.runtime.TupleIterResultSet.next(TupleIterResultSet.java:90)

at net.sf.farrago.runtime.FarragoTupleIterResultSet.next(FarragoTupleIterResultSet.java:97)

at sqlline.SqlLine$BufferedRows.(Unknown Source)

at sqlline.SqlLine.print(Unknown Source)

at sqlline.SqlLine$Commands.execute(Unknown Source)

at sqlline.SqlLine$Commands.sql(Unknown Source)

at sqlline.SqlLine.dispatch(Unknown Source)

at sqlline.SqlLine.begin(Unknown Source)

at sqlline.SqlLine.mainWithInputRedirection(Unknown Source)

at sqlline.SqlLine.main(Unknown Source)

0: jdbc:farrago:>