Foren

Failed to insert facelets composites from JAR - Liferay 7 GA3

Damien Guillermet, geändert vor 7 Jahren.

Failed to insert facelets composites from JAR - Liferay 7 GA3

Junior Member Beiträge: 44 Beitrittsdatum: 09.07.15 Neueste Beiträge
Hello,

Firstly thank you for your work, past and present.

I'm trying to upgrade few portlets using Liferay Faces from Liferay 6.2 to Liferay 7 (GA3).
After maven dependencies upgrade (following the new liferay version scheme) I was able to deploy my portlet to Liferay 7.
However I have an issue when I use xhtml templates (cf. ui:decorate) contained in my custom JAR (a web fragment module that regroup all shared code between portlets), resulting to an invalid path error in portlet view. All templates (ui:composition) are in /META-INF/resources/common folder.
Note that /META-INF folder also has a taglib (files are in /META-INF/tags) which I can use without error in my main WAR portlet, as same as custom components (interface/implementation).
I have no clue why it doesn't work anymore because when I was using Liferay 6.2 (GA6) all resources under WAR/WEB-INF/lib/JAR/META-INF/resources were treated like WAR/WEB-INF/resources (cf. Servlet 3.X specification).

EDIT :
I'm able to include templates if I add the javax.faces.FACELETS_RESOURCE_RESOLVER context parameter in the JAR web-fragment.xml (propagated to the web.xml of portlet WAR), pointing to a javax.faces.view.facelets.ResourceResolver implementation. But this is deprecated since JSF 2.2 and I should not use a such directive.

Thank you very much for your help.
thumbnail
Juan Gonzalez, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Hi Damien.

In order to get the whole picture, please could you attach a simple portlet to reproduce?

Thanks!
Damien Guillermet, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Junior Member Beiträge: 44 Beitrittsdatum: 09.07.15 Neueste Beiträge
Hello Juan, sure I'll do that emoticon Unless you have any clue with my edit.
thumbnail
Juan Gonzalez, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Damien Guillermet:
Hello Juan, sure I'll do that emoticon Unless you have any clue with my edit.


I need more data and a simple portlet that can reproduce the problem will help for sure.

Thanks Damien.
Damien Guillermet, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Junior Member Beiträge: 44 Beitrittsdatum: 09.07.15 Neueste Beiträge
Hello back Juan,

Here are the library and portlet projects in separate archives.
Note that the portlet will work because I added a facelets resource resolver in the library. So you can raise the error by commenting the directive in JAR's web-fragment.xml file.

Let me know I should reduce code more (like maven dependencies/plugins) ;)

Thanks a lot.

EDIT : I modified the structure to match the recommended one. Furthermore I have little troubles with included resources (css, js) via liferay-portlet.xml but we should discuss this later, expect if it's relative to my main issue emoticon
thumbnail
Juan Gonzalez, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Thanks very much Damien.

I reproduced this and checking the reasons...

Hope to be back soon.
thumbnail
Juan Gonzalez, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Hi Damien.

I am happy to say I already have a fix for this issue, but have to make some checks as it affects how resources are being accesed in Liferay 7.

Will update soon.
thumbnail
Juan Gonzalez, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Hi Damien.

Please follow the progress of the fix here: https://issues.liferay.com/browse/LPS-68989
Damien Guillermet, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Junior Member Beiträge: 44 Beitrittsdatum: 09.07.15 Neueste Beiträge
Hello Juan,
thank you very much for your feedback I'll follow this closely emoticon
Damien Guillermet, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Junior Member Beiträge: 44 Beitrittsdatum: 09.07.15 Neueste Beiträge
Thank you for your work on the LPS-68989 issue now resolved ;)
thumbnail
Juan Gonzalez, geändert vor 7 Jahren.

RE: Failed to insert facelets composites from JAR - Liferay 7 GA3

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Damien Guillermet:
Thank you for your work on the LPS-68989 issue now resolved ;)


It's a pleasure Damien. Just double-checked your portlet now renders everything :-D.

Thanks for telling us about this bug and thanks for using Liferay Faces ;-).