Primefaces 7.0 in karaf 4.2.6

13 views
Skip to first unread message

Matthias Wegner

unread,
Nov 3, 2019, 5:16:02 PM11/3/19
to OPS4J
Hi All,

i wrote an stackoverflow-article, because i hae problems with the pax-web-example for primefaces. See https://stackoverflow.com/questions/58683111/how-to-use-primefaces-in-osgi-framework-karaf

The code and all blog-entries seem outdated since 2017. Have anyone a working example which uses newer versions of karaf and primefaces?

Any help appreciated...

Grzegorz Grzybek

unread,
Nov 4, 2019, 2:39:59 AM11/4/19
to op...@googlegroups.com
Hello

Last time I worked on it was:
* https://issues.apache.org/jira/browse/MYFACES-4262 - make Myfaces compatible with servlet API 4
* https://github.com/primefaces/primefaces/issues/4210 - make Primefaces compatible with servlet API 4

In theory, https://github.com/ops4j/org.ops4j.pax.web/tree/pax-web-7.3.x/samples/war-jsf-primefaces should work with Primefaces 6.2 and 6.3 (I didn't check if it was released since then...).

I see you've created https://stackoverflow.com/questions/58683111/how-to-use-primefaces-in-osgi-framework-karaf - can you share a github project for it? It could be a base for newer/improved JSF sample for pax-web...

regards
Grzegorz Grzybek

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/85521b0a-ce58-4f1d-932e-6ec3736ee7e2%40googlegroups.com.

Grzegorz Grzybek

unread,
Nov 22, 2019, 11:58:16 AM11/22/19
to op...@googlegroups.com
Hello Matthias

I've described the ultimate problem here: https://ops4j1.jira.com/browse/PAXWEB-1244

the problem occurs when loading "META-INF/**/*.taglib.xml" resources.

In tomcat, getResource() is called on a classloader that returns Jar resources and java.util.jar.JarFile#entries() allows to find META-INF/primefaces-p.taglib.xml inside "/data/servers/apache-tomcat-9.0.24/webapps/test-jsf-primefaces-0.1.0.BUILD-SNAPSHOT/WEB-INF/lib/primefaces-7.0.jar" JAR (in my env).

However in pax web, getResource() is called on classloader that is org.ops4j.pax.web.service.spi.util.ResourceDelegatingBundleClassLoader and it returns entries which are org.apache.felix.framework.URLHandlersBundleURLConnection instances and MyFaces fallsback to directory searching...

In case of samples from pax-web, I remember that primefaces is installed as separate bundle and afaik, it worked (just try running org.ops4j.pax.web.itest.jetty.WarJSFPrimefacesIntegrationTest - I remember it worked) I don't have now time to provide detailed analysis - I compared zillion stack traces to find the problem inside org.apache.myfaces.view.facelets.util.Classpath#_searchResource().

I hope soon to work on https://ops4j1.jira.com/browse/PAXWEB-1244 because embedding libs inside WAR's WEB-INF/lib should just work™.

regards
Grzegorz Grzybek


niedz., 3 lis 2019 o 23:16 'Matthias Wegner' via OPS4J <op...@googlegroups.com> napisał(a):
--
Reply all
Reply to author
Forward
0 new messages