• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HibernateException

 
madhu Karunatham
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to a simple application in hibernate.
I have created the following classes with the two hibernate mapping files
and iam inserting one record into the contact table







and also i added all the required jar files to the classpath
but it showing an exception

here is the exception


org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at FirstExample.main(FirstExample.java:12)



could you pls any body helpme out.

thanks
madhu

[ Edited to use code tags - Paul Sturrock ]
[ November 15, 2006: Message edited by: Paul Sturrock ]
 
Halcon Guatemala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi madhu, welcome to Hibernate world...
It seems a very easy solution:
your hibernate.cfg.xml file must include the

to specify the dialect used for your database.
You can get a complete reference by this file in Hibernate reference
I hope this helps
[ November 15, 2006: Message edited by: Halcon Guatemala ]
 
madhu Karunatham
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Halcon Guatemala:
Hi madhu, welcome to Hibernate world...
It seems a very easy solution:
your hibernate.cfg.xml file must include the

to specify the dialect used for your database.
You can get a complete reference by this file in Hibernate reference
I hope this helps

[ November 15, 2006: Message edited by: Halcon Guatemala ]




I already set the <property name="property"> for ibm db2 database
still it is giving the same exception

the error is showing at sessionfactory=cfg.buildFactory();
 
Halcon Guatemala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again...
are you getting the same trace error? could you show us?
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic