Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-4291

Duplicate class/entity mapping com.xpn.xwiki.doc.XWikiDocument (from: xwiki.mssql.hbm.xml)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Blocker
    • None
    • 1.9
    • Storage
    • None
    • Windows XP, Tomcat 5.5
    • Hibernate SQL msSQL Mapping
    • Unknown

    Description

      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

      Attachments

        1. hibernate.cfg.xml
          6 kB
        2. hibernate.cfg.xml
          7 kB
        3. xwiki.cfg
          26 kB
        4. xwiki.cfg
          24 kB
        5. xwiki-core-1.9 - xwiki.mssql.hbm.xml
          35 kB

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              jolanda Jolanda Naafs
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: