schemacrawler / SchemaCrawler

Free database schema discovery and comprehension tool
http://www.schemacrawler.com/
Other
1.62k stars 200 forks source link

java.sql.SQLException: Fail to convert to internal representation #253

Closed patric-r closed 4 years ago

patric-r commented 5 years ago

Issue

when running schemacrawler with withMaximumSchemaInfoLevel(), many (identical) exceptions are thrown (see below).

Environment

schemacrawler 15.03.02 oracle jdbc driver 12.1.0.2 oracle database 11.2

Jun 13, 2019 2:06:51 PM schemacrawler.crawl.MetadataResultSet getInt
WARNING: Could not read integer value for column <DATA_TYPE>
java.sql.SQLException: Fail to convert to internal representation
    at oracle.jdbc.driver.CharCommonAccessor.getInt(CharCommonAccessor.java:123)
    at oracle.jdbc.driver.T4CCharAccessor.getInt(T4CCharAccessor.java:519)
    at oracle.jdbc.driver.GeneratedStatement.getInt(GeneratedStatement.java:217)
    at oracle.jdbc.driver.GeneratedScrollableResultSet.getInt(GeneratedScrollableResultSet.java:573)
    at oracle.jdbc.driver.GeneratedResultSet.getInt(GeneratedResultSet.java:1350)
    at schemacrawler.crawl.MetadataResultSet.getInt(MetadataResultSet.java:340)
    at schemacrawler.crawl.DatabaseInfoRetriever.retrieveUserDefinedColumnDataTypes(DatabaseInfoRetriever.java:592)
    at schemacrawler.crawl.SchemaCrawler.lambda$crawlColumnDataTypes$1(SchemaCrawler.java:110)
    at sf.util.StopWatch.time(StopWatch.java:185)
    at schemacrawler.crawl.SchemaCrawler.crawlColumnDataTypes(SchemaCrawler.java:104)
    at schemacrawler.crawl.SchemaCrawler.crawl(SchemaCrawler.java:778)
    at schemacrawler.utility.SchemaCrawlerUtility.getCatalog(SchemaCrawlerUtility.java:89)
sualeh commented 5 years ago

@patric-r - that is a warning. Are you missing any information that you are expecting SchemaCrawler to give you?

sualeh commented 5 years ago

@patric-r - please send me the output of your run, with debug logging enabled. Also, please make sure that the SchemaCrawler jar for Oracle is on your classpath.

sualeh commented 5 years ago

@patric-r - please send me the output of your run, with debug logging enabled.

patric-r commented 5 years ago

schemacrawler-oracle jar is at the classpath.

I can't paste here complete trace output to the public. however, the following lines precede the (first) warning.

It seems that schemacrawler is parsing some internal objects from the oracle schema and most interesting hint seems to be that it's related to "retrieveUserDefinedColumnDataTypes". In case you need more information or if I should debug schemacrawler, just let me know.

Jul 10, 2019 6:23:17 PM schemacrawler.crawl.SchemaCrawler lambda$crawlColumnDataTypes$1
INFO: Retrieving user column data types
Jul 10, 2019 6:23:17 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <APPQOSSYS>
Jul 10, 2019 6:23:17 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <APPQOSSYS>
Jul 10, 2019 6:23:17 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <SCOTT>
Jul 10, 2019 6:23:17 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <SCOTT>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <DBSNMP>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <DBSNMP>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <DIP>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <DIP>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <ORACLE_OCM>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <ORACLE_OCM>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <OUTLN>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <OUTLN>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <SYS>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
INFO: Retrieving data types for schema <SYS>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.DatabaseInfoRetriever retrieveUserDefinedColumnDataTypes
FINE: Retrieving data type <SYS.ALERT_TYPE>
Jul 10, 2019 6:23:18 PM schemacrawler.crawl.MetadataResultSet getInt
WARNING: Could not read integer value for column <DATA_TYPE>
java.sql.SQLException: Fail to convert to internal representation
    at oracle.jdbc.driver.CharCommonAccessor.getInt(CharCommonAccessor.java:123)
    at oracle.jdbc.driver.T4CCharAccessor.getInt(T4CCharAccessor.java:519)
    at oracle.jdbc.driver.GeneratedStatement.getInt(GeneratedStatement.java:217)
    at oracle.jdbc.driver.GeneratedScrollableResultSet.getInt(GeneratedScrollableResultSet.java:573)
    at oracle.jdbc.driver.GeneratedResultSet.getInt(GeneratedResultSet.java:1350)
    at schemacrawler.crawl.MetadataResultSet.getInt(MetadataResultSet.java:340)
    at schemacrawler.crawl.DatabaseInfoRetriever.retrieveUserDefinedColumnDataTypes(DatabaseInfoRetriever.java:592)
    at schemacrawler.crawl.SchemaCrawler.lambda$crawlColumnDataTypes$1(SchemaCrawler.java:110)
    at sf.util.StopWatch.time(StopWatch.java:185)
    at schemacrawler.crawl.SchemaCrawler.crawlColumnDataTypes(SchemaCrawler.java:104)
    at schemacrawler.crawl.SchemaCrawler.crawl(SchemaCrawler.java:778)
    at schemacrawler.utility.SchemaCrawlerUtility.getCatalog(SchemaCrawlerUtility.java:89)
sualeh commented 4 years ago

Closed for lack of activity