db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Osdoba (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DDLUTILS-241) Oracle 9i : Unknown JDBC type code -102
Date Fri, 21 Aug 2009 10:33:14 GMT

    [ https://issues.apache.org/jira/browse/DDLUTILS-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745888#action_12745888
] 

Marcus Osdoba commented on DDLUTILS-241:
----------------------------------------

I encountered the same problem. Even when defining a real subset of tables with quite common
SQL Types the whole model from the db is built. 

The problem was, that the JDBC Type -102 is in fact not known. Oracle knows -101 and -102
(TIMESTAMP WITH (LOCAL) TIMEZONE).
I created a patch for Oracle10Builder wich registers the two types in the TypeMap and it works.

Open issues:
- projection loss: TIMESTAMPLTZ  (database2ddl) -> TIMESTAMP (DdlUtils) -> TIMSTAMP
(ddl2database)
- more oracle specific types found in oracle jdbc driver (not supported by this tiny patch)
- consider mapping from any source type to any target type (per database?)

> Oracle 9i : Unknown JDBC type code -102
> ---------------------------------------
>
>                 Key: DDLUTILS-241
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-241
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core (No specific database)
>         Environment: Oracle 9i
>            Reporter: Dave Lindsey
>            Assignee: Thomas Dudziak
>            Priority: Minor
>
> I did not specify a catalog or schema, so I got every table in the db and got the exception
below. 
> (Once I specified a schema, I did not get this exception)
> I got  the following exception for unknown JDBC type.  Did a quick search and did not
find a reference to it.
> Exception in thread "main" org.apache.ddlutils.model.ModelException: Unknown JDBC type
code -102
>         at org.apache.ddlutils.model.Column.setTypeCode(Column.java:214)
>         at org.apache.ddlutils.platform.JdbcModelReader.readColumn(JdbcModelReader.java:831)
>         at org.apache.ddlutils.platform.oracle.Oracle8ModelReader.readColumn(Oracle8ModelReader.java:113)
>         at org.apache.ddlutils.platform.JdbcModelReader.readColumns(JdbcModelReader.java:808)
>         at org.apache.ddlutils.platform.JdbcModelReader.readTable(JdbcModelReader.java:598)
>         at org.apache.ddlutils.platform.oracle.Oracle8ModelReader.readTable(Oracle8ModelReader.java:98)
>         at org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcModelReader.java:548)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:504)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:464)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:2762)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:2746)
>         at ddlreader.Main.readDatabase(Main.java:75)
>         at ddlreader.Main.main(Main.java:43)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message