The restClient object throws error in Freemarker templates on JBOSS EAP
Written By
Daniel Carrillo Broeder
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Environment
- Liferay DXP 7.4 and Quarterly Releases
- JBoss EAP
Resolution
- Add the
allow-non-standard-wrappers="true" attribute to the <servlet-container> tag in your standalone.xml file:
<servlet-container name="default" allow-non-standard-wrappers="true">
...
</servlet-container>
- This is needed because Liferay's RESTClient uses a dynamic proxy approach (ProxyUtil.newDelegateProxyInstance()) that doesn't comply with JBOSS's strict servlet specification enforcement, and will be eventually documented in the future: Installing on JBoss EAP.
- You also need to verify if your Liferay patch level includes the fix for LPD-42480 (Fixed in 2024.Q3.11+ and 2025.Q1.0+), and request a hotfix if needed.
Did this article resolve your issue ?