-->
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.  [ 3 posts ] 
Author Message
 Post subject: org.hibernate.HibernateException
PostPosted: Tue Jul 24, 2007 4:12 am 
Newbie

Joined: Sun Jul 22, 2007 9:59 pm
Posts: 4
Hi,

I am getting the following error while i am running a hibernate application:

org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
[WARN] UserSuppliedConnectionProvider - -No connection properties specified - the user must supply JDBC connections

I am using the following hibernate.cfg.xml file

<?xml version="1.0"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>
<!-- Database connection settings -->
<property name="connection.url">jdbc:mysql://localhost/employees</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.username">root</property>
<property name="connection.password">Passw0rd</property>

<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>

<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>

<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<mapping resource="test/Department.hbm.xml"/>

</session-factory>

</hibernate-configuration>

_________________
Regards
Shivali Goel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 4:29 am 
Newbie

Joined: Tue Jul 24, 2007 3:58 am
Posts: 1
Location: Sri Lanka
Hi shivali,

I am always follow the below method of defining dialect
in session factory
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
-------
--------
</props>
</property>

try this.

good luck


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 7:48 pm 
Newbie

Joined: Sun Jul 22, 2007 9:59 pm
Posts: 4
hi mubeen,

Thanks a lot for the suggestion but unfortunately it didn't worked.

Just to bring to your notice that I am using hibernate3.2 with tomcat5.0.30 and j2sdk1.4.2_15. The database is MySql.

Also I have tried running my application with Jdeveloper but its says the same error.


If you find anything else please let me know.

_________________
Regards
Shivali Goel


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

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.