Legacy Knowledge Base
Published Jun. 30, 2025

NullPointerException/PortletDataException reported when importing lar file

Written By

Emma Liu

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • NullPointerException/PortletDataException was reported when importing lar file. The issue can only be reproduced in certain environments with older JDK versions.
15:45:15,910 ERROR [BackgroundTaskMessageListener:182] Unable to execute background task
com.liferay.exportimport.kernel.lar.PortletDataException: Failed calling method_---- Debugging information ----_message : Failed calling method_cause-exception : java.lang.NullPointerException_cause-message : null_method : com.liferay.portal.kernel.util.UnicodeProperties.readObject()_class : com.liferay.portal.kernel.util.UnicodeProperties_required-type : com.liferay.portal.kernel.util.UnicodeProperties_converter-type : com.thoughtworks.xstream.converters.reflection.SerializableConverter_path : /StagedLayoutSet/_layoutSet/_settingsProperties/map_line number : 48_class[1] : com.liferay.portal.model.impl.LayoutSetImpl_required-type[1] : com.liferay.portal.model.impl.LayoutSetImpl_converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter_class[2] : com.liferay.layout.internal.model.adapter.StagedLayoutSetImpl_required-type[2] : com.liferay.layout.internal.model.adapter.StagedLayoutSetImpl_version : 1.4.16_------------------------------- [Sanitized]
at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:437)
at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:453)
at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:439)
at com.liferay.exportimport.internal.controller.LayoutImportController.doImportFile(LayoutImportController.java:592)
at com.liferay.exportimport.internal.controller.LayoutImportController.importFile(LayoutImportController.java:221)
at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:211)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
at com.sun.proxy.$Proxy354.importLayouts(Unknown Source)
at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:122)
at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:133)
at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:119)
at com.liferay.portal.spring.transaction.BaseTransactionExecutor.execute(BaseTransactionExecutor.java:37)
at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:85)
at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:41)
at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72)
at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:136)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:753)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:665)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.thoughtworks.xstream.converters.ConversionException: Failed calling method_---- Debugging information ----_message : Failed calling method_cause-exception : java.lang.NullPointerException_cause-message : null_method : com.liferay.portal.kernel.util.UnicodeProperties.readObject()_class : com.liferay.portal.kernel.util.UnicodeProperties_required-type : com.liferay.portal.kernel.util.UnicodeProperties_converter-type : com.thoughtworks.xstream.converters.reflection.SerializableConverter_path : /StagedLayoutSet/_layoutSet/_settingsProperties/map_line number : 48_class[1] : com.liferay.portal.model.impl.LayoutSetImpl_required-type[1] : com.liferay.portal.model.impl.LayoutSetImpl_converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter_class[2] : com.liferay.layout.internal.model.adapter.StagedLayoutSetImpl_required-type[2] : com.liferay.layout.internal.model.adapter.StagedLayoutSetImpl_version : 1.4.16_------------------------------- [Sanitized]
at com.thoughtworks.xstream.core.util.SerializationMembers.callReadObject(SerializationMembers.java:136)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doUnmarshal(SerializableConverter.java:443)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1429)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1409)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1294)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1285)
at com.liferay.exportimport.internal.lar.PortletDataContextImpl.fromXML(PortletDataContextImpl.java:713)
at com.liferay.exportimport.internal.lar.PortletDataContextImpl.lambda$getZipEntryAsObject$1(PortletDataContextImpl.java:1467)
at java.util.HashMap.computeIfAbsent(HashMap.java:1127)
at com.liferay.exportimport.internal.lar.PortletDataContextImpl.getZipEntryAsObject(PortletDataContextImpl.java:1466)
at com.liferay.exportimport.internal.lar.PortletDataContextImpl.getZipEntryAsObject(PortletDataContextImpl.java:1447)
at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil._getStagedModel(StagedModelDataHandlerUtil.java:675)
at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:437)
at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:344)
at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:78)
at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:396)
... 31 more
Caused by: java.lang.NullPointerException
at java.io.ObjectInputStream.filterCheck(ObjectInputStream.java:1246)
at java.io.ObjectInputStream.checkArray(ObjectInputStream.java:1288)
at java.io.ObjectInputStream.access$200(ObjectInputStream.java:212)
at java.io.ObjectInputStream$1.checkArray(ObjectInputStream.java:260)
at java.util.HashMap.readObject(HashMap.java:1399)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.thoughtworks.xstream.core.util.SerializationMembers.callReadObject(SerializationMembers.java:132)
... 65 more

Environment

  • Liferay DXP 7.2 + Java8u180 (or lower versions)

Resolution

  • This is a known JDK issue JDK-8203368. Update the JDK version to JDK8u181 or later versions to resolve the error.

 

Did this article resolve your issue ?

Legacy Knowledge Base