My environment:
JSF 2.3, Mojarra 2.3.9.payara-p2
PrimeFaces 7.0
Payara 5.192
OmniFaces 3.3
Project Java EE 8 Maven
NetBeans 11.1
I have created a Faces flow:
folder "flotTransfer" containing only 2 files (for the moment) flotTransfert-flow.xml and flotTransfert.xhtml.
I can't deploy the application. I receive this message: " Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.IllegalStateException: Flow with id "flotTransfert" and definingDocumentId "" already exists.|#] ".
I don't understand why I get this error (why "already exists"?). No other application deployed on the server.
The content of flotTransfert-flow.xml:
<faces-config version="2.3"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd">
<flow-definition id="flotTransfert">
<flow-return id="sortieFlot">
<from-outcome>/listeComptes</from-outcome>
</flow-return>
</flow-definition>
</faces-config>
If I rename this file, no more error and the application is deployed on the server but, obviously, the faces flow does not work.
If I keep the file but remove all the content of the file (I comment out all the lines), I get the same error.
I have almost the same faces flow (just more pages in the folder) in another application but with Java EE 7 and Payara 5.184 and without OmniFaces and the flow works.