is it possible to start Payara with Mojarra 2.2.20 in the deployment via payara-web.xml? I have a problem with Primefaces 11, which only runs error-free with version 2.2.20.
As of Mojarra 2.3.x there are some problems that will probably only be solved over time.
I will test your example. Thanks a lot for this. I’ll see what’s different about my project and why the settings are being ignored. I will report back on this.
But now I’m trying to deploy Primefaces in this JSF 2.2 context, which fails. Do I have to configure something else in the web.xml so that Primefaces recognizes that the JSF 2.2 context is active here? Primefaces always searches internally for the JSF2.3 context.
Exception while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
java.lang.RuntimeException: java.lang.LinkageError: loader constraint violation:
when resolving overridden method "org.primefaces.expression.impl.Jsf23WidgetVarSearchKeywordResolver.resolve(Ljavax/faces/component/search/SearchKeywordContext;Ljavax/faces/component/UIComponent;Ljava/lang/String;)V" the class loader (instance of org/glassfish/web/loader/WebappClassLoader) of the current class, org/primefaces/expression/impl/Jsf23WidgetVarSearchKeywordResolver, and its superclass loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader), have different Class objects for the type javax/faces/component/UIComponent used in the signature]]
I’m glad to hear my sample project was able to help you. I have been able to reproduce the exception when deploying the application you provided with Primefaces 11 included.
I have confirmed there is no conflict of transitive dependencies causing an issue, Primefaces should therefore pickup the JSF2.2 context. I suspect there may be a bug here, but I will continue to investigate this to see if there is a property missing from our documentation.
I have also tested this same application on GlassFish 5 and the same error occurs, so I would like to conclusively determine if there is a bug within Payara & GlassFish or the error lies with Primefaces.
If you require this urgently, I would again recommend a Payara Enterprise subscription where you can raise tickets to our support team for a top priority investigation.
We will definitely conclude an Enterprise contract if we can be sure that the migration from WebLogic 14 to Payara5 is 100% guaranteed. We are a small company and we have to think carefully about any financial investment as we can only choose one system (server).
It would therefore appear setting the class-loader delegate to false, and useBundledJsf to true doesn’t remove JSF 2.3 from the classloaders entirely and therefore hasn’t fully downgraded JSF to 2.2 in Payara Server 5.
This may be a bug within Payara and Glassfish where this feature is not working properly, I will evaluate if this feature should allow a change in JSF versions from 2.3 to 2.2 and get back to you shortly.
exactly, I created this ticket there, hoping that the Primefaces team would have an idea.
Nice that you take a closer look at the topic. Thanks a lot for this.
I’d like to apologise for my silence on this matter, I have continued to investigate this but I have been unsuccessful in getting a working sample to give to you. In this case, it would appear like a bug from Payara, as our documentation states this use case is supported.
I kindly request you raise an issue over on GitHub Issues · payara/Payara · GitHub where I can escalate this to our development team to fix this functionality.
Apologies for crashing the party, but I have a similar “older situation”. Basically, I have a legacy project that runs on GlassFish3 with JSF2.0 and I’m currently trying to move the project to Payara4. However, I’m also having trouble deploying as it seems Payara4 requires JSF2.2.
I’ve also tried useBundeledJsf but that doesn’t seem to work, or is this feature only for Payara5?
At this point, any ideas or suggestions that you have would be greatly appreciated.