java.lang.NullPointerException error when querying users
Asked by Jay dong:

In Site management page,User-User list

When I enter part of the username in the text box, and Click search. It was wrong message come out:

### Cause {#toc-hId-1060433533}

java.lang.NullPointerException  
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210)

#### Stack Trace:\[hide\] {#toc-hId-1750995007}

```
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:191)	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:46)	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)	at com.atlassian.confluence.api.impl.ReadOnlyAndReadWriteTransactionConversionTemplate.executeInReadOnly(ReadOnlyAndReadWriteTransactionConversionTemplate.java:46)	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)
```


Answers:
author: Brant Schroeder
body: Sounds like something is corrupt. This should help you out <https://confluence.atlassian.com/confkb/confluence-triggers-npe-when-a-user-tries-to-open-view-all-users-802597745.html>

comments: author: Jay dong
body: hi,Brant.Thank you for your answer.

According to your prompt, I need to recreate the index.But I have 2000 users in use here.

If I perform index recreation, will it affect the index and use of my other users?

Are there any other risks?

I look forward to your reply. Thank you.


author: Brant Schroeder
body: Content indexes are built on the server to ensure quick response when using the application. The indexes are built from the database data. I would suggest rebuilding outside of work hours as it may cause application slowness.


author: Jay dong
body: Thank you very much for your reply.

In addition to slowing down the server, it will also affect my previous save De.

I am very worried because the creation of this index will affect the relationship between my other data, so I hesitate to move.


Tags: confluence-server

server