OracleMetaDataDialect not 8i compliant ... join keyword versus (+)

Description

The SQL constants used in the prepared statements use the "left join" phrase instead of the 8i equivalent syntax where the "" symbol is located appropriately based on right/left qualifier. Subsequent execution produces the following exception as expected with unrecognized syntax:

Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:
643)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.jav
a:1819)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:2015)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:395)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
dStatement.java:339)
at org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect.getTableResult
Set(OracleMetaDataDialect.java:672)
at org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect.getTables(Orac
leMetaDataDialect.java:221)
... 30 more

The 8i syntax should be used since it is compatible with all versions of Oracle. I realize that 8i is a decade+ old...but it is still employed in many commercial and government mission critical enterprise systems.

Overriding the class with the generic JDBCMetaDataDialect class (i.e. hibernatetool.metadatadialect property value) also produces an exception (i.e. Invalid column name) because the ResultSet inner class convertRow() method implementation uses getString"<table name>") as opposed to the more precise getString(<index>) technique.

Environment

Whatever 3.2.X version is packaged w/ JBoss Seam 2.0.2.SP1, Oracle 8.1.7.4.0

Attachments

1

Activity

Show:

Max Rydahl Andersen July 14, 2008 at 11:43 PM

thanks for this - does this one work with Oracle9,10 and 11 too ?

About this comment:
"Overriding the class with the generic JDBCMetaDataDialect class (i.e. hibernatetool.metadatadialect property value) also produces an exception (i.e. Invalid column name) because the ResultSet inner class convertRow() method implementation uses getString"<table name>") as opposed to the more precise getString(<index>) technique." I don't understand what you mean with more precise ?

Nobody Who Cares July 8, 2008 at 8:38 PM

Attached is my attempt to override the OracleMetaDataDialect class; I 8ized the SQL constants that contain the ANSI "join" clauses. The "final" keyword should be added to the OracleMetaDataDialect because it is difficult to extend w/ all the private constants and methods...or create protected methods for SQL access invoked by the various prepared statement preparation behavior. JBoss Seam 2.0.2.SP1 "seam generate-entities" executed successfully w/ the attached class.

Details

Assignee

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Max Rydahl Andersen
Nobody Who Cares

Community Help Wanted

Yes, please

Components

Affects versions

Priority

Created July 7, 2008 at 5:10 PM
Updated December 10, 2024 at 11:53 AM