Importing Crowd XML Backup Fails due to Different Locale

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following error appears in log when importing a Crowd XML backup:

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)
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:

  1. 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.
  2. Set the JAVA_OPTS variable in Crowd server, with the new language and country from step (1). For example:

    export JAVA_OPTS="-Duser.language=en -Duser.country=US"
    
Last modified on Aug 15, 2014

Was this helpful?

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