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

JSTL TCK Failures for EE10 (JDK 11 / GlassFish 7) #882

Closed
volosied opened this issue Mar 10, 2022 · 9 comments
Closed

JSTL TCK Failures for EE10 (JDK 11 / GlassFish 7) #882

volosied opened this issue Mar 10, 2022 · 9 comments
Labels
10.0 Issues related to the Jakarta EE 10 Platform TCK release

Comments

@volosied
Copy link
Contributor

volosied commented Mar 10, 2022

Now that the JSTL 3.0.0 jars are staged, the latest TCK results show numbers failures (74 under JDK 11). Totals below don't really add up, but this is the majority of the errors.

  • ~39 Relate to EL:

    • jakarta.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier ‘reTest’
    • jakarta.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier ‘ex2’
    • ... and so on
    • Affects most of the reported failures
    • The JSP TCK reported similar PropertyNotFoundExceptions for the small number of its failures. Can anyone confirm if these are related (I assume so)?
    • Example : jstl_core_gen_set_web.war - positiveSetNullValueTest.jsp
  • ~12 Relate to Date Parsing:

    • I see numerous occurrences of this ParseException: java.text.ParseException: Unparseable date: “Nov 21, 2000, 3:45:02 AM”.
    • Similar issue occurred before with the EE9 Java 11 TCK: 30 standalone tags (jstl) failures #631 The solution was run the tests with -Djava.locale.providers=COMPAT and add a comma. I wouldn't expect this ParseException to reoccur then?
    • Server logs show: GlassFishConfigBean.com.sun.enterprise.config.serverbeans.JavaConfig}, reason = Addition of: ‘-Djava.locale.providers=COMPAT’ cannot take effect without server restart, when = 1646682092825]] Was the property not used when the tests ran?
    • Example : jstl_fmt_psdate_web.war - positivePDBodyValueTest.jsp
  • ~5 Relate to the Javac Compilation of JSPs

    • PWC6197: An error occurred at line: 39 in the jsp file: /positiveForTokensDeferredValueTest.jsp PWC6199: Generated servlet error: reference to print is ambiguous both method print(char[]) in jakarta.servlet.jsp.JspWriter and method print(java.lang.String) in jakarta.servlet.jsp.JspWriter match
    • The error says this line is the problem: <%= ve.getValue(pageContext.getELContext()) %>. The generated java file uses this line: out.print( ve.getValue(pageContext.getELContext()) );.
    • Should this be looked at from the JSP perspective? I didn't see any changes to JspWriter, so I'm not sure why it's failing.
    • Example : jstl_core_iter_fortok_web.war - positiveForTokensDeferredValueTest.jsp
  • 1 Relates to XML

    • java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class org.w3c.dom.Node (java.lang.Boolean is in module java.base of loader ‘bootstrap’; org.w3c.dom.Node is in module java.xml of loader ‘bootstrap’)
    • TCK Failure - positiveXPathToJavaTypesTest tags#223
    • Only valid issue I see so far within Jakarta Tags
    • jstl_xml_types_web.war - positiveXPathToJavaTypesTest

I've attached the mentions apps here :
Apps.zip

Glasshfish server log (contains stack traces):
server.log.zip

@volosied volosied changed the title JSTL TCK Failures for EE10 JSTL TCK Failures for EE10 (JDK 11 / GlassFish 7) Mar 10, 2022
@gurunrao gurunrao added the 10.0 Issues related to the Jakarta EE 10 Platform TCK release label Mar 10, 2022
@volosied
Copy link
Contributor Author

@markt-asf I think you looked at EL/JSP results already. Could you comment at all on the EL / JSP errors above? Thank you.

@markt-asf
Copy link
Contributor

The 39 EL PropertyNotFoundException issues suggest that the JSP implementation isn't providing the NotFoundELResolver which will always return null rather than throwing an exception.

The 5 JSP errors look like consequences of the EL API using generics. The test JSPs now need to use <%= (Object) ve.getValue(pageContext.getELContext()) %>

@volosied
Copy link
Contributor Author

volosied commented Mar 10, 2022

Thanks @markt-asf! You were right about the (Object) cast. I've made a PR to address that.

As for the EL errors, I should create an issue with Glassfish (or Expressly) ? I tested the same code on Tomcat 10.1.0-M11 and on Glassfish 7. Glashfish threw the PropertyNotFoundException exception. This seems to be related to jakartaee/pages#40?

<%@ taglib prefix="fn" uri="jakarta.tags.functions" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
<%
    String str = null;
    pageContext.setAttribute("str", str);
%>
<c:choose>
    <c:when test="${fn:endsWith(str, 'str')}">
        Test FAILED.  Expected fn:endsWith(null, 'str') to return
        FALSE.
    </c:when>
    <c:otherwise>
        Test PASSED
    </c:otherwise>
</c:choose>

@scottmarlow
Copy link
Contributor

The 5 JSP errors look like consequences of the EL API using generics. The test JSPs now need to use <%= (Object) ve.getValue(pageContext.getELContext()) %>

Should ^ be described as a JSTL compatibility issue under https://jakarta.ee/specifications/tags/3.0?

@volosied
Copy link
Contributor Author

It wouldn't hurt. I'll update the specification in jakartaee/specifications#457

@arjantijms
Copy link
Contributor

As for the EL errors, I should create an issue with Glassfish (or Expressly) ?

The Expression Language implementation is in Expressly indeed. If you want, please create the issue for the NotFoundELResolver. A PR would also be welcome ;)

@volosied
Copy link
Contributor Author

Mark was right about the resolvers. I've created a PR here in glassfish: eclipse-ee4j/wasp#44

This should get more TCK test passing.

@volosied
Copy link
Contributor Author

volosied commented Apr 11, 2022

@scottmarlow I'm rethinking about listing that compatibility issue (your March 10th comment). I think it would be better listed under JSP or EL. It's not caused by any change to the JSTL api or implementation.

@gurunrao
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.0 Issues related to the Jakarta EE 10 Platform TCK release
Projects
None yet
Development

No branches or pull requests

5 participants