-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate doesnot support oracle 11g - can some one help ?
PostPosted: Thu Aug 11, 2011 2:48 pm 
Newbie

Joined: Thu Aug 11, 2011 2:43 pm
Posts: 1
Hibernate doesnot support oracle 11g as it does not have Oracle11g dialect.

I am trying to use hibernate as persistence provider underneath JPA.
Below is my persistence.xml under WEB-INF folder:
<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd"
version="1.0">
<persistence-unit name="actionBazaar" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>testDS</non-jta-data-source>
<properties>
<property name="hibernate.archive.autodetection" value="class, hbm"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory" />
</properties>
</persistence-unit>
</persistence>
I am packing my application as an ear.
While running my application encountered following error:

Caused by: org.hibernate.HibernateException: Could not instantiate dialect class
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:107)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:65)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:460)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:155)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
... 53 more
Caused by: java.lang.ClassCastException: org.hibernate.dialect.Oracle10gDialect cannot be cast to org.hibernate.dialect.Dialect
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:101)
... 60 more

Can some one help ?


Top
 Profile  
 
 Post subject: Re: Hibernate doesnot support oracle 11g - can some one help ?
PostPosted: Fri Aug 12, 2011 2:03 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
Hibernate doesnot support oracle 11g as it does not have Oracle11g dialect.

That's not true
http://docs.jboss.org/hibernate/core/3. ... l-dialects

Quote:
Caused by: java.lang.ClassCastException: org.hibernate.dialect.Oracle10gDialect cannot be cast to org.hibernate.dialect.Dialect

This likely means you are having duplicate classes on your classpath, making the JVM complain about an incompatible assignment. I'd suggest to check which jars are on the classpath, or run a tool to search for duplicates as Tattletale.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.