添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Issue Summary

When importing a Word document to Confluence and the Word file contains headings, an image, and a Table of Content , the import appears to fail as an error message is displayed. In the background, the import seems to have succeeded as the pages were created successfully.

Steps to Reproduce

  • Open a Confluence page and click on ... > Import Word Document .
  • Upload any Word document that contains Heading 1 text, an image, as well as a Table of Content.
  • This file is a sample: Test document with image and ToC.docx
  • For Split by heading , choose Level 1 Headings .
  • Click on Import .
  • Expected Results

    The import should succeed with no error messages.

    Actual Results

    This error appears in the UI:

    The below exception is thrown in the atlassian-confluence.log file:

    2021-09-30 15:42:59,034 ERROR [http-nio-27130-exec-10] [org.hibernate.internal.ExceptionMapperStandardImpl] mapManagedFlushFailure HHH000346: Error during managed flush [Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.confluence.pages.Page#1409056]] -- url: /c7130/pages/worddav/doimportword.action | traceId: ecdd62701881e0bf | userName: admin | referer: http: //localhost:27130/c7130/pages/worddav/importword.action?pageId=360451 2021-09-30 15:42:59,036 WARN [http-nio-27130-exec-10] [net.sf.hibernate.StaleObjectStateException] <init> An operation failed due to stale data -- url: /c7130/pages/worddav/doimportword.action | traceId: ecdd62701881e0bf | userName: admin | referer: http: //localhost:27130/c7130/pages/worddav/importword.action?pageId=360451 net.sf.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.confluence.pages.Page#1409056] at com.atlassian.hibernate.adapter.adapters.HibernateExceptionAdapter.adaptStaleObjectStateException(HibernateExceptionAdapter.java:580) at com.atlassian.hibernate.adapter.adapters.HibernateExceptionAdapter.adaptOptimisticLockException(HibernateExceptionAdapter.java:551) at com.atlassian.hibernate.adapter.adapters.HibernateExceptionAdapter.adaptImpl(HibernateExceptionAdapter.java:102) at com.atlassian.hibernate.adapter.adapters.HibernateExceptionAdapter.adapt(HibernateExceptionAdapter.java:40) at com.atlassian.hibernate.adapter.adapters.TransactionV2Adapter.commit(TransactionV2Adapter.java:34) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:510) at com.atlassian.confluence.impl.hibernate.ConfluenceHibernateTransactionManager.doCommit(ConfluenceHibernateTransactionManager.java:69) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:746) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:714) 2021-09-30 15:42:59,039 WARN [http-nio-27130-exec-10] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doCommit Commit failed. Rolling back. Error: Object of class [com.atlassian.confluence.pages.Page] with identifier [1409056]: optimistic locking failed; nested exception is net.sf.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.confluence.pages.Page#1409056] -- url: /c7130/pages/worddav/doimportword.action | traceId: ecdd62701881e0bf | userName: admin | referer: http: //localhost:27130/c7130/pages/worddav/importword.action?pageId=360451 2021-09-30 15:42:59,039 WARN [http-nio-27130-exec-10] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions: ->[ null ]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #358820460) -- url: /c7130/pages/worddav/doimportword.action | traceId: ecdd62701881e0bf | userName: admin | referer: http: //localhost:27130/c7130/pages/worddav/importword.action?pageId=360451 2021-09-30 15:42:59,040 ERROR [http-nio-27130-exec-10] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- url: /c7130/pages/worddav/doimportword.action | traceId: ecdd62701881e0bf | userName: admin | referer: http: //localhost:27130/c7130/pages/worddav/importword.action?pageId=360451 org.springframework.orm.hibernate.HibernateOptimisticLockingFailureException: Object of class [com.atlassian.confluence.pages.Page] with identifier [1409056]: optimistic locking failed; nested exception is net.sf.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.confluence.pages.Page#1409056] Caused by: net.sf.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.confluence.pages.Page#1409056]

    Once you navigate back to the site, you'll notice that the pages were successfully created despite the error messages.

    Workaround

    Remove the ToC from the Word document or remove the attachment before importing the file to Confluence.