Forums de discussion

ClassCastException while remote publishing a Localized-text CustomField

thumbnail
Samujjwal Sahu, modifié il y a 7 années.

ClassCastException while remote publishing a Localized-text CustomField

Junior Member Publications: 31 Date d'inscription: 22/05/12 Publications récentes
Hi,
We have a Staging -Live setup. We have been doing successful remote publishing for quite some time now.
For a new requirement we have created a new Page Level 'localized-text' type custom field. Apart from this we have several other type custom field. We have created this custom field on Live portal as well.

I have set certain value for 3 languages for this custom field and saved page settings. Now I want to remote publish these values to the Live portal. But on doing so it gives me the below exception:

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
at com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl.validate(ExpandoColumnLocalServiceImpl.java:539)
at com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl.updateColumn(ExpandoColumnLocalServiceImpl.java:395)
at sun.reflect.GeneratedMethodAccessor1911.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.sun.proxy.$Proxy145.updateColumn(Unknown Source)
at com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil.updateColumn(ExpandoColumnLocalServiceUtil.java:470)
at com.liferay.portal.lar.PortletImporter.readExpandoTables(PortletImporter.java:1549)
at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:624)
at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:251)
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1763)


This issue is not occuring if I add a normal text type custom field. It only occurs in case of localized-type custom field.
Can anyone help us with a solution to this? Or it's a liferay Bug?
thumbnail
Jorge Díaz, modifié il y a 7 années.

RE: ClassCastException while remote publishing a Localized-text CustomField

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
Hi Samujjwal,

You issue is a known Liferay Bug, see LPS-59581

The bug is solved in:
  • Liferay Enterprise: 6.2 EE fixpack 103
  • Liferay Community: 7.0 GA1

If you are using Liferay Community 6.2 perhaps you can fix the issue by yourself, the modified code is in ExpandoValueLocalServiceImpl.java class: https://github.com/brianchandotcom/liferay-portal/pull/31380