Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-56037

Clicking "Add User" button twice while creating a new user returns with error message

XMLWordPrintable

      Summary

      System Error page in Show All Users page is seen,
      After attempting to create duplicated users by clicking the "Add" button a couple of times, during new user creation.

      Steps to Reproduce

      1. Go to Confluence Admin > Users > AddUsers
      2. Fill up the required information
      3. Press the "Add" button twice rapidly
      4. The error message will appear

        The following error(s) occurred:

        Failed to create the user 'user1'. Check your server logs for more information.

        and the following error appears in the logs, showing that the user was successfully created on the first click, and the subsequent user creation was prevented:

        2018-07-03 18:00:04,877 ERROR [http-nio-8090-exec-4] [confluence.user.actions.CreateUserAction] execute Failed to create user: user1
         -- referer: http://localhost:8090/admin/users/createuser.action | url: /admin/users/docreateuser.action | traceId: bd5aa4a33d93d50c | userName: admin | action: docreateuser
        com.atlassian.core.exception.InfrastructureException: com.atlassian.user.impl.DuplicateEntityException: User with name [user1] already exists in this repository (Embedded Crowd)
        ...
        Caused by: com.atlassian.user.impl.DuplicateEntityException: User with name [user1] already exists in this repository (Embedded Crowd)
        
      5. Attempt to list out users by going to <base_url>/admin/users/showallusers.action

      Expected Results

      Since duplicated users are not created, list of users should be displayed as expected

      Actual Results

      System Error page is returned:

      Cause
      java.lang.NullPointerException
          at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210)
      
      Stack Trace:[hide]
      java.lang.NullPointerException
      	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210)
      	at com.google.common.collect.ImmutableCollection$ArrayBasedBuilder.add(ImmutableCollection.java:339)
      	at com.google.common.collect.ImmutableList$Builder.add(ImmutableList.java:652)
      	at com.google.common.collect.ImmutableList$Builder.add(ImmutableList.java:630)
      	at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:282)
      	at com.google.common.collect.ImmutableCollection$ArrayBasedBuilder.addAll(ImmutableCollection.java:360)
      	at com.google.common.collect.ImmutableList$Builder.addAll(ImmutableList.java:665)
      	at com.atlassian.confluence.api.model.pagination.PageResponseImpl$Builder.addAll(PageResponseImpl.java:164)
      	at com.atlassian.confluence.api.model.pagination.PageResponseImpl.from(PageResponseImpl.java:80)
      	at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.executeBatch(PaginationServiceImpl.java:173)
      	at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.lambda$doRequestInTransaction$2(PaginationServiceImpl.java:157)
      	at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.lambda$executeInReadOnly$0(ReadOnlyAndReadWriteTransactionConversionTemplate.java:48)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
      	at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.executeInReadOnly(ReadOnlyAndReadWriteTransactionConversionTemplate.java:48)
      	at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doRequestInTransaction(PaginationServiceImpl.java:139)
      	at com.atlassian.confluence.api.impl.pagination.PaginationServiceImpl.doPaginationListRequest(PaginationServiceImpl.java:71)
      	at com.atlassian.confluence.internal.user.UserSearchServiceInternalImpl.doUserSearch(UserSearchServiceInternalImpl.java:70)
      	at com.atlassian.confluence.user.actions.AbstractSearchCrowdUsersAction.doUserSearch(AbstractSearchCrowdUsersAction.java:98)
      	at com.atlassian.confluence.user.actions.BrowseUsersAction.execute(BrowseUsersAction.java:9)
      

      Workaround

      Flush Cache by going to Confluence Admin > Cache Management > Flush All

      Notes

      After Flushing Cache, the issue will not be able to replicated again.
      The issue could be replicated again after the next restart

              971c305d4b2e Garvit Sharma
              mkhairuliana Monique Khairuliana (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated: