Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-53554

Space import will fail if there are restrictions set on page with both confluence-administrators and administrators groups

    XMLWordPrintable

Details

    Description

      Summary

      When importing a space into Confluence that has page restrictions that include both confluence-administrators and administrators it will fail with an error:

      2016-04-29 16:23:34.952894500 Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into CONTENT_PERM (CP_TYPE, USERNAME, GROUPNAME, CPS_ID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, ID) values ('Edit', NULL, 'administrators', 34701313, 'ff808081545c405b01545c9341d5002d', '2015-09-07 10:44:33.000000 +07:00:00', NULL, '2015-09-07 10:44:33.000000 +07:00:00', 34832386) was aborted.  Call getNextException to see the cause.
      2016-04-29 16:23:34.952900500 	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2707)
      2016-04-29 16:23:34.952904500 	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1912)
      2016-04-29 16:23:34.952904500 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:338)
      2016-04-29 16:23:34.952905500 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2888)
      2016-04-29 16:23:34.952905500 	at sun.reflect.GeneratedMethodAccessor309.invoke(Unknown Source)
      2016-04-29 16:23:34.952910500 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      2016-04-29 16:23:34.952911500 	at java.lang.reflect.Method.invoke(Method.java:498)
      2016-04-29 16:23:34.952911500 	at com.github.gquintana.metrics.proxy.MethodInvocation.proceed(MethodInvocation.java:75)
      2016-04-29 16:23:34.952911500 	at com.github.gquintana.metrics.sql.AbstractStatementProxyHandler.invoke(AbstractStatementProxyHandler.java:64)
      2016-04-29 16:23:34.952916500 	at com.github.gquintana.metrics.proxy.ProxyHandler.invoke(ProxyHandler.java:73)
      2016-04-29 16:23:34.952916500 	at com.sun.proxy.$Proxy513.executeBatch(Unknown Source)
      2016-04-29 16:23:34.952916500 	at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
      2016-04-29 16:23:34.952917500 	at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
      2016-04-29 16:23:34.952921500 	at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
      2016-04-29 16:23:34.952921500 	at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
      2016-04-29 16:23:34.952922500 	at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
      2016-04-29 16:23:34.952922500 	... 67 more
      2016-04-29 16:23:34.952922500 caused by:
      2016-04-29 16:23:34.952926500 org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "cp_unique_group"

      Environment

      • Confluence Cloud 1000.71.0

      Steps to Reproduce

      1. Apply page restrictions to a page and include both groups, confluence-administrators and administrators
      2. Export to XML with intent to reimport.
      3. On another Confluence instance, import the space.

      Expected Results

      Should ignore the permissions that were set and not cause an issue.

      Actual Results

      Fails on this error mentioned above.

      Workaround

      Remove the page restrictions for both groups first, then create the XML to import.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smackie@atlassian.com Shannon S
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: