RE: Ajax calls are not working on server startup for JSF 2.2 portlets

thumbnail
Aliasgar Kapadiya, modified 7 Years ago. New Member Posts: 16 Join Date: 10/31/16 Recent Posts

Greetings,

Ajax calls to backend are not working after restarting the server (wildfly) and accessing the portlet.

Steps to reproduce:

1. Find the attached .war file and deploy it on a running server.
2. Input random text in the text box and click on Show Message button.
3. Note that the button click is working along with the new response.
4. Now restart the server without clearing any cache.
5. Navigate to the required portlet page.
6. Enter random text in the text box and click on Show Message button.
7. Note that the clicks is not working not and it is not hitting the bean.

Also , Attached are the errors response message screenshot shown when button click is being hit after restarting the server along with the portlet source code and .war file.

thumbnail
Kyle Joseph Stiemann, modified 7 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Hi Aliasgar,
It seems like the JSF implementation bundled with Wildfly is detecting the bean validation implementation that is also bundled with Wildfly. However, the JSF implementation that is bundled with Wildfly should have no effect on your app, so this seems like a bug in Liferay Portal. I’m working on creating a reproducer and a ticket for it, but for now you can work around the problem by adding the following to your  web.xml file:

&lt;context-<span class="hljs-built_in">param</span>&gt;
    &lt;<span class="hljs-built_in">param</span>-name&gt;javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR&lt;/<span class="hljs-built_in">param</span>-name&gt;
    &lt;<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span>&gt;<span class="hljs-constant">true</span>&lt;/<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span>&gt;
&lt;/context-<span class="hljs-built_in">param</span>&gt;

- Kyle

thumbnail
Kyle Joseph Stiemann, modified 7 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Hi Aliasgar,
I opened a ticket for your issue here: https://issues.liferay.com/browse/LPS-84428. Please let me know if the work around works for you.


- Kyle

thumbnail
Kyle Joseph Stiemann, modified 6 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts
LPS-84428 has been fixed in 7.0 Fix Pack 58 and 7.1 Fix Pack 2. That should fix your issue.

- Kyle