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

DRAFT: Set Servlet Version From Bundle Wiring Capability Attribute #18326

Conversation

volosied
Copy link
Member

@volosied volosied commented Aug 26, 2021

Potential fix #2 for #17952

This is needs a bit more work, however.

Comments & Questions

  1. Removing the following Service-Component code (where the servlet versions originate) in the WC factory bnds:
    Service-Component: \
    com.ibm.ws.webcontainer.v31.dd; \
    implementation:=com.ibm.ws.javaee.version.ServletVersion; \
    provide:=com.ibm.ws.javaee.version.ServletVersion; \
    properties:="version:Integer=31", \

    Causes

[ERROR ] CWWKZ0002E: An exception occurred while starting the application TestEL3.0. The exception message was: java.lang.IllegalStateException: com.ibm.wsspi.adaptable.module.UnableToAdaptException: com.ibm.ws.javaee.ddmodel.DDParser$ParseException: CWWKC2262E: The server is unable to process the 3.1 version and the http://xmlns.jcp.org/xml/ns/javaee namespace in the /WEB-INF/web.xml deployment descriptor on line 16.

This is because no maxVersion is actually set and the default (WebApp.VERSION_3_0) is selected instead :

public synchronized void setVersion(ServiceReference<ServletVersion> versionRef) {
this.versionRef = versionRef;
Integer maxVersionValue = (Integer) versionRef.getProperty("version");
maxVersion = maxVersionValue.intValue();
}
public synchronized void unsetVersion(ServiceReference<ServletVersion> versionRef) {
if ( versionRef == this.versionRef ) {
this.versionRef = null;
this.maxVersion = DEFAULT_MAX_VERSION;
}
}

  1. Change servlet Versions 2.7, 2.8, etc to appropriate levels? Or vice versa? (Change the spec level variables)?

    javax.servlet;thread-context=true;version="2.6.0";uses:="javax.servlet.annotation,javax.servlet.descriptor",\

  2. setVersion is public for the WC unit tests. I'm conflicted since I think this method shouldn't really exist or it shouldn't be public.

  3. Since some unit tests for the version were removed, we should add tests in the FATs to ensure the versions are set.

@LibbyBot
Copy link

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 3 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@volosied volosied marked this pull request as draft August 26, 2021 02:00
@volosied
Copy link
Member Author

#build

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_MC3oMAYJEeyB1uNHimT5CA

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

@LibbyBot
Copy link

The build volosied-18326-20210825-1908
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_MC3oMAYJEeyB1uNHimT5CA
completed and has errors or failures.

For help analyzing your personal build, go to https://cognitive.hursley.ibm.com/buildAnalysis.html?uuid=_MC3oMAYJEeyB1uNHimT5CA

@volosied
Copy link
Member Author

volosied commented Sep 7, 2021

Closing as we went with #17952 instead. We can reopen this PR if the need arises.

@volosied volosied closed this Sep 7, 2021
@volosied
Copy link
Member Author

#build

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_71ahkH06EeykJKbDLxYjRw

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

The build volosied-18326-20220124-1048
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_71ahkH06EeykJKbDLxYjRw
completed and has errors or failures.

For help analyzing your personal build, go to https://cognitive.hursley.ibm.com/buildAnalysis.html?uuid=_71ahkH06EeykJKbDLxYjRw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants