Add MyFaces 4.0.2 on WildFly 31.0.1.Final

171 views
Skip to first unread message

Roger Lee

unread,
Apr 2, 2024, 7:04:24 AM4/2/24
to WildFly
Tried to install MyFaces 4.0.2 on WildFly 31.0.1.Final with:

https://jasondl.ee/2023/myfaces-4-on-wildfly work in WildFly 31.0.1.Final  with MyFaces4.0.2

Using:

/usr/local/Cellar/wildfly-as/galleon-5.2.2.Final/bin/galleon.sh install org.wildfly:wildfly-myfaces-feature-pack:1.0.0-SNAPSHOT \
    --dir=wildfly-preview-31.0.1.Final \
    --config=standalone.xml \
    --layers=myfaces

I can't get it to run. 

Jason Lee

unread,
Apr 3, 2024, 4:34:20 PM4/3/24
to Roger Lee, WildFly
Can you describe the error you're seeing? 

FWIW, I was getting parsing errors, which made me realize that my galleon installation was out of date, so I updated it (to 5.2.2.Final: https://github.com/wildfly/galleon/releases/tag/5.2.2.Final). I also noticed you are specifying a SNAPSHOT of the feature pack. The current version is 2.0.0.Final, but there's also a 1.0.0.Final.

This worked for me (with 1.0.0.Final, 2.0.0.Final, and wildfly-preview-31.0.1.Final and wildfly-31.0.1.Final):

$ ~/bin/galleon.sh install \
     org.wildfly:wildfly-myfaces-feature-pack:2.0.0.Final \
     --dir=wildfly-31.0.1.Final \
     --config=standalone.xml \
     --layers=myfaces

Jason Lee

Principal Software Engineer

Red Hat JBoss EAP



--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/f238393f-055f-4665-ac07-f896cad385e1n%40googlegroups.com.
Message has been deleted
Message has been deleted

Roger Lee

unread,
Apr 4, 2024, 11:21:23 AM4/4/24
to WildFly
Yes 'typo'. Upgraded '1.0.0-SNAPSHOT' to '2.0.0.Final':

/usr/local/Cellar/wildfly-as/galleon-5.2.2.Final/bin/galleon.sh install \


>      org.wildfly:wildfly-myfaces-feature-pack:2.0.0.Final \
>      --dir=wildfly-31.0.1.Final \
>      --config=standalone.xml \
>      --layers=myfaces

Feature pack installed.d.

grep myfaces wildfly-31.0.1.Final/standalone/configuration/standalone.xml
        <subsystem xmlns="urn:jboss:domain:jsf:1.1" default-jsf-impl-slot="myfaces"/>

Console shows:

12:43:57,836 WARN  [org.jboss.as.jsf] (MSC service thread 1-2) WFLYJSF0005: Unknown Jakarta Server Faces version 'myfaces-4.0.2'.  Default version 'main' will be used instead.
12:43:57,852 WARN  [org.jboss.as.jsf] (MSC service thread 1-4) WFLYJSF0005: Unknown Jakarta Server Faces version 'myfaces-4.0.2'.  Default version 'main' will be used instead.

Still showing:

12:44:00,661 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 87) Initializing Mojarra 4.0.5 for context '/BeWhereWhen'

TIA
Message has been deleted
Message has been deleted

Roger Lee

unread,
Apr 10, 2024, 5:23:56 AM4/10/24
to WildFly
With:

MacBook-Pro-2:bin NOTiFY$ ./standalone.sh -b 0.0.0.0 --server-config=standalone-full.xml  --stability=experimental
=========================================================================
  JBoss Bootstrap Environment
  JBOSS_HOME: /usr/local/Cellar/wildfly-as/wildfly-preview-32.0.0.Beta1
  JAVA: /Users/NOTiFY/Library/Java/JavaVirtualMachines/openjdk-22/Contents/Home/bin/java

Using:

NOTiFY$ /usr/local/Cellar/wildfly-as/galleon-5.2.2.Final/bin/galleon.sh install \
>       org.wildfly:wildfly-myfaces-feature-pack:2.0.0.Final \
>       --dir=wildfly-preview-32.0.0.Beta1 \
>       --config=standalone-full.xml \
>       --layers=my faces

Feature pack installed.d. 

NOTiFY$ grep myfaces wildfly-preview-32.0.0.Beta1/standalone/configuration/standalone-full.xml

        <subsystem xmlns="urn:jboss:domain:jsf:1.1" default-jsf-impl-slot="myfaces"/>

Start WildFly wildfly-preview-32.0.0.Beta1 gives:

18:28:17,570 WARN  [org.jboss.as.jsf] (MSC service thread 1-4) WFLYJSF0005: Unknown Jakarta Server Faces version 'myfaces-4.0.2'.  Default version 'main' will be used instead.

18:28:17,576 WARN  [org.jboss.as.jsf] (MSC service thread 1-5) WFLYJSF0005: Unknown Jakarta Server Faces version 'myfaces-4.0.2'.  Default version 'main' will be used instead.

18:28:19,132 INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 84) Initializing Mojarra 4.1.0-M1 for context '/BeWhereWhen'

Can MyFaces be used on Jakarta EE 10.0.0  & WildFly 31/32.0.0.Beta1 ?

On Friday 5 April 2024 at 10:40:08 UTC+1 Roger Lee wrote:
Changed also to 'standalone.xml' with:

OTiFY$ /usr/local/Cellar/wildfly-as/galleon-5.2.2.Final/bin/galleon.sh install \

>       org.wildfly:wildfly-myfaces-feature-pack:2.0.0.Final \
>       --dir=wildfly-31.0.1.Final \
>       --config=standalone.xml \
>       --layers=myfaces

Feature pack installed.d.
NOTiFY$ grep myfaces wildfly-31.0.1.Final/standalone/configuration/standalone.xml

        <subsystem xmlns="urn:jboss:domain:jsf:1.1" default-jsf-impl-slot="myfaces"/>

Doesn't allow me to use MyFaces:

WARN  [org.jboss.as.jsf] (MSC service thread 1-3) WFLYJSF0005: Unknown Jakarta Server Faces version 'myfaces-4.0.2'.  Default version 'main' will be used instead.
WARN  [org.jboss.as.jsf] (MSC service thread 1-6) WFLYJSF0005: Unknown Jakarta Server Faces version 'myfaces-4.0.2'.  Default version 'main' will be used instead.

Uses:

INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 78) Initializing Mojarra 4.0.5 for context '/BeWhereWhen'

Unsure what I'm doing wromg.


On Thursday 4 April 2024 at 16:41:12 UTC+1 Roger Lee wrote:
Noticed I was using: 'standalone-full.xml'

Get same 'error':

/usr/local/Cellar/wildfly-as/galleon-5.2.2.Final/bin/galleon.sh install \
    org.wildfly:wildfly-myfaces-feature-pack:2.0.0.Final \
    --dir=wildfly-31.0.1.Final \

    --config=standalone-full.xml \
    --layers=myfaces

Feature pack installed.d. 

MacBook-Pro-2:bin NOTiFY$ grep myfaces wildfly-31.0.1.Final/standalone/configuration/standalone-full.xml

Jason Lee

unread,
Apr 12, 2024, 3:21:47 PM4/12/24
to Roger Lee, WildFly
I could be wrong, but it seems like you're leaving something out. I say that because if I take your command line, add the management layer, provision and start the server, then deploy the WildFly tasks-jsf quickstart, I see this:

$ galleon.sh install org.wildfly:wildfly-myfaces-feature-pack:2.0.0.Final --dir=wildfly-preview-32.0.0.Beta1 --config=standalone-full.xml --layers=myfaces,management
$ wildfly-preview-32.0.0.Beta1/bin/standalone.sh -c standalone-full.xml
...
15:15:34,009 INFO  [org.apache.myfaces.webapp.MyFacesContainerInitializer] (ServerService Thread Pool -- 10) Using org.apache.myfaces.webapp.MyFacesContainerInitializer
15:15:34,016 INFO  [org.apache.myfaces.webapp.MyFacesContainerInitializer] (ServerService Thread Pool -- 10) Added FacesServlet with mappings=[/faces/*, *.jsf, *.faces, *.xhtml]
15:15:34,016 INFO  [org.apache.myfaces.webapp.MyFacesContainerInitializer] (ServerService Thread Pool -- 10) Using org.wildfly.extras.jsf.myfaces.injection.MyFacesContainerInitializer
15:15:34,141 INFO  [org.apache.myfaces.config.DefaultFacesConfigurationProvider] (ServerService Thread Pool -- 10) Reading config /WEB-INF/faces-config.xml
15:15:34,222 INFO  [org.apache.myfaces.util.ExternalSpecifications] (ServerService Thread Pool -- 10) MyFaces Core Bean Validation support enabled
15:15:34,243 INFO  [org.apache.myfaces.application.ApplicationImpl] (ServerService Thread Pool -- 10) Couldn't discover the current project stage, using Production
15:15:34,245 INFO  [org.apache.myfaces.util.ExternalSpecifications] (ServerService Thread Pool -- 10) MyFaces Core CDI support enabled
15:15:34,256 INFO  [org.apache.myfaces.webapp.FacesInitializerImpl] (ServerService Thread Pool -- 10) MyFaces Core has started, it took [228] ms.

You also mention 4.0.2, but the FP installs 4.0.1. Can you explain how you're overriding/changing that?



Jason Lee

Principal Software Engineer

Red Hat JBoss EAP


Roger Lee

unread,
Apr 13, 2024, 6:47:55 AM4/13/24
to WildFly
"You also mention 4.0.2, but the FP installs 4.0.1. Can you explain how you're overriding/changing that?"

Tried both MyFaces 4.0.2/4.0.1 on my web.xml:

<context-param>
    <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
    <param-value>myfaces-4.0.2</param-value>
</context-param>

"I could be wrong, but it seems like you're leaving something out"

I think you're correct. Need to look at my XML etc. 

Thanks. 

Reply all
Reply to author
Forward
Message has been deleted
0 new messages