Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WildFly includes Mojarra 4.0.6 and is seeing 16 (old) Faces 4.0 TCK failures #5436

Closed
scottmarlow opened this issue Apr 9, 2024 · 12 comments

Comments

@scottmarlow
Copy link
Member

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.

@scottmarlow
Copy link
Member Author

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

@scottmarlow
Copy link
Member Author

I'm doing a git bisect and testing with different changes included in the 4.0.6 release to narrow the cause down.

@scottmarlow
Copy link
Member Author

git bisect identified 5a23e8a4 as the cause.

@pizzi80
Copy link
Contributor

pizzi80 commented Apr 10, 2024

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() :)

@pizzi80
Copy link
Contributor

pizzi80 commented Apr 10, 2024

probably it's better to pass a String and not an Optional<String>
and I would pass the constant RIConstants.CHAR_ENCODING

pizzi80 added a commit to pizzi80/mojarra that referenced this issue Apr 10, 2024
@soul2zimate
Copy link
Contributor

Hi @scottmarlow , @TomasHofman actually opened an issue #5429 for very similar stacktrace, but he identified different commit causes the failure.

pizzi80 added a commit to pizzi80/mojarra that referenced this issue Apr 10, 2024
Signed-off-by: pizzi80 <paolo@given2.com>
@pizzi80 pizzi80 mentioned this issue Apr 10, 2024
@BalusC
Copy link
Contributor

BalusC commented Apr 10, 2024

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.

@scottmarlow
Copy link
Member Author

scottmarlow commented Apr 10, 2024

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 -0400

Merge 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 -0400

size 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 -0400

Merge 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 -0600

show 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 -0400

Merge 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 -0400

Default encoding should be prechecked
#5383

pizzi80 added a commit to pizzi80/mojarra that referenced this issue Apr 10, 2024
Signed-off-by: pizzi80 <paolo@given2.com>
@scottmarlow
Copy link
Member Author

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! :-)

@BalusC
Copy link
Contributor

BalusC commented Apr 10, 2024

Okay I'll look what I can do.

@BalusC BalusC added this to the 4.0.7 milestone Apr 11, 2024
@BalusC
Copy link
Contributor

BalusC commented Apr 11, 2024

Mojarra 4.0.7 will be released today.

@BalusC BalusC closed this as completed Apr 11, 2024
@BalusC BalusC removed this from the 4.0.7 milestone Apr 11, 2024
@BalusC
Copy link
Contributor

BalusC commented Apr 11, 2024

This issue is technically speaking duplicate of #5429

@BalusC BalusC closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants