• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and Postgresql

 
Gautam Velpula
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to test hibernate with postgres and each time I get an error. Dialect class not found.
I think I am missing a jar file. Can someone please help? thanks


I am posting the ant run output....

run:
[java] 04:02:57,981 INFO Environment:543 - Hibernate 3.3.0.SP1
[java] 04:02:58,001 INFO Environment:576 - hibernate.properties not found
[java] 04:02:58,011 INFO Environment:709 - Bytecode provider name : javass
ist
[java] 04:02:58,031 INFO Environment:627 - using JDK 1.4 java.sql.Timestam
p handling
[java] 04:02:58,111 INFO Configuration:1460 - configuring from resource: /
hibernate.cfg.xml
[java] 04:02:58,111 INFO Configuration:1437 - Configuration resource: /hib
ernate.cfg.xml
[java] 04:02:58,252 INFO Configuration:586 - Reading mappings from resourc
e : myTest/date/MyDate.hbm.xml
[java] 04:02:58,382 INFO HbmBinder:322 - Mapping class: myTest.date.MyDate
-> DATES
[java] 04:02:58,422 INFO Configuration:1575 - Configured SessionFactory: n
ull
[java] 04:02:58,522 INFO DriverManagerConnectionProvider:64 - Using Hibern
ate built-in connection pool (not for production use!)
[java] 04:02:58,522 INFO DriverManagerConnectionProvider:65 - Hibernate co
nnection pool size: 1
[java] 04:02:58,532 INFO DriverManagerConnectionProvider:68 - autocommit m
ode: false
[java] 04:02:58,582 INFO DriverManagerConnectionProvider:103 - using drive
r: org.postgresql.Driver at URL: jdbc:postgresql://localhost/glo1
[java] 04:02:58,582 INFO DriverManagerConnectionProvider:109 - connection
properties: {user=postgres, password=****}
[java] 04:02:58,772 INFO SettingsFactory:116 - RDBMS: PostgreSQL, version:
8.3.6
[java] 04:02:58,772 INFO SettingsFactory:117 - JDBC driver: PostgreSQL Nat
ive Driver, version: PostgreSQL 8.3 JDBC3 with SSL (build 604)
[java] Initial SessionFactory creation failed.org.hibernate.HibernateExcept
ion: Dialect class not found: org.hibernate.PostgreSQLDialect
[java] java.lang.ExceptionInInitializerError
[java] at util.SessionFactoryUtil.<clinit>(Unknown Source)
[java] at myTest.date.DateManager.createAndStore(Unknown Source)
[java] at myTest.date.DateManager.main(Unknown Source)
[java] Caused by: org.hibernate.HibernateException: Dialect class not found
: org.hibernate.PostgreSQLDialect
[java] at org.hibernate.dialect.DialectFactory.buildDialect(DialectFact
ory.java:104)
[java] at org.hibernate.dialect.DialectFactory.buildDialect(DialectFact
ory.java:65)
[java] at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFa
ctory.java:460)
[java] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFacto
ry.java:155)
[java] at org.hibernate.cfg.Configuration.buildSettings(Configuration.j
ava:2101)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
tion.java:1325)
[java] ... 3 more
[java] Exception in thread "main"
[java] Java Result: 1
 
Gautam Velpula
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made an error i misspelled the class in the hibernate.cfg.xml file

Thanks anyway
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic