Hi,
I am trying to run a schemaUpdate from the hiberClipse plugin's menu. It gave me this error message:
net.sf.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect. at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:370) at net.sf.hibernate.dialect.Dialect.getDialect(Dialect.java:391) at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.<init>(SchemaUpdate.java:40) at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.<init>(SchemaUpdate.java:35) at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.main(SchemaUpdate.java:87)
I had the hibernate.dialect set in my applicationContext.xml file under sessionFactory as this: <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property>
Then I tried setting the hibernate.dialect in hibernate.cfg.xml as well, like this:
<hibernate-configuration>
<session-factory> <property name="hibernate.dialect">net.sf.hibernate.dialect.MySQLDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/mpts_tms</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">yhh14wds</property> <property name="hibernate.show_sql">true</property> </session-factory> </hibernate-configuration>
But it is still giving me the same error message.
Any help will be greatly appreciated!
|