-
1. Re: scanForMappings scan one hibernate-mapping file twice in
kindlymouse Oct 24, 2005 8:02 PM (in response to kindlymouse)problem resolved.
07:54:52,157 DEBUG [Hibernate] Passing directory [E:\epm\jboss-4.0.3RC2\server\default\deploy\epm-app.ear\epm-web.war] to Hibernate Configration
07:54:52,217 DEBUG [Hibernate] Passing directory [E:\epm\jboss-4.0.3RC2\server\default\deploy\epm-app.ear\epm-ejb.jar] to Hibernate Configration
07:54:52,247 INFO [Configuration] Mapping file: E:\epm\jboss-4.0.3RC2\server\default\deploy\epm-app.ear\epm-ejb.jar\conf\hbm\EpmGProject.hbm.xml
07:54:52,377 DEBUG [DTDEntityResolver] trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
07:54:52,377 DEBUG [DTDEntityResolver] found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
07:54:52,828 INFO [HbmBinder] Mapping class: com.metarnet.epm.business.bo.Project -> EPM_G_PROJECT
07:54:52,908 DEBUG [HbmBinder] Mapped property: pid -> PID
07:54:52,978 DEBUG [HbmBinder] Mapped property: projectName -> PROJECT_NAME
07:54:52,978 DEBUG [HbmBinder] Mapped property: projectId -> PROJECT_ID
07:54:52,978 DEBUG [HbmBinder] Mapped property: speciality -> SPECIALITY
07:54:52,978 DEBUG [HbmBinder] Mapped property: province -> PROVINCE
07:54:52,978 DEBUG [HbmBinder] Mapped property: netType -> NET_TYPE
07:54:52,978 DEBUG [HbmBinder] Mapped property: projectCode -> PROJECT_CODE
07:54:52,978 DEBUG [HbmBinder] Mapped property: principal -> PRINCIPAL
07:54:52,978 DEBUG [HbmBinder] Mapped property: principalTel -> PRINCIPAL_TEL
07:54:52,978 DEBUG [HbmBinder] Mapped property: enPs -> EN_PS
07:54:52,978 DEBUG [HbmBinder] Mapped property: enManual -> EN_MANUAL
07:54:52,988 DEBUG [Hibernate] Passing directory [E:\epm\jboss-4.0.3RC2\server\default\deploy\epm-app.ear] to Hibernate Configration
I trace this Hibernate.scanForMappings(), it first scan epm-ejb.jar, and scan epm.ear.
so , put the hbm.xml at ear but not in ejb.jar and web.war,all right.