Foren

Liferay 6.1 GA1 LAR import/export

Sebastian Wikholm, geändert vor 12 Jahren.

Liferay 6.1 GA1 LAR import/export

Regular Member Beiträge: 104 Beitrittsdatum: 10.03.11 Neueste Beiträge
I have liferay 6.1 GA1 installed on a Windows Server 2008 R2 (64-bit) with jdk 1.6.0 30 64-bit(tested with 1.6.0 20 also) with mysql 5.5.20.

I have made a set of pages that i want to export to a LAR file and then import in another sites pages.

When doing this I get the error:

12:27:23,804 ERROR [ImportLayoutsAction:85] com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
	at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1379)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:166)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:102)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy26.importLayouts(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
	at $Proxy27.importLayouts(Unknown Source)
	at com.liferay.portal.service.impl.LayoutServiceImpl.importLayouts(LayoutServiceImpl.java:626)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
	at $Proxy28.importLayouts(Unknown Source)
	at com.liferay.portal.service.LayoutServiceUtil.importLayouts(LayoutServiceUtil.java:469)
	at com.liferay.portlet.layoutsadmin.action.ImportLayoutsAction.processAction(ImportLayoutsAction.java:69)
	at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:175)
	at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:190)
	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
	at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:651)
	at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:686)
	at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:361)
	at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:845)
	at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:633)
	at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:135)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
	at com.liferay.portal.lar.PortletImporter.checkPortletPreferences(PortletImporter.java:184)
	at com.liferay.portal.lar.PortletImporter.importPortletPreferences(PortletImporter.java:1092)
	at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:577)
	at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:140)
	at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1369)
	... 164 more


What can I do? dont want to create pages from scratch for every site I have

Any help would be appreciated
thumbnail
Hitoshi Ozawa, geändert vor 12 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Can't you just use site template and page templates?

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/page-creation-and-manageme-3
Sebastian Wikholm, geändert vor 12 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

Regular Member Beiträge: 104 Beitrittsdatum: 10.03.11 Neueste Beiträge
Hitoshi Ozawa:
Can't you just use site template and page templates?

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/page-creation-and-manageme-3



I would like to have sample content that would be on those templates, does that work?
Sebastian Wikholm, geändert vor 12 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

Regular Member Beiträge: 104 Beitrittsdatum: 10.03.11 Neueste Beiträge
Sebastian Wikholm:
Hitoshi Ozawa:
Can't you just use site template and page templates?

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/page-creation-and-manageme-3



I would like to have sample content that would be on those templates, does that work?



Ok fixed the problem with some help from generous individuals. The fix is the following:

https://github.com/liferay/liferay-portal/commit/9873689e0efad27ea09c311bc4bbd3b178ae5d81#portal-impl/src/com/liferay/portlet/asset/util/BaseAssetEntryValidator.java

changed that in the src version of ga1, built it and replace portal-impl.jar in \tomcat-7.0.23\webapps\ROOT\WEB-INF\lib and now this problem is gone as well as the messageboard problem i had
thumbnail
Orin Fink, geändert vor 12 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

Junior Member Beiträge: 65 Beitrittsdatum: 25.03.10 Neueste Beiträge
I too have tried to apply the patch to the file referenced in this post from git and have built the portal-impl.jar and have replaced the default one. Even still after doing this, i am getting the same error when trying to import a LAR file that has been exported from another instance. I have tried a multitue of variations. One note is that i have web content and Documents that are referenced from the Global scope. Is it possible that the assets from the global scope are the issue and that there may be another patch necessary?

For further clarification, in the catalina.out, i see that the first set of web content seems to be importing as it is outputing the appropriate information but then, after the last "local scope" article is imported, catalina throws the error. I should also note that the _next article in the database actually does seem to be a global scope article. I have already imported the global scope article though so it is in the new liferay instance.

Another interesting point however is that if i try to export the LAR with NO data and then try to import that LAR, i still get the same error so I doubt that it really has anything to do with the web content, there must be something wrong with the layouts themselves.

Hope this helps. And, i look forward to hearing any additional insight you may have gained while fixing this issue for your configuration.
Rhina Karr, geändert vor 11 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

Junior Member Beiträge: 86 Beitrittsdatum: 02.11.10 Neueste Beiträge
Hi Orin,

Are you able to fix the issue? I'm also facing exactly the same issue, but not able to find out what is the root cause of the error. There are some other sites also, which I could successfully export/import, but I'm getting this issue with some specific sites.

Thanks,
RK
thumbnail
Orin Fink, geändert vor 11 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

Junior Member Beiträge: 65 Beitrittsdatum: 25.03.10 Neueste Beiträge
Rinah,

Do you have any Page Templates in the portal from which you are trying to export/import? I don't recall for sure now (its been a while) but I think that it ended up being an issue with the fact that we had page templates involved in this operation as well.

I am now thinking that we ended up resolving this issue by "disconnecting" the page template from any pages that used it. Seems to me that for some reason, the page templates are not exported along with the LAR and thereby, when trying to re-import the LAR in the new portal, the operation failed because the new portal did not have the page template that was referenced. If you can confirm this is also what is happening in your case and that the resolution (hack) also works for you then we can review the JIRAs to see if there is a defect already in play for this situation.
Rhina Karr, geändert vor 11 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

Junior Member Beiträge: 86 Beitrittsdatum: 02.11.10 Neueste Beiträge
Hi Orin,

Thanks for your response. I am not using page template in my site. I am using simple blank site and created pages in it. I have this issue coming particularly in some sites. But I found one workaround to fix the issue. I think there is a bug in 6.1 already, whch says import fails when the site is configured with remote staging feature with public and privaet page revision options enabled. I disabled those options and export the lar, which was then successfully imported.

Thanks,
RK
thumbnail
Alaaeldin El-Nattar, geändert vor 11 Jahren.

RE: Liferay 6.1 GA1 LAR import/export

New Member Beiträge: 15 Beitrittsdatum: 09.03.07 Neueste Beiträge
Hello Sebastian,

There is a bug in PortletImporter.java :

Line 175 returns NULL and there is no checks for before the importedAssetCategoryPKs is used later on.

here's my fix for it, starting at line 175 and ending at line 202


String[] importedAssetCategoryPKs =
portletPreferences.getValues(queryValuesName, null);
String[] newAssetCategoryPKs = null;

if (importedAssetCategoryPKs != null) {
Map<Long, Long> assetCategoryPKs =
(Map<Long, Long>)portletDataContext.getNewPrimaryKeysMap(
AssetCategory.class);

newAssetCategoryPKs = new String[
importedAssetCategoryPKs.length];

int i = 0;

for (String importedAssetCategoryPK :
importedAssetCategoryPKs) {

String newAssetCategoryPK = StringUtil.valueOf(
assetCategoryPKs.get(
new Long(importedAssetCategoryPK)));

if (Validator.isNull(newAssetCategoryPK)) {
newAssetCategoryPK = importedAssetCategoryPK;
}

newAssetCategoryPKs[i++] = newAssetCategoryPK;
}
}

Regards,
Vagif Jalilov from Rivet Logic Corporation