I have a duplicate import error when opening the session but I don't see what is duplicated.
Hibernate version: 3
Mapping documents:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost:1701</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.cache.use_query_cache">true</property>
<mapping resource="org/infodavid/data/entities/rc/City.hbm.xml" />
</session-factory>
</hibernate-configuration>
and
<hibernate-mapping package="org.infodavid.data.entities" auto-import="true" default-access="property">
<!-- CityBMP -->
<class name="CityBMP" table="CITIES">
<composite-id name="key" class="org.infodavid.data.client.CityPK">
<key-property name="code" column="code" type="java.lang.String"/>
<key-property name="country" column="country" type="java.lang.String"/>
</composite-id>
<version name="version" column="version" type="java.lang.Integer"/>
<property name="name" column="name" type="java.lang.String" not-null="true"/>
</class>
<query name="city.findByPrimaryKey">select key from CityBMP where code = ? and country = ? order by code, name, country</query>
<query name="city.findByName">select key from CityBMP where name like ? order by code, country</query>
<query name="city.findAll">select key from CityBMP order by code, country</query>
</hibernate-mapping>
Full stack trace of any exception that occurs:
2006-01-12 14:29:59,591 INFO [org.hibernate.cfg.Configuration] configuring from resource: /META-INF/hibernate.cfg.xml
2006-01-12 14:29:59,591 INFO [org.hibernate.cfg.Configuration] Configuration resource: /META-INF/hibernate.cfg.xml
2006-01-12 14:29:59,591 DEBUG [org.hibernate.util.DTDEntityResolver] trying to locate
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
2006-01-12 14:29:59,591 DEBUG [org.hibernate.util.DTDEntityResolver] found
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] hibernate.connection.driver_class=org.hsqldb.jdbcDriver
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] hibernate.connection.url=jdbc:hsqldb:hsql://localhost:1701
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] hibernate.dialect=org.hibernate.dialect.HSQLDialect
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] hibernate.show_sql=true
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] hibernate.hbm2ddl.auto=update
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] hibernate.cache.use_query_cache=true
2006-01-12 14:29:59,591 DEBUG [org.hibernate.cfg.Configuration] null<-org.dom4j.tree.DefaultAttribute@f0d3a6 [Attribute: name resource value "org/infodavid/data/entities/rc/City.hbm.xml"]
2006-01-12 14:29:59,591 INFO [org.hibernate.cfg.Configuration] Reading mappings from resource: org/infodavid/data/entities/rc/City.hbm.xml
2006-01-12 14:29:59,607 DEBUG [org.hibernate.util.DTDEntityResolver] trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
2006-01-12 14:29:59,607 DEBUG [org.hibernate.util.DTDEntityResolver] found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
2006-01-12 14:29:59,607 INFO [org.hibernate.cfg.Mappings] duplicate import: org.infodavid.data.entities.CityBMP->org.infodavid.data.entities.CityBMP
2006-01-12 14:29:59,607 INFO [org.hibernate.cfg.Mappings] duplicate import: org.infodavid.data.entities.CityBMP->CityBMP
2006-01-12 14:29:59,607 INFO [org.hibernate.cfg.HbmBinder] Mapping class: org.infodavid.data.entities.CityBMP -> CITIES
2006-01-12 14:29:59,607 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: code -> code
2006-01-12 14:29:59,607 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: country -> country
2006-01-12 14:29:59,607 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: key -> code, country
2006-01-12 14:29:59,607 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: version -> version
2006-01-12 14:29:59,607 DEBUG [org.hibernate.cfg.HbmBinder] Mapped property: name -> name
2006-01-12 14:29:59,607 INFO [STDOUT] org.hibernate.MappingException: Could not read mappings from resource: org/infodavid/data/entities/rc/City.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:483)
Name and version of the database you are using:
Hypersonic for tests