mapping et entity class not found
Bonjour,
je reviens avec une autre question concernant le mapping. Le sujet a déja été résolu par le passé, mais la réponse n'est pas écrit dans le topic en question. j'y vais donc... j'ai le fichier de config comme ca :
Code:
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 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:/home/yannmauron/toxico_db</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration> |
le fichier de mapping :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.genebio.toxico.compound">
<class name="CompoundImpl" table="COMPOUND">
<id name="id" type="int" column="COMPOUND_ID">
</id>
<property name="cid" type="string" column="COMPOUND_CID"/>
<property name="SMILE" type="string" column="COMPOUND_SMILE"/>
</class>
</hibernate-mapping> |
Dans ma logique ca devrait marcher pourtant la console me réponde :
Code:
1 2 3 4
|
org.hibernate.MappingException: entity class not found: com.genebio.toxico.compound.CompoundImpl
org.hibernate.MappingException: entity class not found: com.genebio.toxico.compound.CompoundImpl
java.lang.ClassNotFoundException: com.genebio.toxico.compound.CompoundImpl |
Pourtant j'ai bien une architecture du genre :
src
->config.cfg.xml
->com.genebio.toxico.compound
->->CompoundImpl.java
->->CompoundImpl.hbm.xml
Donc ca devrait marcher non ?