-->
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: Schema text failed: The dialect was not set.
PostPosted: Fri Aug 27, 2004 2:01 am 
Beginner
Beginner

Joined: Tue May 11, 2004 10:21 am
Posts: 20
Hibernate version:
2.1.6

Mapping documents:

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

<hibernate-configuration>

<session-factory>
<!-- properties -->

<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Ads?autoReconnect=true</property>
<property name="hibernate.connection.username">tkoc</property>
<property name="hibernate.connection.password">trustno1</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>

<!-- Mapping files -->
<mapping resource="com/classads/hh/AdInfoView.hbm.xml"/>
</session-factory>

</hibernate-configuration>

Full stack trace of any exception that occurs:
Schema text failed: The dialect was not set.

Name and version of the database you are using:
MySQL 4.0.17-nt


I am doing an ant build within MyEclipse 3.8 which works fine when using a hibernate.properties file. When I use an xml file (hibernate.cfg.xml) I get the "Schema text failed: The dialect was not set" error. I don't know if this is a hibernate problem, a MyEclipse problem or an ant problem. Does the hibernate.cfg.xml file look correct for the "dialect"?

Tom K.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 27, 2004 5:25 am 
Regular
Regular

Joined: Mon Feb 23, 2004 10:42 pm
Posts: 102
Location: Washington DC
Everything looks good...double check your classpath to make sure there is not a stray copy of the hibernate.cfg.xml laying around without a dialect property specified.

If you could also provide the rest of the log, it would help out.

_________________
Matt Veitas


Top
 Profile  
 
 Post subject: Hibernate not finding right version of hibernate.cfg.xml
PostPosted: Fri Aug 27, 2004 3:36 pm 
Beginner
Beginner

Joined: Tue May 11, 2004 10:21 am
Posts: 20
If Hibernate is not finding right version of hibernate.cfg.xml in my ant build script, assuming it finding another one somewhere in my class path.

Would it be best to give the full path to my hibernate.cfg.xml file?

How would I do this if using Microsoft XP? e.g. //path1/path2/hibernate.cfg.xml ?

TIA

Tom K.


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.