Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to read portlet.properties file in liferay 7.2
Hai All,
I am trying to upgrade my liferay portal from 6.2 to 7.2.
I upgraded using liferay upgrade planner. while deploying project i got below error.
2021-02-18 11:04:05.915 ERROR
[http-nio-8080-exec-9][render_portlet_jsp:131]
null
com.liferay.portal.kernel.exception.SystemException: The
base properties file was not found for portlet
at
com.liferay.portal.configuration.ClassLoaderAggregateProperties._addBaseFileName(ClassLoaderAggregateProperties.java:172)
at
com.liferay.portal.configuration.ClassLoaderAggregateProperties.<init>(ClassLoaderAggregateProperties.java:69)
at
com.liferay.portal.configuration.ClassLoaderAggregatePropertiesUtil.create(ClassLoaderAggregatePropertiesUtil.java:43)
at
com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:79)
at
com.liferay.portal.configuration.ConfigurationFactoryImpl.getConfiguration(ConfigurationFactoryImpl.java:36)
at com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil.getConfiguration(ConfigurationFactoryUtil.java:25)
I tried to read portlet.properties file by using below lines of code:
Configuration portletPropertiesConfiguration = ConfigurationFactoryUtil.getConfiguration( PortalClassLoaderUtil.getClassLoader(), "portlet");
String mailSubject = ContentUtil.get(PortalClassLoaderUtil.getClassLoader(),portletPropertiesConfiguration.get("properties.dbHost"));
Please provide me info on how to resolve this issue.
Thanks in advance.
Powered by Liferay™