Foren

6.2 Importing a LAR file breaks the site

Thomas Kellerer, geändert vor 10 Jahren.

6.2 Importing a LAR file breaks the site

Expert Beiträge: 490 Beitrittsdatum: 09.06.08 Neueste Beiträge
Hello,

we are trying to "replicate" content from a test-server to a local installation for development purposes.

There are several obstacles when doing this and in the end the local installation is broken.

The first road block we hit was that the import completely fails if the source and target are not using the same default language.

After we discovered that, we could import the LAR file from the source system successfully.

We used the following settings to import the LAR file:

Pages
-> enabled Delete Missing pages, Site Pages Settings, Theme Settings and Logo

Application Configuration
-> All Applications, Setup (disabled: Archived Setups and User Preferences)

Content
-> All Content and enabled "Delete portlet data before importing"

Update Data
-> Mirror with overwriting

Authorship
-> Use current author


however after that the import "dialog" is broken and no further imports can be done, because the page is empty. In the background the following exception is thrown:

10:36:24,193 ERROR [http-bio-8080-exec-4][IncludeTag:129] Current URL /group/control_panel/manage?p_p_auth=gUiK7NwH&p_p_id=156&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&doAsGroupId=10184&refererPlid=11514&controlPanelCategory=current_site.conten
t&_156_rootNodeName=%C3%96ffentliche+Seiten&_156_groupId=10184&_156_cmd=validate&_156_struts_action=%2Fgroup_pages%2Fimport_layouts&_156_liveGroupId=10184&_156_privateLayout=false generates exception: com.liferay.portlet.documentlibrary.DuplicateFold
erNameException: 10436
com.liferay.portlet.documentlibrary.DuplicateFolderNameException: 10436
        at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.validateFolder(DLFolderLocalServiceImpl.java:1188)
        at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.validateFolder(DLFolderLocalServiceImpl.java:1198)



So I thought that if there is a duplicate folder, I can "fix" this by simply deleting all the content from my local installation in order to re-sync it with our test installation.

So I went into the Control Panel, deleted everything from the WebContent (including structures and templates) went into "Manage Pages" and deleted all pages. (I added one new dummy page in order to be able to delete all the pages that were imported, because at least one page must be present.

Interesting enough when accessing the document library (which shouldn't contain anything), I get the following exception in the background:

11:19:16,526 ERROR [http-bio-8080-exec-2][IncludeTag:129] Current URL /group/control_panel/manage?p_p_auth=cdnXHI5R&p_p_id=20&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10204&refererPlid=12197&controlPanelCategory=current_site.page
s generates exception: An exception occurred processing JSP page /html/portlet/document_library/view_entries.jsp at line 490____487:                                    <%__488:                                        String folderImage = "folder_empty
_document";__489: __490:                                        if (DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcutsCount(curFolder.getRepositoryId(), curFolder.getFolderId(), status, true) > 0) {__491:
folderImage = "folder_full_document";__492:                                     }__493: ______Stacktrace: [Sanitized]
com.liferay.portal.NoSuchRepositoryEntryException: No RepositoryEntry exists with the primary key 11461
        at com.liferay.portal.service.persistence.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2678)
        at com.liferay.portal.service.persistence.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2696)
        at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.createRepositoryImpl(RepositoryLocalServiceImpl.java:418)
        at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.getLocalRepositoryImpl(RepositoryLocalServiceImpl.java:275)


Then I went into the recyclebin and emptied that. So theoretically there shouldn't b

Still no dice with the import dialog. When I look into the Data folder, there are still a lot of files in the document_library directory (including some files that are no longer visible in the UI). Then I did a "re-index" all from the server administration panel

Went back to the "manage pages", click on "Import" still an empty page, and still the DuplicateFolderNameException in the background.

What am I missing here? How can I reliably replicate content from one instance to another without wrecking the target installation?

Regards
Thomas
Thomas Kellerer, geändert vor 10 Jahren.

RE: 6.2 Importing a LAR file breaks the site

Expert Beiträge: 490 Beitrittsdatum: 09.06.08 Neueste Beiträge
Update:

right after the import, accessing the Document library is no longer possible. Inside Liferay it looks as if there are no documents at all (although there are!) and in the console the following exception is thrown:

14:52:46,356 ERROR [http-bio-8080-exec-5][IncludeTag:129] Current URL /group/control_panel/manage?p_p_auth=Jf5DN2la&p_p_id=20&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10184&refererPlid=12539&controlPanelCategory=current_site.cont
ent generates exception: com.liferay.portal.NoSuchRepositoryEntryException: No RepositoryEntry exists with the primary key 10709
com.liferay.portal.NoSuchRepositoryEntryException: No RepositoryEntry exists with the primary key 10709
        at com.liferay.portal.service.persistence.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2678)
        at com.liferay.portal.service.persistence.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2696)
        at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.createRepositoryImpl(RepositoryLocalServiceImpl.java:418)
        at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.getLocalRepositoryImpl(RepositoryLocalServiceImpl.java:275)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
        at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
        at com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl.getFolderLocalRepository(DLAppLocalServiceImpl.java:1384)
        at com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl.getFolder(DLAppLocalServiceImpl.java:654)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
        at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
        at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
        at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
        at com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil.getFolder(DLAppLocalServiceUtil.java:495)
        at com.liferay.portlet.documentlibrary.service.permission.DLFolderPermission.contains(DLFolderPermission.java:142)
        at com.liferay.portlet.documentlibrary.service.permission.DLFolderPermission.check(DLFolderPermission.java:61)
        at com.liferay.portal.service.impl.RepositoryServiceImpl.checkRepository(RepositoryServiceImpl.java:71)
(It's a different ID than the other exception probably because it's a new install, I'm still desperately trying to get this to work...)
D B, geändert vor 10 Jahren.

RE: 6.2 Importing a LAR file breaks the site

New Member Beitrag: 1 Beitrittsdatum: 18.03.14 Neueste Beiträge
Hi Thomas,

I am, too, experiencing the same problem; did you find a solution for it?

Thanks
Oliver Bayer, geändert vor 10 Jahren.

RE: 6.2 Importing a LAR file breaks the site

Liferay Master Beiträge: 894 Beitrittsdatum: 18.02.09 Neueste Beiträge
Hi Thomas,

I don't have a solution for your lar file import issue but this has always been a little bit tricky looking at jira emoticon. To setup the development pc I would use database dumps and copy the document_library folder. It's easier and more reliable.

HTH Oli
Sven Tissot, geändert vor 6 Jahren.

RE: 6.2 Importing a LAR file breaks the site

New Member Beitrag: 1 Beitrittsdatum: 21.03.16 Neueste Beiträge
3 years later ... and we stumble over the exactly same error (DuplicateFolderNameException: 10436)

Database Dump is no option - Does anyone have a solution?

best regards
Sven
thumbnail
Jorge Díaz, geändert vor 6 Jahren.

RE: 6.2 Importing a LAR file breaks the site

Liferay Master Beiträge: 753 Beitrittsdatum: 09.01.14 Neueste Beiträge
Hi Sven,

Which Liferay version are you using?

A lot of duplicated name exception during LAR export import were fixed in Liferay 6.2 GA6 and Liferay 7, see:
LPS-53819, LPS-58631, LPS-58632, LPS-58650, LPS-68456 and LPS-53801

So my advice is to upgrade to Liferay 6.2 GA6 or Liferay 7.0 GA4

If you are already using that versions, Can you paste your full stacktrace?

Regards,
Jorge Díaz