Performing Data Pipeline export results in a NullPointerException in User Export
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
Attempting a Data Pipeline Export in Confluence Data Center failed. Navigating to the Data pipeline page, we could also see that the job had failed.

Diagnosis
The following error logged in the atlassian-confluence.log:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2022-09-12 17:00:38,215 ERROR [data-pipeline-export-executor-0] [insights.core.service.DefaultDataExportOrchestrator] lambda$null$5 Failed writing entities to file - processId: 25
java.lang.NullPointerException
at com.atlassian.business.insights.confluence.extract.UserToLogRecordConverter.convert(UserToLogRecordConverter.java:37)
at com.atlassian.business.insights.confluence.extract.UserLogRecordStreamer.toLogRecord(UserLogRecordStreamer.java:56)
...
at com.atlassian.business.insights.confluence.prefetch.EntityPrefetchProvider.lambda$fetchPages$3(EntityPrefetchProvider.java:115)
...
at com.atlassian.business.insights.confluence.prefetch.EntityPrefetchProvider.fetchPages(EntityPrefetchProvider.java:107)
at com.atlassian.business.insights.confluence.prefetch.EntityPrefetchProvider.lambda$null$0(EntityPrefetchProvider.java:71)
at com.atlassian.business.insights.core.extract.EntityPageIterator.computeNext(EntityPageIterator.java:33)
at com.atlassian.business.insights.core.extract.EntityPageIterator.computeNext(EntityPageIterator.java:13)
...
at com.atlassian.business.insights.core.service.DefaultDataExportOrchestrator.lambda$null$5(DefaultDataExportOrchestrator.java:176)
at com.atlassian.business.insights.confluence.spi.ConfluenceRequestContext.runInCustomContext(ConfluenceRequestContext.java:21)
...
at com.atlassian.business.insights.core.service.DefaultDataExportOrchestrator.lambda$runFullExport$6(DefaultDataExportOrchestrator.java:146)
From the stack trace above, we can see that we hit a NullPointerException when trying to retrieve the User details (com.atlassian.business.insights.confluence.extract.UserToLogRecordConverter.convert()). In this case, Confluence was querying CONTENT table in particular - hence we could then use the SQL query below to find the offending record(s).
1
2
3
SELECT COUNT (*) FROM CONTENT
WHERE CONTENTTYPE = 'USERINFO'
AND USERNAME IS NULL;
If the query returns a value greater than 0, you are likely impacted by this issue.
Cause
There is a NULL username value in the CONTENT table. This should not happen as each USERINFO record in the CONTENT table should have a username assigned/allocated to it.
Solution
Perform a full database backup
Stop Confluence
Run the following SQL
1 2 3
DELETE FROM CONTENT WHERE CONTENTTYPE = 'USERINFO' AND USERNAME IS NULL;
Restart Confluence
Re-attempt the Data Pipeline Export
Test First
⚠️ As with all recommendations made by Atlassian Support, please follow best practices for Change Management and *test and validate* these settings in a Test or Development environment *prior to* deploying any changes to a Production environment. This allows for the validation of these changes while minimizing the risk and impact to end users.
If a Test environment isn't available, then perform this test during a maintenance window or after hours.
Additional Information
The following suggestion has been created related to this issue. New features are implemented following the Atlassian Implementation of New Features Policy.
Was this helpful?