Posts Tagged ‘Liferay’

Liferay StructureNameException when importing Lar file

Friday, November 2nd, 2018

Note: I’m no Liferay expert, in fact I’ve only been using it for a few days on a customers legacy system (Liferay 6.1.1) so YMMV.

The Problem

I was trying to import a “LAR” file (a compressed archive like a JAR which holds exported data/pages from a [different] Liferay instance). Problem was every time I tried the import I got a:

StructureNameException

This appears to have been caused by the fact that the exported files contained in the LAR were referring to locales that the importing server was not set-up to use:

<root available-locales="en_US,en_GB" default-locale="en_US">

(in this case my server was only set up to use en_US)

The Solution

In portal-ext.properties edit the following property to add the “missing” locales:

locales=en_US,en_GB

Tags:
Posted in Misc | No Comments »