Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
Bogoy Hafner
Liferay 6.11 failure on Import of JournalStructures
November 15, 2012 7:47 AM
Answer

Bogoy Hafner

Rank: New Member

Posts: 6

Join Date: November 15, 2012

Recent Posts

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:

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




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

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)
Gabriel Leon Leyva
RE: Liferay 6.11 failure on Import of JournalStructures
November 15, 2012 7:52 AM
Answer

Gabriel Leon Leyva

Rank: Regular Member

Posts: 241

Join Date: June 20, 2009

Recent Posts

I had the same problem and I've been told in this forum that we can not export/import between different versions.
Bogoy Hafner
RE: Liferay 6.11 failure on Import of JournalStructures
November 15, 2012 11:46 PM
Answer

Bogoy Hafner

Rank: New Member

Posts: 6

Join Date: November 15, 2012

Recent Posts

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
RE: Liferay 6.11 failure on Import of JournalStructures
November 16, 2012 1:23 AM
Answer

Bogoy Hafner

Rank: New Member

Posts: 6

Join Date: November 15, 2012

Recent Posts

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
RE: Liferay 6.11 failure on Import of JournalStructures
November 21, 2012 2:14 AM
Answer

Bogoy Hafner

Rank: New Member

Posts: 6

Join Date: November 15, 2012

Recent Posts

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".
Manish Kumar Jaiswal
RE: Liferay 6.11 failure on Import of JournalStructures
June 27, 2013 5:59 AM
Answer

Manish Kumar Jaiswal

Rank: Regular Member

Posts: 133

Join Date: November 25, 2008

Recent Posts

Hi ,

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

Regards
Manish
Bogoy Hafner
RE: Liferay 6.11 failure on Import of JournalStructures
August 27, 2013 1:30 AM
Answer

Bogoy Hafner

Rank: New Member

Posts: 6

Join Date: November 15, 2012

Recent Posts

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.