i put a hibernate-service.xml in ear , and add jboss-app.xml in META-INF.

------------------------------------------------------------------------------
hibernate-service.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
server
mbean code="org.jboss.hibernate.jmx.Hibernate" 
name="epm-hibernate:name=EPMSessionFactory"

attribute name="DatasourceName" 
     java:/XAOracleEPMDS  
/attribute

attribute name="Dialect"
    org.hibernate.dialect.Oracle9Dialect
/attribute

attribute name="SessionFactoryName"
    java:/hibernate/EPMSessionFactory
/attribute

attribute name="Hbm2ddlAuto"
false
/attribute

attribute name="ShowSqlEnabled"
true
/attribute

attribute name="CacheProviderClass"
org.hibernate.cache.HashtableCacheProvider
/attribute

/mbean
/server
------------------------------------------------------------------------------------

------------------------------------------------------------------------------
jboss-app.xml  like this:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" 
"http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd";> 
jboss-app
   module
      service
            hibernate-service.xml
      /service
   /module
/jboss-app
---------------------------------------------------------------------------------

the ear catalog like this:

test.ear
|---META-INF
|          |----application.xml
|          |----jboss-app.xml
|          |----MANIFEST.MF
|
|---hibernate-service.xml
|---epm-ejb.jar
|---epm-web.war


Problem is, if i don't put any hbm.xml in test-ejb.jar , nothing wrong.But when 
i put a hbm.xml in test-ejb.jar,it has a wrong:

07:15:49,749 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:15:50,079 INFO  [HbmBinder] Mapping class: 
com.metarnet.epm.business.bo.Project -> EPM_G_PROJECT
07:15:50,159 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:15:50,249 ERROR [Configuration] Could not compile the mapping document
org.hibernate.MappingException: duplicate import: 
com.metarnet.epm.business.bo.Project

The jboss scan the same hibernate-mapping file twice!
anybody would help me ? thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3903132#3903132

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3903132


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to