Bonjour,
je fais mes premiers pas dans la configuration d'hibernate 3 sous eclipse 3.2.1, et une base MySql avec une seule table.
J'ai utilisé HibernateSync pour générer mes fichiers de mappings, et fait un petit projet qui affiche le findAll de mon objet, j'ai déja utilisé hibernate pour d'autres projets, mais je n'ai jamais eu a faire ni de configuration ni de deploiement, simplement en tant que développeur.
Apparement, l'initialisation du driver jdbc fonctionne, mais l'appli bloque à ce niveau après l'appel de _RootDAO.initialize(); :
10:14:57,968 INFO SessionFactoryImpl:161 - building session factory
10:14:58,015 INFO SessionFactoryObjectFactory:86 - Factory name: SessionFactory
10:14:58,015 INFO NamingHelper:26 - JNDI InitialContext properties:{}
10:14:58,031 WARN SessionFactoryObjectFactory:98 - Could not bind factory to JNDI
J'ai vu sur le forum que le JNDI posait pas mal de problèmes, mais pas dans mon cas, pourtant j'imagine que le problème est basique, je vous poste ma conf au cas ou :
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="SessionFactory" >
<!-- local connection properties -->
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/gwt</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<!-- property name="hibernate.connection.pool_size"></property -->
<!-- dialect for MySQL -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
</session-factory>
</hibernate-configuration>
Merci de votre aide, de vos remarques
Partager