Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.0 DXP FP58, 7.0.X, 7.1.X, Master
-
7.1.x, 7.0.x
-
Committed
-
3
-
Regression Bug
Description
Error message "An unexpected error occured within com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl" is displayed in case of importing a LAR with missing references of preloaded entries
Steps to reproduce with LAR file
- You can reproduce an error there if you try to import following LAR file Public_Pages-20181219111553888.lar
- In user interface, following error is displayed:
- Expected behavior: A missing reference error is displayed
- Wrong behavior: A generic error is displayed:
The file Public_Pages-20181219111553888.lar cannot be imported.
An unexpected error occured within com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl. - Note: If
is fixed, in case of error an exception will be also dumped to log file:LPS-88570Caused by: java.lang.NullPointerException at com.liferay.document.library.internal.exportimport.data.handler.DLFileEntryTypeStagedModelDataHandler.fetchExistingFileEntryTypeWithParentGroups(DLFileEntryTypeStagedModelDataHandler.java:394) at com.liferay.document.library.internal.exportimport.data.handler.DLFileEntryTypeStagedModelDataHandler.validateReference(DLFileEntryTypeStagedModelDataHandler.java:162) at com.liferay.exportimport.internal.lar.ExportImportHelperImpl.validateMissingReference(ExportImportHelperImpl.java:1770) at com.liferay.exportimport.internal.lar.ExportImportHelperImpl$1.processElement(ExportImportHelperImpl.java:1376) at com.liferay.portal.kernel.xml.ElementHandler.endElement(ElementHandler.java:53) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at com.liferay.portal.security.xml.StripDoctypeXMLReader.parse(StripDoctypeXMLReader.java:136) at com.liferay.exportimport.internal.lar.ExportImportHelperImpl.validateMissingReferences(ExportImportHelperImpl.java:1388) at com.liferay.exportimport.internal.controller.LayoutImportController.validateFile(LayoutImportController.java:283) at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.validateImportLayoutsFile(ExportImportLocalServiceImpl.java:632) ... 202 more
- Expected behavior: A missing reference error is displayed
Steps to reproduce without LAR file
If you want to regenerate LAR file, follow following steps:
- Go to Global Site => Content => Document Library => Document Types
- Export them to a LAR file
- Create a site called site1 and import LAR file there, verify that now you have document types from global and site1
- Go to Global Site => Content => Document Library => Document Types and delete all document types from this site
- Create a site called site2
- Add a page with a asset publisher
- Configure asset publisher with document asset + all document types of site1
- Export whole site2 to LAR file
- Delete site1 and site2
- Continue with the steps explained in Steps to reproduce with LAR file section