[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-514) getDatabaseMajorVersion unsupported by some Oracle drivers

Michael Wang (JIRA) noreply at atlassian.com
Sat Aug 19 22:39:19 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-514?page=comments#action_24002 ] 

Michael Wang commented on HHH-514:
----------------------------------


Hibernate 3.1 & Oracle 9i2 & jdk 1.5 & Tomcat 5.5 

1. download the hibernate and unzip it. then edit the hibernate.properties file (in hibernate-3.1\etc) of database part as 
  
## Oracle

hibernate.dialect org.hibernate.dialect.OracleDialect
hibernate.dialect org.hibernate.dialect.Oracle9Dialect
hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
hibernate.connection.username caveatemptor
hibernate.connection.password caveatemptor
hibernate.connection.url jdbc:oracle:thin:@localhost:1521:itprod

and commet out default configure for HypersonicSQL.

2. copy the oracle driver classes12.jar into the lib directory. 

3. run command build to make hibernate3.jar.

4. remove/comment out the db configure in hibernate.cfg.xml file of application.
   (eg. the caveatemptor sample, which is in C:\caveatemptor-book\src\etc\webapp.test\conf)

5. deploy the application to tomcat. 

6. the oracle 9i with hibernate 3.1 is up rinning right now!

> getDatabaseMajorVersion unsupported by some Oracle drivers
> ----------------------------------------------------------
>
>          Key: HHH-514
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-514
>      Project: Hibernate3
>         Type: Bug

>   Components: core
>     Versions: 3.0.4
>  Environment: WLS 8.1 SP2, Hibernate 3.0.4, Oracle9i Enterprise Edition Release 9.2.0.4.0, Oracle JDBC driver 9.2.0.3.0
>     Reporter: Mathias Bogaert
>     Priority: Critical

>
>
> Put an extra try catch around databaseMajorVersion = meta.getDatabaseMajorVersion(); in SettingsFactory (change occured in version 1.31) and handle 0 value in  DialectFactory.buildDialect.
> WARN - Could not obtain connection metadata
> java.sql.SQLException: Kenmerk wordt niet ondersteund.
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
>         at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:690)
>         at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4451)
>         at weblogic.jdbc.wrapper.DatabaseMetaData_oracle_jdbc_driver_OracleDatabaseMetaData.getDatabaseMajorVersion(Unknown Source
> )
>         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:75)
>         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
>         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list