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

Introduce alternative fix for accepted TCK challenge 1313 for 10.0.x branch #1335

Merged
merged 10 commits into from
Jul 1, 2024

Conversation

scottmarlow
Copy link
Contributor

…allenge jakartaee#1313, old schema in test artifacts."

This reverts commit b383a23.
@scottmarlow
Copy link
Contributor Author

@pnicolucci could you please review this change.

@scottmarlow
Copy link
Contributor Author

Perhaps more changes are needed as I get errors testing locally.

@scottmarlow
Copy link
Contributor Author

I fixed one problem but am now seeing that some of the old web-app_2_3 fields are no longer supported like context-param

@scottmarlow
Copy link
Contributor Author

@pnicolucci @markt-asf
Could you please help me remember why https://jakarta.ee/specifications/servlet/6.0/jakarta-servlet-spec-6.0#a-basic-example mentions context-param but https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd does not mention context-param?

The https://jakarta.ee/specifications/servlet/5.0/jakarta-servlet-spec-5.0#a-basic-example spec also has context-param but https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd doesn't.

The purpose of this pull request is to avoid excluding Platform TCK tests for challenge 1313.

CC @gurunrao

@pnicolucci
Copy link
Contributor

@scottmarlow
Copy link
Contributor Author

scottmarlow commented Jun 24, 2024

@scottmarlow https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd includes https://jakarta.ee/xml/ns/jakartaee/web-common_6_0.xsd which contains context-param

Thanks @pnicolucci!

I suppose that we can either remove fields that are no longer supported or rename fields if the names have changed. If the removed fields are important to the tests, then we have to decide if the test can still exist in some form in EE 10 (as well as EE 9.1 which was also challenged).

Also pending would be web-app_2_3.dtd -> web-app 5.0 change and web-app_2_2.dtd -> web-app 5.0.

We also need to update from sun-application-client_5_0-0.dtd -> application_9.xsd.

We already excluded the tests. If anyone has time to update these schemas, please speak up.

@scottmarlow scottmarlow marked this pull request as draft June 24, 2024 14:34
@pnicolucci
Copy link
Contributor

I fixed one problem but am now seeing that some of the old web-app_2_3 fields are no longer supported like context-param

@scottmarlow can you point to the logs that show context-param is causing an issue I'm not seeing that in the logs here: https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/2/testReport/com.sun.ts.tests.jstl.compat.onedotzero/JSTLClient/negativeScriptFreeTlvNoDeclTest/

I'm seeing an issue in the logs for <display-name>JstlDbFilter</display-name> if you remove that is there anything else that needs to be resolved?

@scottmarlow
Copy link
Contributor Author

I fixed one problem but am now seeing that some of the old web-app_2_3 fields are no longer supported like context-param

@scottmarlow can you point to the logs that show context-param is causing an issue I'm not seeing that in the logs here: https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/2/testReport/com.sun.ts.tests.jstl.compat.onedotzero/JSTLClient/negativeScriptFreeTlvNoDeclTest/

I'll look in https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/2/artifact/jstl-results.tar.gz

I do see the tck/vi/glassfish7/glassfish/domains/domain1/logs/server.log which only contains the display-name failures. I pushed another change without the display-name specified to try running again via https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/3/

@scottmarlow
Copy link
Contributor Author

This change doesn't work so more exploration would be needed to bring it in, perhaps in a future EE 10 release as other outstanding TCK challenges have been waiting for the 10.0.5 changes for too long now (really since last year for some).

@pnicolucci
Copy link
Contributor

This change doesn't work so more exploration would be needed to bring it in, perhaps in a future EE 10 release as other outstanding TCK challenges have been waiting for the 10.0.5 changes for too long now (really since last year for some).

Hi @scottmarlow can you elaborate on what doesn't work? Do you have logs of the most recent change?

@scottmarlow
Copy link
Contributor Author

@pnicolucci https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/4/artifact/jstl-results.tar.gz contains home/tck/vi/glassfish7/glassfish/domains/domain1/logs/server.log from only running the jstl tests which has failures like:

[2024-06-24T23:50:35.762515Z] [GF 7.0.13] [WARNING] [] [jakarta.enterprise.web.vs.server] [tid: _ThreadID=26 _ThreadName=http-listener-1(1)] [levelValue: 900] [[
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.glassfish.wasp.WaspException: /positiveCWOTest.jsp(31,8) PWC6236: According to TLD or attribute directive in tag file, attribute test does not accept any expressions
at org.glassfish.wasp.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:44)

See attached server.log for the errors.

@pnicolucci
Copy link
Contributor

pnicolucci commented Jun 27, 2024

@pnicolucci https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/4/artifact/jstl-results.tar.gz contains home/tck/vi/glassfish7/glassfish/domains/domain1/logs/server.log from only running the jstl tests which has failures like:

[2024-06-24T23:50:35.762515Z] [GF 7.0.13] [WARNING] [] [jakarta.enterprise.web.vs.server] [tid: _ThreadID=26 _ThreadName=http-listener-1(1)] [levelValue: 900] [[
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.glassfish.wasp.WaspException: /positiveCWOTest.jsp(31,8) PWC6236: According to TLD or attribute directive in tag file, attribute test does not accept any expressions
at org.glassfish.wasp.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:44)

See attached server.log for the errors.

Cool! I actually, should have a fix for this! See the changes here: 10.0.x...pnicolucci:jakartaee-tck:isELIgnored you can pull this commit in if you want and test it. I got good results locally.

This is due to https://jakarta.ee/specifications/pages/3.0/jakarta-server-pages-spec-3.0#_Deactivating_EL_Evaluation where EL is ignored on the previous webapp 2.3 version that was being used. I updated the individual pages that I hit the problem with locally using the page directive rather than the entire application via the web.xml to make the set of changes as minimal as possible.

@pnicolucci
Copy link
Contributor

As an alternative, you could try adding the following to the web.xml for the application:

<jsp-property-group>
  <url-pattern>*.jsp</url-pattern>
  <el-ignored>true</el-ignored>
</jsp-property-group>

I didn't test this route yet but if you prefer this over my current proposal I can try it.

@scottmarlow
Copy link
Contributor Author

@pnicolucci https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/4/artifact/jstl-results.tar.gz contains home/tck/vi/glassfish7/glassfish/domains/domain1/logs/server.log from only running the jstl tests which has failures like:

[2024-06-24T23:50:35.762515Z] [GF 7.0.13] [WARNING] [] [jakarta.enterprise.web.vs.server] [tid: _ThreadID=26 _ThreadName=http-listener-1(1)] [levelValue: 900] [[
StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.glassfish.wasp.WaspException: /positiveCWOTest.jsp(31,8) PWC6236: According to TLD or attribute directive in tag file, attribute test does not accept any expressions
at org.glassfish.wasp.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:44)

See attached server.log for the errors.

Cool! I actually, should have a fix for this! See the changes here: 10.0.x...pnicolucci:jakartaee-tck:isELIgnored you can pull this commit in if you want and test it. I got good results locally.

+1 thank you! I started a test build via https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/5 which may also run the Platform TCK tests as well, will see how that goes.

This is due to https://jakarta.ee/specifications/pages/3.0/jakarta-server-pages-spec-3.0#_Deactivating_EL_Evaluation where EL is ignored on the previous webapp 2.3 version that was being used. I updated the individual pages that I hit the problem with locally using the page directive rather than the entire application via the web.xml to make the set of changes as minimal as possible.

Good catch!

@scottmarlow
Copy link
Contributor Author

scottmarlow commented Jun 27, 2024

https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/5/testReport/junit/com.sun.ts.tests.jstl.compat.onedotzero/JSTLClient/jakartaeetck_run___jstl___positiveCWOTest has a failure from the Full Platform TCK run I started with the 10.0.x...pnicolucci:jakartaee-tck:isELIgnored change:

According to TLD or attribute directive in tag file, attribute test does not accept any expressions

It sounds like we need to try the web.xml way.

I'll work on an update for this.

@scottmarlow
Copy link
Contributor Author

scottmarlow commented Jun 27, 2024

@pnicolucci
Copy link
Contributor

@scottmarlow yes that web.xml change looks correct to me. I'm not sure why the page directive isn't working for you. I updated the jsp for the test that is failing in your most recent logs.

Could you test the new application manually and send it to me to take a look at and test? Perhaps something isn't cleaned up in your environment or wasn't built correctly?

@scottmarlow
Copy link
Contributor Author

Regarding two Servlet failures:

https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/5/artifact/servlet-results.tar.gz now contains the server.log with the following for the servlet failures:

Caused by: org.xml.sax.SAXParseException; lineNumber: 27; columnNumber: 18; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"https://jakarta.ee/xml/ns/jakartaee":description}'. One of '{"https://jakarta.ee/xml/ns/jakartaee":servlet-class, "https://jakarta.ee/xml/ns/jakartaee":jsp-file, "https://jakarta.ee/xml/ns/jakartaee":init-param, "https://jakarta.ee/xml/ns/jakartaee":load-on-startup, "https://jakarta.ee/xml/ns/jakartaee":enabled, "https://jakarta.ee/xml/ns/jakartaee":async-supported, "https://jakarta.ee/xml/ns/jakartaee":run-as, "https://jakarta.ee/xml/ns/jakartaee":security-role-ref, "https://jakarta.ee/xml/ns/jakartaee":multipart-config}' is expected.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:511)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3599)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1971)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:281)

The following servlet tests are also failing as well which I missed before:

* https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/5/testReport/junit/com.sun.ts.tests.servlet.compat.LeadingSlash.WithLeadingSlash/URLClient/jakartaeetck_run___servlet___WithLeadingSlashTest/

* https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/5/testReport/junit/com.sun.ts.tests.servlet.compat.LeadingSlash.WithoutLeadingSlash/URLClient/jakartaeetck_run___servlet___WithoutLeadingSlashTest/

Caused by: org.xml.sax.SAXParseException; lineNumber: 27; columnNumber: 18; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"https://jakarta.ee/xml/ns/jakartaee":description}'. One of '{"https://jakarta.ee/xml/ns/jakartaee":servlet-class, "https://jakarta.ee/xml/ns/jakartaee":jsp-file, "https://jakarta.ee/xml/ns/jakartaee":init-param, "https://jakarta.ee/xml/ns/jakartaee":load-on-startup, "https://jakarta.ee/xml/ns/jakartaee":enabled, "https://jakarta.ee/xml/ns/jakartaee":async-supported, "https://jakarta.ee/xml/ns/jakartaee":run-as, "https://jakarta.ee/xml/ns/jakartaee":security-role-ref, "https://jakarta.ee/xml/ns/jakartaee":multipart-config}' is expected.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:511)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3599)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1971)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:829)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)

@scottmarlow
Copy link
Contributor Author

@scottmarlow yes that web.xml change looks correct to me. I'm not sure why the page directive isn't working for you. I updated the jsp for the test that is failing in your most recent logs.

In making the scottmarlow@69127c6 change, I noticed that I also need to update the src/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.war which I didn't change before in my previous change.

@pnicolucci
Copy link
Contributor

@scottmarlow
Copy link
Contributor Author

@scottmarlow Servlet failures look due to: https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/servlet/compat/LeadingSlash/WithLeadingSlash/servlet_compat_LeadingSlash_With_web.xml#L27 could try removing those and see if things clean up.

Thanks, added 93532a6 to remove Description from servlet_compat_LeadingSlash_With_web.xml#L27 and after the current test runs completes, will start a new one.

@scottmarlow
Copy link
Contributor Author

One servlet failure left that fails due to <url-pattern>WithoutLeadingSlashTest</url-pattern> being considered invalid I think because it doesn't have a leading slash as the test name indicates:

[2024-06-28T03:17:47.379854Z] [GF 7.0.13] [INFO] [NCLS-DEPLOYMENT-02027] [jakarta.enterprise.system.tools.deployment.autodeploy] [tid: _ThreadID=81 _ThreadName=AutoDeployer] [levelValue: 800] [[
Selecting file /home/tck/vi/glassfish7/glassfish/domains/domain1/autodeploy/servlet_compat_LeadingSlash_Without.ear for autodeployment]]

[2024-06-28T03:17:47.825075Z] [GF 7.0.13] [SEVERE] [] [jakarta.enterprise.system.core] [tid: _ThreadID=81 _ThreadName=AutoDeployer] [levelValue: 1000] [[
Exception while deploying the app [servlet_compat_LeadingSlash_Without]]]

[2024-06-28T03:17:47.825927Z] [GF 7.0.13] [SEVERE] [NCLS-CORE-00026] [jakarta.enterprise.system.core] [tid: _ThreadID=81 _ThreadName=AutoDeployer] [levelValue: 1000] [[
Exception during lifecycle processing
java.lang.IllegalArgumentException: Invalid URL Pattern: [WithoutLeadingSlashTest]
at org.glassfish.web.deployment.node.ServletMappingNode.setElementValue(ServletMappingNode.java:95)
at com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:531)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:610)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:947)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1718)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2883)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:281)
at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:213)
at com.sun.enterprise.deployment.archivist.Archivist.readStandardDeploymentDescriptor(Archivist.java:655)
at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:393)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:275)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:284)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:537)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:210)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:200)
at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:179)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:210)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:80)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:942)

One hint from https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/web/web-glue/src/main/java/org/glassfish/web/deployment/node/ServletMappingNode.java#L80:

                // If URL Pattern does not start with "/" then
                // prepend it (for Servlet2.2 Web apps)
                Object parent = getParentNode().getDescriptor();
                if (parent instanceof WebBundleDescriptor
                    && ((WebBundleDescriptor) parent).getSpecVersion().equals("2.2")) {
                    if (!trimmedUrl.startsWith("/") && !trimmedUrl.startsWith("*.")) {
                        trimmedUrl = "/" + trimmedUrl;
                    }
                }

This test previously passed with the older web-app_2_2.dtd but no longer passes with web-app_5_0.xsd which seems to match the ^ check for Servlet Spec 2.2 version which I think is the only way to be able to deploy servlets without a leading slash in the url. For reference copying from https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/servlet/compat/LeadingSlash/WithoutLeadingSlash/servlet_compat_LeadingSlash_Without_web.xml#L33:

 <servlet-mapping>
    <servlet-name>WithoutLeadingSlashTestLogicalName</servlet-name>
    <url-pattern>WithoutLeadingSlashTest</url-pattern>
  </servlet-mapping>

I think we need to exclude the WithoutLeadingSlashTest and remove it from the EE 11 TCK since we no longer can reference the http://java.sun.com/j2ee/dtds/web-app_2_2.dtd in this test as per the TCK challenge #1313.

CC @pnicolucci @markt-asf

@scottmarlow
Copy link
Contributor Author

Will build and run just the servlet test this time. If that passes, we will do a full run against the staged TCK after this change is merged.

@pnicolucci
Copy link
Contributor

@scottmarlow for the Jakarta Tags changes, I guess if we're going with the web.xml update and that is working you can remove the changes to the JSP files from this PR as well.

…URLClient.WithoutLeadingSlashTest as it cannot work without 2.2 Servlet web.xml

Signed-off-by: Scott Marlow <[email protected]>
@scottmarlow
Copy link
Contributor Author

@scottmarlow for the Jakarta Tags changes, I guess if we're going with the web.xml update and that is working you can remove the changes to the JSP files from this PR as well.

I'm going to build/run again to see what happens without the JSP file changes.

…3.0 implementations can also run the TCK on Java 21

Signed-off-by: Scott Marlow <[email protected]>
…CKs so implementations can also run the TCK on Java 21

Signed-off-by: Scott Marlow <[email protected]>
@scottmarlow
Copy link
Contributor Author

Will also release Tags 3.0.1, Servlet 6.0.2, Server Pages 3.1.1, Connector 2.1.2 TCKs so implementations can also run the TCK on Java 21

@scottmarlow scottmarlow marked this pull request as ready for review June 28, 2024 15:24
@scottmarlow
Copy link
Contributor Author

https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/issues_1313_10.0.x_part2/8/ passed the testing. Just need a positive approval on the pull request from one of you @pnicolucci or @markt-asf or @gurunrao

Copy link
Contributor

@gurunrao gurunrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gurunrao
Copy link
Contributor

gurunrao commented Jul 1, 2024

Thanks @scottmarlow for fixes of outdated test schema.

@scottmarlow
Copy link
Contributor Author

Will stage TCKS today for EE 10 Platform TCK, Tags, Servlet, Connector, Persistence.

@scottmarlow scottmarlow merged commit 1cdcb99 into jakartaee:10.0.x Jul 1, 2024
1 check passed
@scottmarlow scottmarlow deleted the issues_1313_10.0.x_part2 branch July 1, 2024 13:30
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

Successfully merging this pull request may close these issues.

3 participants