Importing Crowd XML Backup Fails due to Different Locale
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
Symptoms
The following error appears in log when importing a Crowd XML backup:
1
2
3
4
ERROR [atlassian.crowd.migration.DirectoryMapper] Failed to parse date: Wed May 14 18:03:35 +0200 2008
java.text.ParseException: Unparseable date: "Wed May 14 18:03:35 +0200 2008"
at java.text.DateFormat.parse(DateFormat.java:335)
at com.atlassian.crowd.migration.GenericMapper.getDateFromFormattedString(GenericMapper.java:99)
1
2
3
4
5
6
7
8
9
org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value: com.atlassian.crowd.model.directory.DirectoryImpl.createdDate; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.crowd.model.directory.DirectoryImpl.createdDate
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:665)
.
.
.
Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.crowd.model.directory.DirectoryImpl.createdDate
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:101)
Cause
The JVM locale used to create the date-time data for the XML backup file is different from the one defined in the JVM used to receive the data (where the new Crowd installation is running).
Resolution
Follow these steps to check the previous machine's locale and then set it correctly for the new server's JVM:
Identify what format/language is being used for the data-time data in the backup file. In the example above, the locale is obviously English/American. Sometimes, running command
locale
on the server where the backup was performed can help.Set the JAVA_OPTS variable in Crowd server, with the new language and country from step (1). For example:
1
export JAVA_OPTS="-Duser.language=en -Duser.country=US"
Was this helpful?