Primefaces Lifecycle component is not working with Myfaces - primefaces

Recently we have migrated from Mojarra 2.2.15 to myfaces 2.2.11 version and found that Primefaces Lifecycle component is not working.
Note: We are using Wildfly 11
we have added following content in faces-config.xml
<lifecycle>
<phase-listener>org.primefaces.component.lifecycle.LifecyclePhaseListener</phase-listener>
</lifecycle>
Above configuration for p:lifecycle works fine with Mojarra but same is not working with Myfaces. How to solve this issue.

Related

PF 11.0.0: which mojarra versions are supported?

PF 11.0.0: which mojarra versions are supported?
It is not specified in pom.xml. The showcase used to show the mojarra version, but not now.
Based on documentation PrimeFaces 11 has dependency JSF with ver. 2.0, 2.1, 2.2, 2.3, 3.0, 4.0. Where JSF can be Apache MyFaces or Eclipse (former Oracle) Mojarra.

primefaces showcase deployed on tomcat style not loaded

primefaces showcase deployed on tomcat style not loaded
Downloaded the source code from below link branch 8.0
https://github.com/primefaces/primefaces-showcase
deployed in tomcat the site is misalligned the styles are not loaded see image attached.
what i am missing why the site is not aligned.
TOMCAT: NO errors in tomcat logs
Glassfish : Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.webbeans.exception.WebBeansDeploymentException: java.lang.NullPointerException. Please see server.log for more deta
Wildfly : {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"primefaces-8.0-SNAPSHOT.war\".undertow-deployment.UndertowDeploymentInfoService" => "java.lang.ClassNotFoundException: org.primefaces.webapp.FileUploadChunksServlet from [Module \"deployment.primefaces-8.0-SNAPSHOT.war\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.primefaces.webapp.FileUploadChunksServlet from [Module \"deployment.primefaces-8.0-SNAPSHOT.war\" from Service Module Loader]"}}
As long as it deploys in one of the server i am good to go.
So the first thing you did is check if org.primefaces.webapp.FileUploadChunksServlet is actually in the PrimeFaces 8 jar and noticed it is not there. Then you checked the PrimeFaces 8 tag in the source of PrimeFaces and noticed it is also not there. Then you checked the PrimeFaces Master (8.0.x) and noticed it IS there Then you checked the PrimeFaces showcase source to see if there, besides the 8.0.x branch there is a 8.0 tag and noticed tere is not. So your conclusion was that the 8.0.x showcase is up to date with the master and an explicit version of the showcase at the time of releasing PrimeFaces 8.0 is missing.
So you then decided you have three options
In the showcase source, go to the point in time of releasing PF 8 and download the source of that 'snapshot'
File an issue in the PrimeFaces showcase https://github.com/primefaces/primefaces-showcase/issues to request a tag to be made (maybe in retrospect even)
Do both
You then decided to do both and was happy because you could run the showcase locally and made the world a better place since you helped others in the future when the wanted to use the showcase source with a PrimeFaces community release.

How to install PrimeFaces as Wildfly module?

I'm using WF 14.0.1.Final and trying to install Primefaces 6.2 as a module.
I've added dependencies towards javax.faces in module.xml file:
<dependencies>
<module name="javax.faces.api"/>
</dependencies>
Then I set the scope <provided> in mvn pom.xml of my application for Primefaces and add a reference towards primefaces module in jboss-deployment-structure.
The problem is that there is no errors in the log when I deploy the application but my shows empty page meaning it didn't have primefaces tags to create page.
When set primefaces to be a global Wildfly module everything works perfectly. Something in WF triggers Primefaces initialization or whatever but I don't know how all this works.

Why do I get a java.lang.NoSuchFieldError on web application with JSF?

I am working on web application with JSF and I try to make notifications by Primefaces Push but when I run the project I got this exception :
java.lang.NoSuchFieldError: framework
at org.primefaces.push.PushServlet.configureFramework(PushServlet.java:66)
at org.primefaces.push.PushServlet.configureFramework(PushServlet.java:36)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:74)
Also I added this Libraries :
primefaces 5.0 atmosphere-runtime-2.3.5 slf4j-api-1.7.7 commons-lang3-3.4
You should use an Atmosphere version that is compatible with PrimeFaces 5.0. That is 2.1.3 according to the docs, pom and releasenotes.

Migrating standalone.xml from Wildfly 8.1 to JBOSS EAP 6

We have an javaee application already running on Wildfly 8.1 and we want to migrate it on JBoss EAP 6 because our customer needs a commercial license.
On Wildfly we have the following configuration
<subsystem xmlns="urn:jboss:domain:ee:1.2">
...
<concurrent>
<context-services>
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>
</context-services>
<managed-thread-factories>
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
</managed-thread-factories>
<managed-executor-services>
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" core-threads="50" max-threads="500" keepalive-time="5000" queue-length="1000"/>
</managed-executor-services>
<managed-scheduled-executor-services>
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" core-threads="2" keepalive-time="3000"/>
</managed-scheduled-executor-services>
</concurrent>
<default-bindings context-service="java:jboss/ee/concurrency/context/default" jms-connection-factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
How could we configure it on JBoss EAP? We read the documentation but the "concurrent" tag does not exist and we want to manage the concurrent threads.
Wildfly 8 was the first version towards a Java EE 7 compliant application server. Wildfly 10 is the latest version in that line.
JBoss EAP 7 is the supported version corresponding to WildFly 10. It is now in Beta.
So in short if you want to use the concurrent tag then you need to use JBoss EAP 7.
You're actually downgrading. JBoss EAP 6.2 is based on JBoss Application Server (AS) 7.3.0.Final. See the JBoss EAP component matrix for reference.
As you can see, EAP 7 is not there, as it was not released yet. The page is being updated as the component versions settle. Once it's out there, instead of JBoss AS, there will be WildFly. For EAP 7, it will be WildFly 10.x, as ozOli wrote.
JBoss EAP 7 (not sure about WildFly 10) has a feature which takes your old standalone.xml and converts it to the new configuration - namespaces, subsystems.
Once there was a tool under development called WindRide which aimed at automated configuration migration, but that was cutted off few years back.
In addition to automated server configuration migration, there are tools to assist with automated application migration:
JBoss Windup - pluggable customizable rule-based automated migration tool.
Pretty good*.
*) reference: me - I'm one of developers :)