Bonjour,
J'ai l'erreur suivante avec Hibernate. Je ne sais pas quelle est la cause. Pourriez-vous m'orienter ?
SupportForm.hbm.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2javax.servlet.ServletException: org.hibernate.MappingException: entity class not found: SupportForm
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 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="SupportForm" table="requete"> <id name="id" type="long"> <generator class="increment" /> </id> <property name="logiciel" column="logiciel" type="string" length="20"/> <property name="os" column="os" type="string" length="20"/> <property name="probleme" column="probleme" type="string" length="50"/> <property name="email" column="email" type="string" length="30"/> </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 <?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> <!-- Database connection settings --> <property name="connection.driver_class">org.apache.derby.jdbc.ClientDriver</property> <property name="connection.url">jdbc:derby://localhost:1527/supportTechnique</property> <property name="connection.username">admin</property> <property name="connection.password">pass</property> <!-- JDBC connection pool (use the built-in) --> <property name="connection.pool_size">1</property> <!-- SQL dialect --> <property name="dialect">org.hibernate.dialect.DerbyDialect</property> <!-- Echo all executed SQL to stdout --> <property name="show_sql">true</property> <!-- Mapping files --> <mapping resource="SupportForm.hbm.xml"/> </session-factory> </hibernate-configuration>
-------
Cordialement.
Partager