• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Connection  RSS feed

 
Javed Alam A
Greenhorn
Posts: 5
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Hibernate and getting this Exception. What is reason of this exception Help me Please!!


Oct 30, 2011 11:17:39 AM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.1
Oct 30, 2011 11:17:39 AM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Oct 30, 2011 11:17:39 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Oct 30, 2011 11:17:39 AM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Oct 30, 2011 11:17:40 AM org.hibernate.cfg.Configuration addClass
INFO: Reading mappings from resource: com/Book.hbm.xml
Oct 30, 2011 11:17:40 AM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource: com/Book.hbm.xml
Oct 30, 2011 11:17:40 AM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.Book -> books
Oct 30, 2011 11:17:40 AM org.hibernate.connection.UserSuppliedConnectionProvider configure
WARNING: No connection properties specified - the user must supply JDBC connections
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:409)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
at com.BookTest.main(BookTest.java:11)
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put this line in your persistence.xml


BUT change the value to be the same as the database that you will use.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!