salut tout le monde :
voila mon Client.hbm
et quand j'exécute mon programme sous eclipse 2 , hiberbnate é, bd mysql il donne :
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 <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.mines.hibernate.Client" table="client"> <id name="IdClient" type="string"> <column name="ID_Client" sql_type="char(30)" /> <generator class="increment" /> </id> <property name="ListeSecteur" type="string" > <column name="Liste_secteur" sql_type="char(30)" not-null="false" /> </property> <property name="Mail" type="string"> <column name="Mail" sql_type="char(80)" not-null="false" /> </property> <property name="Addresse" type="string" > <column name="Addresse" sql_type="char(120)" not-null="false" /> </property> <property name="Tel" type="string"> <column name="Tel" sql_type="char(14)" not-null="false" /> </property> <property name="Login" type="string"> <column name="Login" sql_type="char(30)" not-null="false" /> </property> </class> </hibernate-mapping>
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 11 mai 2006 15:25:27 net.sf.hibernate.cfg.Environment <clinit> INFO: Hibernate 2.1.6 11 mai 2006 15:25:27 net.sf.hibernate.cfg.Environment <clinit> INFO: hibernate.properties not found 11 mai 2006 15:25:27 net.sf.hibernate.cfg.Environment <clinit> INFO: using CGLIB reflection optimizer 11 mai 2006 15:25:27 net.sf.hibernate.cfg.Configuration configure INFO: configuring from resource: /hibernate.cfg.xml 11 mai 2006 15:25:27 net.sf.hibernate.cfg.Configuration getConfigurationInputStream INFO: Configuration resource: /hibernate.cfg.xml 11 mai 2006 15:25:27 net.sf.hibernate.cfg.Configuration addResource INFO: Mapping resource: Client.hbm 11 mai 2006 15:25:27 net.sf.hibernate.util.XMLHelper$ErrorLogger error GRAVE: Error parsing XML: XML InputStream(8) Lattribut "{0}" nest pas déclaré pour lélément "{1}". 11 mai 2006 15:25:27 net.sf.hibernate.util.XMLHelper$ErrorLogger error GRAVE: Error parsing XML: XML InputStream(13) Lattribut "{0}" nest pas déclaré pour lélément "{1}". 11 mai 2006 15:25:27 net.sf.hibernate.util.XMLHelper$ErrorLogger error GRAVE: Error parsing XML: XML InputStream(17) Lattribut "{0}" nest pas déclaré pour lélément "{1}". 11 mai 2006 15:25:27 net.sf.hibernate.util.XMLHelper$ErrorLogger error GRAVE: Error parsing XML: XML InputStream(21) Lattribut "{0}" nest pas déclaré pour lélément "{1}". 11 mai 2006 15:25:27 net.sf.hibernate.util.XMLHelper$ErrorLogger error GRAVE: Error parsing XML: XML InputStream(26) Lattribut "{0}" nest pas déclaré pour lélément "{1}". 11 mai 2006 15:25:27 net.sf.hibernate.util.XMLHelper$ErrorLogger error GRAVE: Error parsing XML: XML InputStream(31) Lattribut "{0}" nest pas déclaré pour lélément "{1}". java.lang.ExceptionInInitializerError at Test.main(Test.java:8) Caused by: java.lang.RuntimeException: Problème de configuration : Error reading resource: Client.hbm at com.mines.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:12) ... 1 more Caused by: net.sf.hibernate.MappingException: Error reading resource: Client.hbm at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:339) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1013) at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:969) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:897) at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:883) at com.mines.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:10) ... 1 more Caused by: net.sf.hibernate.MappingException: invalid mapping at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:287) at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:336) ... 6 more Caused by: org.xml.sax.SAXParseException: Lattribut "{0}" nest pas déclaré pour lélément "{1}". at org.apache.crimson.parser.Parser2.error(Unknown Source) at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source) at org.apache.crimson.parser.Parser2.content(Unknown Source) at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source) at org.apache.crimson.parser.Parser2.content(Unknown Source) at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source) at org.apache.crimson.parser.Parser2.content(Unknown Source) at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source) at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source) at org.apache.crimson.parser.Parser2.parse(Unknown Source) at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source) at org.dom4j.io.SAXReader.read(SAXReader.java:339) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:286) ... 7 more Exception in thread "main"
merci d'avance![]()
Partager