-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem running SchemaUpdate - dialect not set?
PostPosted: Sat Apr 02, 2011 9:00 pm 
Newbie

Joined: Sat Apr 02, 2011 8:53 pm
Posts: 1
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.