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.  [ 2 posts ] 
Author Message
 Post subject: hibernate dialect
PostPosted: Thu Apr 06, 2006 4:07 am 
Newbie

Joined: Mon Mar 27, 2006 10:23 am
Posts: 11
bonjour
je bien configuré la base et je creé ma fichier de mapping pour une seule classe et je saisi le code suivant
package article;

import org.hibernate.*;
import org.hibernate.cfg.*;

public class HibernateUtil {

public static final SessionFactory sessionFactory;

static{
try {

// Create the SessionFactory from hibernate.cfg.xml
System.out.println("debut d'initialisation d'hibernate");
Configuration cfg = new Configuration();
//cfg.addResource("article/Article.hbm.xml");
cfg.addClass(article.Article.class);
cfg.setProperties(System.getProperties());
System.out.println(" fin d'initialisation d'hibernate");
sessionFactory = cfg.buildSessionFactory();
} catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
System.err.println("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
}
}
mais j'ai toujours le meme exception :
Initial SessionFactory creation failed.org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
java.lang.ExceptionInInitializerError
at article.HibernateUtil.<clinit>(HibernateUtil.java:30)

Merci
[/i][/b]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 15, 2006 6:22 am 
Beginner
Beginner

Joined: Mon Nov 28, 2005 7:16 pm
Posts: 20
dans hibernate.cfg verifie que tu as mis la bonne valeur pour l'attribut "hibernate.dialect"

en XML pour HSQLDB ça donne ça :
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.