Bonjour,
je n'ai pas trouvé de réponse à mon problème sur le forum.

J'utilise eclipse 3.1 avec jdk 1.5.6 sous windows 2000 server sp4. je débute avec hiberate version 2. j'ai installé le plugin sf.net.hibernate. Je me suis inspiré des pages:
http://defaut.developpez.com/tutorie...pse/hibernate/

En lancant mon application j'ai l'erreur suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
 java.lang.RuntimeException: Problème de configuration : Resource: CompteType.hbm not found
voici le fichier hibernate.cfg.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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>
		<!-- local connection properties -->
		<property name="hibernate.connection.url">
			jdbc:microsoft:sqlserver://192.168.2.45:1433
		</property>
		<property name="hibernate.connection.driver_class">
			com.microsoft.jdbc.sqlserver.SQLServerDriver
		</property>
		<property name="hibernate.connection.username">database</property>
		<property name="hibernate.connection.password">xxxxx</property>
		<!-- property name="hibernate.connection.pool_size"></property -->
		<!-- dialect for Microsoft SQL Server -->
		<property name="dialect">
			net.sf.hibernate.dialect.SQLServerDialect
		</property>
		<property name="hibernate.show_sql">false</property>
		<property name="hibernate.use_outer_join">true</property>
		<property name="hibernate.transaction.factory_class">
			net.sf.hibernate.transaction.JTATransactionFactory
		</property>
		<property name="jta.UserTransaction">
			java:comp/UserTransaction
		</property>
		<mapping resource="CompteType.hbm" />
		<mapping resource="MessageReceptionLog.hbm" />
		<mapping resource="Compte.hbm" />
	</session-factory>
</hibernate-configuration>
Les fichiers *.hbm sont dans le repertoire src. J'ai mis
ressource="src\CompteType.hbm"
ressource=".\src\CompteType.hbm"

aucun changment

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
 
<hibernate-mapping package="com.minosis.hibernate">
	<class name="Compte" table="compte">
		<!-- please tell Joe Hudson that the type 'bigint identity' could not be resolved.. defaulting to java.lang.String -->
		<id
			column="id_compte"
			name="IdCompte"
			type="java.lang.String"
		>
			<generator class="vm" />
		</id>
		<property
			column="credit"
			length="10"
			name="Credit"
			not-null="false"
			type="integer"
		 />
		<property
			column="nom_compte"
			length="255"
			name="NomCompte"
			not-null="true"
			type="string"
		 />
		<property
			column="mere_compte"
			length="255"
			name="MereCompte"
			not-null="false"
			type="string"
		 />
		<property
			column="role_compte"
			length="50"
			name="RoleCompte"
			not-null="false"
			type="string"
		 />
		<property
			column="place"
			length="1"
			name="Place"
			not-null="true"
			type="boolean"
		 />
		<property
			column="credit_total"
			length="10"
			name="CreditTotal"
			not-null="false"
			type="integer"
		 />
		<property
			column="easynumber"
			length="19"
			name="Easynumber"
			not-null="false"
			type="string"
		 />
 
		<many-to-one
			class="CompteType"
			name="TypeCompte"
			not-null="true"
		>
			<column name="type_compte" />
		</many-to-one>
		<set inverse="true" name="DossierSet">
			<key column="id_societe" />
			<one-to-many class="Dossier" />
		</set>
		<set
			cascade="all"
			name="PartenaireSet"
			table="compte_partenaire"
		>
			<key column="id_compte1" />
			<many-to-many class="Compte" column="id_compte2" />
		</set>
		<set
			cascade="all"
			name="PartenaireSet"
			table="compte_partenaire"
		>
			<key column="id_compte2" />
			<many-to-many class="Compte" column="id_compte1" />
		</set>
	</class>
</hibernate-mapping>
J'ai surement fait une mauvaise configuration mais je ne trouve pas la source de l'erreur. Qulequ'un a une idée?

Merci d'avace.
Karim