• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HibernateException

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again...
are you getting the same trace error? could you show us?
Thanks
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic