Doing simple Hibernate application... Please help me out...!
843789Jun 3 2009 — edited Jun 5 2009Hi,
I am very new to hibernate and trying my hand at it for the first time...
I am getting "org.hibernate.HibernateException: Hibernate Dialect must be explicitly set" exception.
{color:#0000ff}I am using Eclipse IDE and my hibernate.cfg.xml file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hibernate_db</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="username">root</property>
<property name="password">akshay</property>
<property name="show_sql">true</property>
<mapping resource="Account.hbm.xml"/>
</session-factory>
</hibernate-configuration>
{color}
{color:#ff0000}Exception stack trace:
62 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA
109 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
124 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
187 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
374 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource: com/wipro/Account.hbm.xml
374 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource: com/wipro/Account.hbm.xml
795 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.wipro.Account -> account
966 [main] WARN org.hibernate.connection.UserSuppliedConnectionProvider - No connection properties specified - the user must supply JDBC connections
Exception in thread "main" org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:80)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:62)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:460)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:155)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at com.wipro.Main.main(Main.java:46)
{color}
{color:#339966}
Please suggest where the problem is and suggest what I need to do... any JARs missing or anything that is going wrong...!!
Thank you in advance!{color}