Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-88571

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

    Details

      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

      1. You can reproduce an error there if you try to import following LAR file Public_Pages-20181219111553888.lar
      2. 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 LPS-88570 is fixed, in case of error an exception will be also dumped to log file:
          Caused 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
          

      Steps to reproduce without LAR file
      If you want to regenerate LAR file, follow following steps:

      1. Go to Global Site => Content => Document Library => Document Types
      2. Export them to a LAR file
      3. Create a site called site1 and import LAR file there, verify that now you have document types from global and site1
      4. Go to Global Site => Content => Document Library => Document Types and delete all document types from this site
      5. Create a site called site2
      6. Add a page with a asset publisher
      7. Configure asset publisher with document asset + all document types of site1
      8. Export whole site2 to LAR file
      9. Delete site1 and site2
      10. Continue with the steps explained in Steps to reproduce with LAR file section

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peyton.zhao Peyton Zhao (Inactive)
                Reporter:
                jorge.diaz Jorge Diaz
                Participants of an Issue:
                Recent user:
                Joyce Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  43 weeks ago

                  Packages

                  Version Package
                  7.0.0 DXP FP71
                  7.0.10.11 DXP SP11
                  7.0.X
                  7.1.10 DXP FP7
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master