• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dialect class not found  RSS feed

 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I am new to hibernate and i am trying to learn it. I have gone through some tutorials and did a sample application. Now when i run the Program i am getting the following error
org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.MYSQLDialect
I unzipped the hibernate3.jar and found MYSQLDialect.class in correct location.
Can anyone suggest me how to solve this error.
Thanks
Kranthi Kumar
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you have hibernate3.jar in your classpath everything should be fine. Is this a stand alone Java app?
 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah this is a stand alone application.
 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did set hibernate3.jar in class path still no progress. I am getting the same error.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you spelled the dialect correctly?
 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following is the hibernate.cfg.xml



Following is the Class containing the main method


Following is the mapping xml

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd check again, have you spelled org.hibernate.dialect.MySQLDialect correctly?
[ October 14, 2008: Message edited by: Paul Sturrock ]
 
Vijay Gadde
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems like your doing mistake in Direct URL itself here is what I was using in my application

Hope it will solve your problem then
Thanks,Vijay Gadde
 
vipin jain
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello kranthi kumar,

in yyour code your are using MYSQLDialect : Here Y is caps , it must be require small letter i.e. MySQLDialect

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is solved. As you people said it is the problem with MySQLDialect. Thank you very much.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!