WildFly includes Mojarra 4.0.6 and is seeing 16 (old) Faces 4.0 TCK failures
Closed this issue · 12 comments
Describe the bug
I'm not sure of the cause yet. With https://www.eclipse.org/downloads/download.php?file=/jakartaee/faces/4.0/jakarta-faces-tck-4.0.3.zip + latest WildFly changes that includes Mojarra 4.0.6 we are seeing the following TCK tests failing:
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/application/navigationcase/URLClient.java#navigationCaseGetBookmarkableURLTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/application/navigationcase/URLClient.java#navigationCaseGetRedirectURLTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/html/htmlform/URLClient.java#uiComponentEncodeBeginELTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/html/htmlform/URLClient.java#uiComponentEncodeEndELTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/html/htmlform/URLClient.java#uiComponentGetCurrentComponentNullTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/html/htmlform/URLClient.java#uiComponentGetCurrentComponentTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/html/htmlform/URLClient.java#uiComponentGetCurrentCompositeComponentNullTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/html/htmlform/URLClient.java#uiComponentPopComponentFromELTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/html/htmlform/URLClient.java#uiComponentPushComponentToELTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/uiform/URLClient.java#uiComponentEncodeBeginELTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/uiform/URLClient.java#uiComponentEncodeEndELTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/uiform/URLClient.java#uiComponentGetCurrentComponentNullTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/uiform/URLClient.java#uiComponentGetCurrentComponentTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/uiform/URLClient.java#uiComponentGetCurrentCompositeComponentNullTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/uiform/URLClient.java#uiComponentPopComponentFromELTest
[javatest.batch] FAILED........com/sun/ts/tests/jsf/api/jakarta_faces/component/uiform/URLClient.java#uiComponentPushComponentToELTest
The WildFly tracking issue is https://issues.redhat.com/browse/WFLY-19220
To Reproduce
I have reproduced it locally with WildFly but GlassFish is still using Mojarra 4.0.5 so didn't try that.
Do any of the changes in 4.0.5-RELEASE...4.0.6-RELEASE change anything that could cause failures like shown in https://issues.redhat.com/browse/WFLY-19220
I'm doing a git bisect
and testing with different changes included in the 4.0.6
release to narrow the cause down.
git bisect
identified 5a23e8a4 as the cause.
If the stacktrace is the one pasted in the textarea on the redhat website you linked
what I see is:
[javatest.batch] Caused by: java.util.NoSuchElementException: No value present
[javatest.batch] at java.base/java.util.Optional.get(Optional.java:148)
[javatest.batch] at jakarta.faces.impl@4.0.6//com.sun.faces.util.Util.getResponseEncoding(Util.java:1680)
[javatest.batch] at jakarta.faces.impl@4.0.6//com.sun.faces.util.Util.getResponseEncoding(Util.java:1629)
[javatest.batch] at jakarta.faces.impl@4.0.6//com.sun.faces.context.ExternalContextImpl.encodeBookmarkableURL(ExternalContextImpl.java:976)
[javatest.batch] at jakarta.faces.impl@4.0.6//com.sun.faces.application.view.MultiViewHandler.getBookmarkableURL(MultiViewHandler.java:327)
if this is the error, the cause is a bug inside the Util
class:
public static String getResponseEncoding(FacesContext context) {
return getResponseEncoding(context, Optional.empty());
}
and it's caused by the Omptional.empty()
passed as a second parameter which
throws a NoSuchElementException
if the value is null
,
which is the exact value of Omptional.empty()
:)
probably it's better to pass a String
and not an Optional<String>
and I would pass the constant RIConstants.CHAR_ENCODING
Hi @scottmarlow , @TomasHofman actually opened an issue #5429 for very similar stacktrace, but he identified different commit causes the failure.
Please retry with 4.0.7-SNAPSHOT. This has only been fixed in current 4.0 branch for #5429.
Or let me know if we should release 4.0.7 as soon as possible.
Please retry with 4.0.7-SNAPSHOT. This has only been fixed in current 4.0 branch for #5429.
Or let me know if we should release 4.0.7 as soon as possible.
@BalusC thanks, I will test with ^ by locally building with the 4.0
branch that has changes:
commit 1d8c54b (HEAD -> 4.0, origin/4.0)
Merge: fed22d6 cac7dab
Author: Bauke Scholtz balusc@gmail.com
Date: Wed Apr 10 09:02:18 2024 -0400Merge pull request #5433 from eclipse-ee4j/mojarra_issue_5431 size attribute is only supported on HtmlSelect*Listbox components
commit cac7dab (origin/mojarra_issue_5431)
Author: Bauke Scholtz balusc@gmail.com
Date: Sun Apr 7 11:05:47 2024 -0400size attribute is only supported on HtmlSelect*Listbox components https://github.com/eclipse-ee4j/mojarra/issues/5431
commit fed22d6
Merge: 0cd4025 cacad0d
Author: Bauke Scholtz balusc@gmail.com
Date: Tue Apr 2 08:20:53 2024 -0400Merge pull request #5432 from codylerum/4.0 show which viewId was not found in exception
commit cacad0d
Author: Cody Lerum cody.lerum@gmail.com
Date: Mon Apr 1 10:47:32 2024 -0600show which viewId was not found in exception
commit 0cd4025
Merge: dd60829 acbdf4c
Author: Bauke Scholtz balusc@gmail.com
Date: Sat Mar 30 09:15:43 2024 -0400Merge pull request #5428 from eclipse-ee4j/mojarra_issue_5427 Fix #5427 UISelectMany collectionType ignored when VE resolves to non-Collection
And includes:
commit cea3398
Author: Bauke Scholtz balusc@gmail.com
Date: Mon Feb 12 06:56:32 2024 -0400Default encoding should be prechecked
#5383
Please retry with 4.0.7-SNAPSHOT. This has only been fixed in current 4.0 branch for #5429.
Or let me know if we should release 4.0.7 as soon as possible.
@BalusC thanks again for the quick fix! WildFly just passed all of the Faces (old + new) TCK tests with 4.0.7-SNAPSHOT!
We will switch to the 4.0.7 release when available. Having the 4.0.7 release as soon as possible would be appreciated! :-)
Okay I'll look what I can do.
Mojarra 4.0.7 will be released today.