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

Rename fails with: A different object with the same identifier value was already associated with the session

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 12.10.4, 13.2, 12.10.6
    • Old Core, Refactoring
    • None
    • Unknown

    Description

      • I tried to rename a big page with attachments.
      • The rename failed with:
        A different object with the same identifier value was already associated with the session : [com.xpn.xwiki.doc.XWikiSpace#-301582743646408706]
        class com.xpn.xwiki.XWikiException: Error number 0 in 0: Error number 3206 in 3: Exception while renaming document [xwiki:]
            at com.xpn.xwiki.store.XWikiHibernateStore.renameXWikiDoc(XWikiHibernateStore.java:952)
            at com.xpn.xwiki.store.XWikiCacheStore.renameXWikiDoc(XWikiCacheStore.java:228)
            at com.xpn.xwiki.XWiki.renameDocument(XWiki.java:4767)
            at org.xwiki.refactoring.internal.DefaultModelBridge.rename(DefaultModelBridge.java:697)
            at org.xwiki.refactoring.internal.job.MoveJob.atomicOperation(MoveJob.java:113)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.copyOrMove(AbstractCopyOrMoveJob.java:247)
            at org.xwiki.refactoring.internal.job.MoveJob.performRefactoring(MoveJob.java:107)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.maybePerformRefactoring(AbstractCopyOrMoveJob.java:212)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:153)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:125)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:101)
            at org.xwiki.refactoring.internal.job.RenameJob.process(RenameJob.java:50)
            at org.xwiki.refactoring.internal.job.AbstractEntityJobWithChecks.runInternal(AbstractEntityJobWithChecks.java:65)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.runInternal(AbstractCopyOrMoveJob.java:57)
            at org.xwiki.refactoring.internal.job.MoveJob.runInternal(MoveJob.java:68)
            at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
            at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:834)
        Caused by: class com.xpn.xwiki.XWikiException: Error number 0 in 0: Error number 3203 in 3: Exception while deleting document xwiki:
            at com.xpn.xwiki.store.XWikiHibernateStore.deleteXWikiDoc(XWikiHibernateStore.java:1207)
            at com.xpn.xwiki.store.XWikiHibernateStore.lambda$renameXWikiDoc$2(XWikiHibernateStore.java:918)
            at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:820)
            at com.xpn.xwiki.store.XWikiHibernateStore.renameXWikiDoc(XWikiHibernateStore.java:911)
            at com.xpn.xwiki.store.XWikiCacheStore.renameXWikiDoc(XWikiCacheStore.java:228)
            at com.xpn.xwiki.XWiki.renameDocument(XWiki.java:4767)
            at org.xwiki.refactoring.internal.DefaultModelBridge.rename(DefaultModelBridge.java:697)
            at org.xwiki.refactoring.internal.job.MoveJob.atomicOperation(MoveJob.java:113)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.copyOrMove(AbstractCopyOrMoveJob.java:247)
            at org.xwiki.refactoring.internal.job.MoveJob.performRefactoring(MoveJob.java:107)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.maybePerformRefactoring(AbstractCopyOrMoveJob.java:212)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:153)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:125)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:101)
            at org.xwiki.refactoring.internal.job.RenameJob.process(RenameJob.java:50)
            at org.xwiki.refactoring.internal.job.AbstractEntityJobWithChecks.runInternal(AbstractEntityJobWithChecks.java:65)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.runInternal(AbstractCopyOrMoveJob.java:57)
            at org.xwiki.refactoring.internal.job.MoveJob.runInternal(MoveJob.java:68)
            at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
            at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:834)
        Caused by: class javax.persistence.EntityExistsException: A different object with the same identifier value was already associated with the session : [com.xpn.xwiki.doc.XWikiSpace#-301582743646408706]
            at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:123)
            at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
            at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
            at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:914)
            at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:836)
            at org.hibernate.engine.spi.SessionDelegatorBaseImpl.delete(SessionDelegatorBaseImpl.java:915)
            at com.xpn.xwiki.store.XWikiHibernateStore.maybeDeleteXWikiSpace(XWikiHibernateStore.java:1245)
            at com.xpn.xwiki.store.XWikiHibernateStore.maybeDeleteXWikiSpace(XWikiHibernateStore.java:1249)
            at com.xpn.xwiki.store.XWikiHibernateStore.maybeDeleteXWikiSpace(XWikiHibernateStore.java:1232)
            at com.xpn.xwiki.store.XWikiHibernateStore.deleteXWikiDoc(XWikiHibernateStore.java:1200)
            at com.xpn.xwiki.store.XWikiHibernateStore.lambda$renameXWikiDoc$2(XWikiHibernateStore.java:918)
            at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:820)
            at com.xpn.xwiki.store.XWikiHibernateStore.renameXWikiDoc(XWikiHibernateStore.java:911)
            at com.xpn.xwiki.store.XWikiCacheStore.renameXWikiDoc(XWikiCacheStore.java:228)
            at com.xpn.xwiki.XWiki.renameDocument(XWiki.java:4767)
            at org.xwiki.refactoring.internal.DefaultModelBridge.rename(DefaultModelBridge.java:697)
            at org.xwiki.refactoring.internal.job.MoveJob.atomicOperation(MoveJob.java:113)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.copyOrMove(AbstractCopyOrMoveJob.java:247)
            at org.xwiki.refactoring.internal.job.MoveJob.performRefactoring(MoveJob.java:107)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.maybePerformRefactoring(AbstractCopyOrMoveJob.java:212)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:153)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:125)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.process(AbstractCopyOrMoveJob.java:101)
            at org.xwiki.refactoring.internal.job.RenameJob.process(RenameJob.java:50)
            at org.xwiki.refactoring.internal.job.AbstractEntityJobWithChecks.runInternal(AbstractEntityJobWithChecks.java:65)
            at org.xwiki.refactoring.internal.job.AbstractCopyOrMoveJob.runInternal(AbstractCopyOrMoveJob.java:57)
            at org.xwiki.refactoring.internal.job.MoveJob.runInternal(MoveJob.java:68)
            at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
            at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:834)
        
      • I went back in the page, that wasn't renamed and looked at the attachments. Attachments were broken.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andreic Camelia Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: