-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.0 M3
-
Fix Version/s: 6.2.2 CE GA3 , 6.2.X EE, 7.0.0 M1
-
Component/s: Environments, Environments > App Servers
-
Labels:
-
Branch Version/s:6.2.x
-
Backported to Branch:Committed
-
Story Points:12
-
Git Pull Request:
First, I need to disable this:
ehcache.portal.cache.manager.jmx.enabled=false
(previously, this was needed so portal could be restarted). Portal gets deployed, but can not be started, due to this issue:
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.liferay.portal.template.DefaultTemplateResourceLoader#5d583a53' defined in class path resource [META-INF/util-spring.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [java.lang.String[]]: Could not convert constructor argument value of type [com.sun.proxy.$Proxy263] to required type [[Ljava.lang.String;]: Failed to convert value of type 'com.sun.proxy.$Proxy263 implementing java.lang.Cloneable,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised' to required type 'java.lang.String[]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.sun.proxy.$Proxy263 implementing java.lang.Cloneable,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [java.lang.String]: no matching editors or conversion strategy found
DefaultTemplateResourceLoader in util-spring.xml is created like this:
<constructor-arg> <util:constant static-field="com.liferay.portal.kernel.template.TemplateConstants.LANG_TYPE_FTL" /> </constructor-arg> <constructor-arg> <util:constant static-field="com.liferay.portal.util.PropsValues.FREEMARKER_ENGINE_TEMPLATE_PARSERS" /> </constructor-arg> <constructor-arg> <util:constant static-field="com.liferay.portal.util.PropsValues.FREEMARKER_ENGINE_RESOURCE_MODIFICATION_CHECK_INTERVAL" /> </constructor-arg>
It happens that String[] object is proxified (above: FREEMARKER_ENGINE_TEMPLATE_PARSERS).
Here are the advisors:
+ org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR
+ org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor: pointcut [AspectJExpressionPointcut: () bean(com.liferay.portal.service.LayoutSetLocalService)]; advice bean 'com.liferay.portal.service.impl.LayoutSetLocalServiceStagingAdvice'
+ org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor: pointcut [AspectJExpressionPointcut: () bean(com.liferay.portal.service.PortletPreferencesLocalService)]; advice bean 'com.liferay.portal.service.impl.PortletPreferencesLocalServiceStagingAdvice'