フォーラム

ホーム » Liferay Portal » English » 2. Using Liferay » General

構造的に表示 平面上に表示 ツリー上に表示
スレッド数 [ 前へ | 次へ ]
toggle
Bogoy Hafner
Liferay 6.11 failure on Import of JournalStructures
2012/11/15 7:47
答え

Bogoy Hafner

ランク: New Member

投稿数: 5

参加年月日: 2012/11/15

最近の投稿

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
2012/11/15 7:52
答え

Gabriel Leon Leyva

ランク: Regular Member

投稿数: 199

参加年月日: 2009/06/20

最近の投稿

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
2012/11/15 23:46
答え

Bogoy Hafner

ランク: New Member

投稿数: 5

参加年月日: 2012/11/15

最近の投稿

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
2012/11/16 1:23
答え

Bogoy Hafner

ランク: New Member

投稿数: 5

参加年月日: 2012/11/15

最近の投稿

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
2012/11/21 2:14
答え

Bogoy Hafner

ランク: New Member

投稿数: 5

参加年月日: 2012/11/15

最近の投稿

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