Fórum

Liferay 6.11 failure on Import of JournalStructures

Bogoy Hafner, modificado 11 Anos atrás.

Liferay 6.11 failure on Import of JournalStructures

New Member Postagens: 6 Data de Entrada: 15/11/12 Postagens Recentes
Hello - I've searched the forums (and google) but could not find this issue.

We are trying to migrate from Liferay 6.05 to Liferay 6.11 - for this we have set up a clone environment of the 6.05 state, and exported/imported the needed community.
We then removed the Liferay 6.05 and replaced it with 6.11, to let the upgrade process do its work (which worked, after removing some dead pictures which could no longer be found).

To have a clean slate we then set up a clean Liferay 6.11 (on Tomcat 7), and exported the community from the upgraded 6.11 installation.

Now the import on the final platform fails during the import of the journal structures:

[indent]2012.11.14 14:51:50 UTC ERROR [ImportLayoutsAction:92] com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portlet.journal.NoSuchStructureException: No JournalStructure exists with the key {uuid=89141676-cb46-423c-b7c4-473bfbbb457e, groupId=10527}
com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portlet.journal.NoSuchStructureException: No JournalStructure exists with the key {uuid=89141676-cb46-423c-b7c4-473bfbbb457e, groupId=10527}
at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:82)
at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:1056)
at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:996)
at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:728)
at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:147)
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1382)
....
....

[/indent]


Upon debugging with attached Liferay 6.11 code it seems it fails to retrieve the parent structure from the xml in the lar.

From portal-impl:
com.liferay.portlet.journal.lar.JournalPortletDataHandler.java:1077:

Element parentStructureElement = (Element)rootElement.selectSingleNode("./structures/structure[@structure-id='" + parentStructureId +"']");

According to this xpath argument, its looking for the structure-id attribute of the structure tag... which does not exist in the export lar (and not in the export lar from 6.05 either):
[indent]<structures>
<structure parent-structure-uuid="89141676-cb46-423c-b7c4-473bfbbb457e" path="/groups/10335/portlets/15/structures/e9336886-3bfe-48c8-b47e-70ebbe5870e8.xml"/>
<structure path="/groups/10335/portlets/15/structures/89141676-cb46-423c-b7c4-473bfbbb457e.xml"/>
<structure path="/groups/10335/portlets/15/structures/6c3885a1-68b6-4c04-84f5-d6f7b80d42d8.xml"/>
</structures>
[/indent]
When I use the debugger to change the value for the parentStructureElement by using the "path" attribute, the parent is indeed found.

If I take an empty liferay 6.11 installation, create a community, add 2 structures to it (one being the parent), and export it, the xml in the lar ( groups\<communityId>\portlets\15\<communityId>\portlet-data.xml ) also does not contain the structure-id attributes.
Can possibly be recreated that way.

Can this be a bug, or are we missing something? I'm not a Liferay expert so thats entirely possibly.

It seems this code is new for Liferay 6.11. (6.05 and 6.06 have entirely different code in that class)
thumbnail
Gabriel Leon Leyva, modificado 11 Anos atrás.

RE: Liferay 6.11 failure on Import of JournalStructures

Regular Member Postagens: 243 Data de Entrada: 20/06/09 Postagens Recentes
I had the same problem and I've been told in this forum that we can not export/import between different versions.
Bogoy Hafner, modificado 11 Anos atrás.

RE: Liferay 6.11 failure on Import of JournalStructures

New Member Postagens: 6 Data de Entrada: 15/11/12 Postagens Recentes
Its not between different versions... I did the upgrade process on the 6.05 data and exported a 6.11 version into a 6.11 environment... emoticon
Bogoy Hafner, modificado 11 Anos atrás.

RE: Liferay 6.11 failure on Import of JournalStructures

New Member Postagens: 6 Data de Entrada: 15/11/12 Postagens Recentes
Bogoy Hafner:
f I take an empty liferay 6.11 installation, create a community, add 2 structures to it (one being the parent), and export it, the xml in the lar ( groups\<communityId>\portlets\15\<communityId>\portlet-data.xml ) also does not contain the structure-id attributes.
Can possibly be recreated that way.


I just did this:
- 6.11 installation (backed up)
- create community
- create structure
- create structure having the first structure as a parent
- export
- restore installation
- import

The result is the same error I am having.
Bogoy Hafner, modificado 11 Anos atrás.

RE: Liferay 6.11 failure on Import of JournalStructures

New Member Postagens: 6 Data de Entrada: 15/11/12 Postagens Recentes
Could someone possibly test the above, so I can decide if this is worth reporting as a bug? emoticon

Import Data Strategy is "copy as new".
thumbnail
Manish Kumar Jaiswal, modificado 10 Anos atrás.

RE: Liferay 6.11 failure on Import of JournalStructures

Regular Member Postagens: 153 Data de Entrada: 25/11/08 Postagens Recentes
Hi ,

Is there some bug raised for this . Is there a patch for this ?

Regards
Manish
Bogoy Hafner, modificado 10 Anos atrás.

RE: Liferay 6.11 failure on Import of JournalStructures

New Member Postagens: 6 Data de Entrada: 15/11/12 Postagens Recentes
I have not been keeping tabs on this as there where multiple issues which prevented a migration strategy for us (and I have since been working on a different project).
In the end we decided to manually recreate our data and structures in an empty new liferay version, changing some of the structures to work around this issue.

I had not filed this as a bug, as no-one had tried to recreate the issue as I had described - but I'm pretty sure it is (or at least was) one.