Hi all,
I am trying to run my application in Sun AppServer. And it give my an error "Could not compile the mapping document... duplicate import". But this is running on properly in Tomcat 4.1
I don't know what to do next.
Other iinformation below.
Regards,
Laurence
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
2.1
Mapping documents:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<!-- DO NOT EDIT: This is a generated file that is synchronized -->
<!-- by MyEclipse Hibernate tool integration. -->
<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="connection.username">testuser</property>
<property name="connection.password">password</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:testdb</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>
<!-- mapping files -->
<mapping resource="KpiStrategicResultArea.hbm.xml"/>
<mapping resource="KpiStrategicServiceArea.hbm.xml"/>
<mapping resource="CcypGroup.hbm.xml"/>
<mapping resource="CcypUser.hbm.xml"/>
<mapping resource="KpiComment.hbm.xml"/>
<mapping resource="KpiData.hbm.xml"/>
<mapping resource="KpiDataElementDescriptor.hbm.xml"/>
<mapping resource="KpiGroupSsaRel.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
2005-02-24T16:50:33.898+1100|WARNING|sun-appserver-pe8.1|javax.enterprise.system.stream.err|_ThreadID=16;|16:50:33,888 ERROR Configuration:256 - Could not compile the mapping document
net.sf.hibernate.MappingException: duplicate import: KpiStrategicResultArea
at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85)
at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1256)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:253)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:289)
at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:337)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1027)
at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:983)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:911)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:897)
at com.ccsu.ccyp.hbm.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:49)
at com.ccsu.ccyp.dao.BaseClassDAO.doQuery(BaseClassDAO.java:37)
at com.ccsu.ccyp.dao.CcypUserDAO.getCcypUserByName(CcypUserDAO.java:30)
at com.ccsu.ccyp.login.LoginHandler.validate(LoginHandler.java:69)
at com.ccsu.ccyp.action.LoginAction.executeAction(LoginAction.java:34)
at com.ccsu.ccyp.action.CCYPAction.execute(CCYPAction.java:76)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Name and version of the database you are using:
Oracle
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: