jakartaee / faces

Jakarta Faces
Other
102 stars 54 forks source link

Signature Test Error: API References Implementation Class #1957

Open volosied opened 1 month ago

volosied commented 1 month ago

TCK Version: Faces TCK 4.1.0

Tested Implementation: Open Liberty (with MyFaces 4.1.0-RC2)

Description: When Open Liberty is used against the Faces 4.1 signature test, it encounters a ClassNotFoundException by failing to find com.sun.faces.config.InitFacesContext. Upon looking at the Jakarta Faces API 4.1.0 source, we found the FacesContext imports the InitFacesContext class, and references it as a parameterized type in initContextServletContext ConcurrentHashMap.

As a follow up, we created the following bug in Mojarra: https://github.com/eclipse-ee4j/mojarra/issues/5484 A snippet of the exception:

java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at ee.jakarta.tck.faces.signaturetest.SigTestDriver.runSignatureTest(SigTestDriver.java:167)
        at ee.jakarta.tck.faces.signaturetest.SignatureTestDriver.executeSigTest(SignatureTestDriver.java:231)
        at ee.jakarta.tck.faces.signaturetest.JSFSigTestIT.signatureTest(JSFSigTestIT.java:223)
       ...
Caused by: java.lang.TypeNotPresentException: Type com.sun.faces.config.InitFacesContext not present
        at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
        at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
        at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
        at java.base/sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
        at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
        at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
        ...
Caused by: java.lang.ClassNotFoundException: com.sun.faces.config.InitFacesContext
        at java.base/java.lang.Class.forNameImpl(Native Method)
        at java.base/java.lang.Class.forName(Class.java:428)
        at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
        ... 101 more
volosied commented 1 month ago

@BalusC @arjantijms Could you take a look whenever you have time (along with the other 2 challenges)? Thanks!

BalusC commented 2 weeks ago

https://github.com/eclipse-ee4j/mojarra/issues/5484 has been fixed, please retest after merge of https://github.com/eclipse-ee4j/mojarra/pull/5485