Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate and Postgresql  RSS feed

Gautam Velpula
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....

[java] 04:02:57,981 INFO Environment:543 - Hibernate 3.3.0.SP1
[java] 04:02:58,001 INFO Environment:576 - not found
[java] 04:02:58,011 INFO Environment:709 - Bytecode provider name : javass
[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: /
[java] 04:02:58,111 INFO Configuration:1437 - Configuration resource: /hib
[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:
[java] 04:02:58,422 INFO Configuration:1575 - Configured SessionFactory: n
[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:
[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
ion: Dialect class not found: org.hibernate.PostgreSQLDialect
[java] java.lang.ExceptionInInitializerError
[java] at util.SessionFactoryUtil.<clinit>(Unknown Source)
[java] at Source)
[java] at Source)
[java] Caused by: org.hibernate.HibernateException: Dialect class not found
: org.hibernate.PostgreSQLDialect
[java] at org.hibernate.dialect.DialectFactory.buildDialect(DialectFact
[java] at org.hibernate.dialect.DialectFactory.buildDialect(DialectFact
[java] at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFa
[java] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFacto
[java] at org.hibernate.cfg.Configuration.buildSettings(Configuration.j
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
[java] ... 3 more
[java] Exception in thread "main"
[java] Java Result: 1
Gautam Velpula
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
Boost this thread!