Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to resolve getting "Dialect class not found: org.hibernate.dialect.Oracle10gDialect " exception

 
Shweta Baranwal
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to create a hibernate application using Oracle 10g. i have created the hibernate.cfg.xml having following code:-

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.password">tiger</property>
<property name="hibernate.connection.url">jdbcracle:thin:@192.168.100.13:1521rtd</property>
<property name="hibernate.connection.username">scott</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
</session-factory>
</hibernate-configuration>

but the application is throwing following compiler error:-

Dialect class not found: org.hibernate.dialect.Oracle10gDialect

can anyone please help me to resolve this problem.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, the jar containing that file must be on your classpath.

That dialect class is in the hibernate3.jar file. You might want to open up that jar file with winzip and ensure it is there; of course, there is no reason why it shouldn't be.

but the application is throwing following compiler error:-


When you say "compile" do you mean "runtime?" I'm not sure you go to the dialect file at compile time.

Basically, you need to set up your runtime classpath to view the hibernate3.jar file. Remember, your runtime classpath is different from your design time classpath.

-Cameron Mckenzie
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not duplicate post. As the thread starter you can always delete your duplicate thread on your own.

Thanks

Mar
 
tabiul mahmood
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need Oracle10g dialect? Hibernate already provides


  • org.hibernate.dialect.Oracle9Dialect
  • org.hibernate.dialect.OracleDialect


  • which should be sufficient for your requirement as Hibernate does not need any exotic Oracle syntax for it's functionality. If you want to do any database specific query then you can use normal SQL in hibernate
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic