Combination View Flat View Tree View
Threads [ Previous | Next ]
Sebastian Wikholm
Liferay 6.1 GA1 LAR import/export
February 23, 2012 2:32 AM
Answer

Sebastian Wikholm

Rank: Junior Member

Posts: 63

Join Date: March 10, 2011

Recent Posts

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:

  112:27:23,804 ERROR [ImportLayoutsAction:85] com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
  2com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
  3    at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1379)
  4    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  5    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  6    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  7    at java.lang.reflect.Method.invoke(Method.java:597)
  8    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320)
  9    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
 10    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
 11    at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:166)
 12    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 13    at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:102)
 14    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 15    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
 16    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 17    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
 18    at $Proxy26.importLayouts(Unknown Source)
 19    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 20    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 21    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 22    at java.lang.reflect.Method.invoke(Method.java:597)
 23    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
 24    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
 25    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
 26    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
 27    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
 28    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
 29    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
 30    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
 31    at $Proxy27.importLayouts(Unknown Source)
 32    at com.liferay.portal.service.impl.LayoutServiceImpl.importLayouts(LayoutServiceImpl.java:626)
 33    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 34    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 35    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 36    at java.lang.reflect.Method.invoke(Method.java:597)
 37    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
 38    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
 39    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
 40    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
 41    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
 42    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
 43    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
 44    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
 45    at $Proxy28.importLayouts(Unknown Source)
 46    at com.liferay.portal.service.LayoutServiceUtil.importLayouts(LayoutServiceUtil.java:469)
 47    at com.liferay.portlet.layoutsadmin.action.ImportLayoutsAction.processAction(ImportLayoutsAction.java:69)
 48    at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:175)
 49    at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:190)
 50    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
 51    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
 52    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:651)
 53    at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:686)
 54    at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:361)
 55    at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:845)
 56    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:633)
 57    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
 58    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
 59    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
 60    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
 61    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 62    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 63    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 64    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
 65    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
 66    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 67    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 68    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 69    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 70    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 71    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 72    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 73    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
 74    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 75    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 76    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 77    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 78    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
 79    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 80    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 81    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 82    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
 83    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 84    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 85    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 86    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 87    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 88    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
 89    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:135)
 90    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 91    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 92    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 93    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 94    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 95    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
 96    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 97    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 98    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 99    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
100    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
101    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
102    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
103    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
104    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
105    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
106    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
107    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
108    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
109    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
110    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
111    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
112    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
113    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
114    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
115    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
116    at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
117    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
118    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
119    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
120    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
121    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
122    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
123    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
124    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
125    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
126    at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
127    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
128    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
129    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
130    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
131    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
132    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
133    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
134    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
135    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
136    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
137    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
138    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
139    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
140    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
141    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
142    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
143    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
144    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
145    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
146    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
147    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
148    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
149    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
150    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
151    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
152    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
153    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
154    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
155    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
156    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
157    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
158    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
159    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
160    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
161    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
162    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
163    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
164    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
165    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
166    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
167    at java.lang.Thread.run(Thread.java:662)
168Caused by: java.lang.NullPointerException
169    at com.liferay.portal.lar.PortletImporter.checkPortletPreferences(PortletImporter.java:184)
170    at com.liferay.portal.lar.PortletImporter.importPortletPreferences(PortletImporter.java:1092)
171    at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:577)
172    at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:140)
173    at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1369)
174    ... 164 more


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

Any help would be appreciated
Hitoshi Ozawa
RE: Liferay 6.1 GA1 LAR import/export
February 23, 2012 3:39 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

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
RE: Liferay 6.1 GA1 LAR import/export
February 23, 2012 5:33 AM
Answer

Sebastian Wikholm

Rank: Junior Member

Posts: 63

Join Date: March 10, 2011

Recent Posts

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
RE: Liferay 6.1 GA1 LAR import/export
February 29, 2012 3:02 AM
Answer

Sebastian Wikholm

Rank: Junior Member

Posts: 63

Join Date: March 10, 2011

Recent Posts

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
Orin Fink
RE: Liferay 6.1 GA1 LAR import/export
March 15, 2012 9:38 AM
Answer

Orin Fink

Rank: Junior Member

Posts: 42

Join Date: March 24, 2010

Recent Posts

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
RE: Liferay 6.1 GA1 LAR import/export
June 29, 2012 10:47 AM
Answer

Rhina Karr

Rank: Junior Member

Posts: 79

Join Date: November 1, 2010

Recent Posts

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
Orin Fink
RE: Liferay 6.1 GA1 LAR import/export
June 29, 2012 11:01 AM
Answer

Orin Fink

Rank: Junior Member

Posts: 42

Join Date: March 24, 2010

Recent Posts

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
RE: Liferay 6.1 GA1 LAR import/export
July 3, 2012 6:55 AM
Answer

Rhina Karr

Rank: Junior Member

Posts: 79

Join Date: November 1, 2010

Recent Posts

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
Alaaeldin El-Nattar
RE: Liferay 6.1 GA1 LAR import/export
September 11, 2012 8:02 AM
Answer

Alaaeldin El-Nattar

Rank: New Member

Posts: 14

Join Date: March 9, 2007

Recent Posts

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