geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: oracle + hibernate : Unsupported feature getDatabaseMajorVersion
Date Wed, 12 Apr 2006 15:54:03 GMT
I'm not sure what to tell you.  Hibernate is trying to load the
database version from the driver:

org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
  calls
org.hibernate.cfg.SettingsFactory.getDatabaseMajorVersion(SettingsFactory.java:293)
  calls
org.tranql.connector.jdbc.DatabaseMetaDataHandle.getDatabaseMajorVersion(DatabaseMetaDataHandle.java:307)

The Oracle driver seems to throw an exception when we get around to
calling that method on it:

oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
  calls
oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)

Are you 100% sure that you're using the same Hibernate and Oracle JARs
in Geronimo?  (This smells like an outdated Oracle driver JAR to me.) 
Do you want to write a tiny test program to just load the Oracle
driver and call getDatabaseMetadata.getDatabaseMajorVersion and
confirm that it throws the exception you're seeing?

Thanks,
    Aaron


On 4/12/06, James CE Johnson <jcej@tragus.org> wrote:
> Hi all,
>
> I'm trying out Geronimo for the first time by moving a simple webapp from JBoss (and
SUN JES) to
> Geronimo 1.0 (geronimo-jetty-j2ee-1.0.tar.gz specifically).
>
> I've configured my connection pool by importing the JBoss definition:
> <datasources>
>   <local-tx-datasource>
>     <jndi-name>MyDS</jndi-name>
>     <use-java-context>false</use-java-context>
>     <connection-url>jdbc:oracle:thin:@databaseHost:1521:databaseSID</connection-url>
>     <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
>     <user-name>...</user-name>
>     <password>...</password>
> <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
>   </local-tx-datasource>
> </datasources>
> I copied the Oracle jar from my JBoss installation to
> geronimo-1.0/repository/ojdbc/jars/ prior to starting Geronimo and configuring the pool.
>
> The application itself is built on Spring (1.2.6) and Hibernate (3.1). I've re-verified
that it
> works in JBoss (4.0.2).
>
> When I deploy it to Geronimo I get the following stack trace:
>
> 10:58:15,247 INFO  [ConnectionProviderFactory] Initializing connection provider:
> org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
> 10:58:15,974 WARN  [GeronimoConnectionEventListener] connectionErrorOccurred called with
null
> java.sql.SQLException: Unsupported feature
>         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:689)
>         at
> oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
>         at
> org.tranql.connector.jdbc.DatabaseMetaDataHandle.getDatabaseMajorVersion(DatabaseMetaDataHandle.java:307)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.hibernate.cfg.SettingsFactory.getDatabaseMajorVersion(SettingsFactory.java:293)
>         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
>         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1859)
>         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1152)
>         at
> org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:800)
>         at
> org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:726)
>     ... more Spring ...
>
> I'm sure I've configured something wrong in Geronimo. Hopefully someone out there has
seen this
> before and can point out my error.
>
> Thanks,
> James
>
>

Mime
View raw message