Can't Create XML backup due to NULL user attribute value

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

Schedule backup and Manual backup fails to create Crowd XML backup.

 

  • Manual backup failed with the following errors shown in the Crowd UI

 

  • Schedule backup failed with the following errors appears in the atlassian-crowd.log 
2015-08-25 02:00:00,003 scheduler_Worker-2 INFO [crowd.manager.backup.BackupJobRunner] Starting scheduled backup to file atlassian-crowd-2015-08-25-020000-automated-backup-2.8.3.xml...
2015-08-25 02:00:00,377 scheduler_Worker-10 INFO [manager.token.reaper.UserTokenReaper] No expired user tokens were found
2015-08-25 02:01:02,914 scheduler_Worker-2 ERROR [atlassian.scheduler.core.JobLauncher] Scheduled job with ID 'AutomatedBackup' failed
java.lang.IllegalArgumentException: Adding text to an XML document must not be null
        at org.dom4j.DocumentFactory.createText(DocumentFactory.java:174)
        at org.dom4j.tree.AbstractElement.addText(AbstractElement.java:899)
        at com.atlassian.crowd.migration.UserMapper.addUserAttributesToXml(UserMapper.java:135)
        at com.atlassian.crowd.migration.UserMapper.addUserToXml(UserMapper.java:113)
        at com.atlassian.crowd.migration.UserMapper.exportXml(UserMapper.java:81)
        at com.atlassian.crowd.migration.XmlMigrator.exportXml(XmlMigrator.java:36)
        at com.atlassian.crowd.migration.XmlMigrationManagerImpl.exportXml(XmlMigrationManagerImpl.java:106)
        at com.atlassian.crowd.manager.backup.DefaultBackupManager.backup(DefaultBackupManager.java:73)
        at sun.reflect.GeneratedMethodAccessor958.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.sun.proxy.$Proxy56.backup(Unknown Source)
        at com.atlassian.crowd.manager.backup.BackupJobRunner.runJob(BackupJobRunner.java:37)
        at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135)
        at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)
        at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)
        at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

Cause

There are NULL user attributes values for your Crowd users in Crowd database.

Workaround

  • Run the following query in the Crowd Database to identify the exact directories causing the issue:

    SELECT * FROM cwd_user_attribute WHERE attribute_value = '' OR attribute_value IS NULL;
  • Navigate to those directories in Crowd >> Users >> Attributes, ensure that each of the attributes indeed has a value and save the changes you've made by clicking Update
  • Re-attempt the XML export again
Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.