DdlUtils
  1. DdlUtils
  2. DDLUTILS-241

Oracle 9i : Unknown JDBC type code -102

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Oracle 9i

      Description

      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)

        Activity

        Hide
        Marcus Osdoba added a comment -

        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?)
        Show
        Marcus Osdoba added a comment - 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?)
        Hide
        Marcus Osdoba added a comment -

        adds support for TIMESTAMP WITH TIMEZONE and TIMESTAMP WITH LOCAL TIMEZONE to Oracle10Builder

        Show
        Marcus Osdoba added a comment - adds support for TIMESTAMP WITH TIMEZONE and TIMESTAMP WITH LOCAL TIMEZONE to Oracle10Builder

          People

          • Assignee:
            Thomas Dudziak
            Reporter:
            Dave Lindsey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development