org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.xpn.xwiki.doc.XWikiDocument

XWiki.org JIRA | Jolanda Naafs | 8 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Dear Readers, After having a fine working version of the XWiki Enterprize version 1.8, I'm having trouble installing version 1.9. We use MS SQL Server and had our share of problems running XWiki on it, but they were all solvable. This time we need help.... While mapping the file xwiki.mssql.hbm.xml hibernate comes with the following error: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.xpn.xwiki.doc.XWikiDocument at org.hibernate.cfg.Mappings.addClass(Mappings.java:118) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:145) at org.hibernate.cfg.Configuration.add(Configuration.java:675) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:510) at org.hibernate.cfg.Configuration.addResource(Configuration.java:572) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1593) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1561) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514) at org.hibernate.cfg.Configuration.configure(Configuration.java:1434) at com.xpn.xwiki.store.XWikiHiber...... The hibernate settings we use: <!-- MSSQL Configuration --> <property name="connection.url">jdbc:jtds:sqlserver://localhost:3306/xwiki;tds=8.0;lastupdatecount=true</property> <property name="connection.username">xxx</property> <property name="connection.password">yyy</property> <property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property> <property name="dialect">org.hibernate.dialect.SQLServerDialect</property> <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property> <mapping resource="xwiki.mssql.hbm.xml"/> I hope someone has the answer to this missery. Kind regards, Jolanda Naafs

    XWiki.org JIRA | 8 years ago | Jolanda Naafs
    org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.xpn.xwiki.doc.XWikiDocument

    Root Cause Analysis

    1. org.hibernate.DuplicateMappingException

      Duplicate class/entity mapping com.xpn.xwiki.doc.XWikiDocument

      at org.hibernate.cfg.Mappings.addClass()
    2. Hibernate
      Configuration.configure
      1. org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
      2. org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:145)
      3. org.hibernate.cfg.Configuration.add(Configuration.java:675)
      4. org.hibernate.cfg.Configuration.addInputStream(Configuration.java:510)
      5. org.hibernate.cfg.Configuration.addResource(Configuration.java:572)
      6. org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1593)
      7. org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1561)
      8. org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540)
      9. org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514)
      10. org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
      10 frames