Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-56094

Unable to add page comments, inline comments and tasks in page view but not in edit mode

    XMLWordPrintable

Details

    • Bug
    • Status: Long Term Backlog (View Workflow)
    • Low
    • Resolution: Unresolved
    • 6.4.3, 6.6.6
    • None
    • Core - Email
    • None

    Description

      Symptoms

      While in the View Page mode, the following operations fail:

      • Adding a page comment fails with "Failed to save the comment. Please try again later." error in a pop-up.
      • Checking or unchecking an inline task fails with "Oops! Your task change couldn't be saved. There could be a few reasons for this." error in a pop-up.
      • Adding an inline comment fails with "Could not save the comment" error in a pop-up.

      The error logged in atlassian-confluence.log will be similar to the one below:

      2018-07-13 14:06:33,110 WARN [http-nio-8090-exec-34] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
        ->[PluginReadWriteTx]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #367352675)
       -- referer: http://localhost:8090/confluence/display/NS4T/test+attachment | url: /confluence/rest/inlinecomments/1.0/comments | traceId: 69c1219e64f3f5ad | userName: admin
      2018-07-13 14:06:33,116 ERROR [http-nio-8090-exec-34] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: Transaction rolled back because it has been marked as rollback-only
       -- referer: http://localhost:8090/confluence/display/NS4T/test+attachment | url: /confluence/rest/inlinecomments/1.0/comments | traceId: 69c1219e64f3f5ad | userName: admin
      org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
      	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
      	at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy53.commit(Unknown Source)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:87)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:71)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)
      	at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at com.sun.proxy.$Proxy316.doInTransaction(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
      	at com.sun.proxy.$Proxy316.doInTransaction(Unknown Source)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

      Additional examples of errors:

      Error related to inline tasks
      2018-08-07 00:45:35,078 WARN [http-nio-8090-exec-8] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
        ->[com.atlassian.confluence.pages.DefaultPageManager.saveContentEntity]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #487036433)
       -- referer: http://localhost:8090/confluence/display/TS1/new+page+12345 | url: /confluence/rest/inlinetasks/1/task/12877825/3/ | traceId: b9509185a649694d | userName: admin
      
      Error related to inline comments
      2018-08-07 01:03:46,503 WARN [http-nio-8090-exec-7] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
        ->[PluginReadWriteTx]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #632243332)
       -- referer: http://localhost:8090/confluence/display/TS1/new+page+12345 | url: /confluence/rest/inlinecomments/1.0/comments | traceId: 86f5447733a5a519 | userName: admin
      
      Error related to page comments
      2018-08-07 01:02:55,672 WARN [http-nio-8090-exec-1] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
        ->[com.atlassian.confluence.content.service.comment.CreateCommentFromEditorCommand.execute]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #1011990537)
       -- referer: http://localhost:8090/confluence/display/TS1/new+page+12345 | url: /confluence/rest/tinymce/1/content/12877825/comment | traceId: 6fadb580902edbb0 | userName: admin
      

      Cause

      This issue occurs because contents are out of sync in sequences and tables related to Confluence Content Notifications Plugin and to Confluence Batch Notifications Plugin.
      One of the reasons is if the sequence is reset to use values that already exist in their related table.

      Below are the sequences that play a role on this.
      The complete name may vary on different DB types, so they are presented as a regex:

      • AO_88BB94_BATCH_NOT%
      • AO_9412A1_AONOT%

      Below are the tables that play a role on this:

      • AO_9412A1_AONOTIFICATION
      • AO_88BB94_BATCH_NOTIFICATION

      How to Reproduce the Issue

      The instructions below are to reproduce the issue on Confluence 6.6.4 running with PostgreSQL database.

      1. Reset the sequence AO_88BB94_BATCH_NOTIFICATION_ID_seq to a value that contains in table AO_88BB94_BATCH_NOTIFICATION.
      2. Reset the sequence AO_9412A1_AONOTIFICATION_ID_seq to a value that contains in table AO_9412A1_AONOTIFICATION.
      3. Access Confluence and create a sample page with a single inline task and publish it.
      4. Try to check the inline task.
      5. Try to add an inline comment.
      6. Try to add a page comment.

      Workaround

      For each set of sequence and table:

      1. Get the maximum value of the id attribute in the related table.
      2. Set the current value of the sequence equals to what you identified in the previous step.

      Since the procedure might differ on each database type, pair up with your DBA to get this done.

      Please check this KB if you encountered similar problem on Confluence running with MS SQL Server.

      Expected Behavior

      If there is anything wrong on the database side specifically with the notification plugin, this should not impact on other areas such as comments, inline comments and inline tasks.
      Also, the logging should be more meaningful regarding this issue. Checking all sequences and their related tables could be a step of Confluence initialization process.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tmasutti Thiago Masutti
              Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: