2011-08-04

Fixing problem in hibernate "unknown Oracle major version [11]"

Using the datasource of JBoss 5.0.1 with Oracle 11g always causes the error

org.hibernate.HibernateException: unknown Oracle major 
version [11]

I wrote an emty class extending from org.hibernate.dialect.Oracle10gDialect

import org.hibernate.dialect.Oracle10gDialect;
package my.util;

public class My_Oracle_Dialect extends Oracle10gDialect{
 
 /* Workaround for bug "missing Oracle 11g dialect"*/
}

In the persistence.xml set the dialect:

...

org.hibernate.ejb.HibernatePersistence
    java:/MY_DS
    
      
                 
    
  
...

Maybe it is not the smartest solution, but it works...

1 Kommentar:

  1. ähh..., warum nicht gleich "org.hibernate.dialect.Oracle10gDialect" in die persistence.xml schreiben? Funktioniert auch.

    AntwortenLöschen