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
RE: FreeMarker staticUtil breaks after upgrade from 7.2.0 GA1 to 7.2.1 GA2
Alessandro Candini, modified 5 Years ago.
Regular Member
Posts: 130
Join Date: 10/17/15
Recent Posts
Hi everyone!
On Liferay 7.2.0 CE GA1, inside a Web Content Template we had the following import of static constants:
Any ideas or workaround on how to solve this?
Thank you.
On Liferay 7.2.0 CE GA1, inside a Web Content Template we had the following import of static constants:
WorkflowConstants = staticUtil["com.liferay.portal.kernel.workflow.WorkflowConstants"]
After an upgrade to Liferay 7.2.1 CE GA2, this snippets does not work anymore and the error reported is the following:java.lang.ClassNotFoundException: com.liferay.portal.kernel.workflow.WorkflowConstants cannot be found by com.liferay.portal.template.freemarker_5.0.16
With other imports, for example WindowState = staticUtil["javax.portlet.WindowState"]
, everything seems working as before, we got this error only for WorkflowConstants.Any ideas or workaround on how to solve this?
Thank you.
Hi Alessandro,
Can you try with other classes in portal-kernel? it seems that the template can't see this jar somehow.
Can you try with other classes in portal-kernel? it seems that the template can't see this jar somehow.
Alessandro Candini, modified 5 Years ago.
Regular Member
Posts: 130
Join Date: 10/17/15
Recent Posts
Hi Alberto, I've solved in this way:
<#assign STATUS_APPROVED = staticFieldGetter.getFieldValue("com.liferay.portal.kernel.workflow.WorkflowConstants", "STATUS_APPROVED")/>
Great!
Thanks Alessandro for documenting it :-)
Thanks Alessandro for documenting it :-)
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™