You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2021/06/07 10:39:01 UTC

[Bug 65362] New: Missing uses-Directives in JPMS descriptor of tomcat-embed-websocket.jar

https://bz.apache.org/bugzilla/show_bug.cgi?id=65362

            Bug ID: 65362
           Summary: Missing uses-Directives in JPMS descriptor of
                    tomcat-embed-websocket.jar
           Product: Tomcat 9
           Version: 9.0.46
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Packaging
          Assignee: dev@tomcat.apache.org
          Reporter: michael.kainer@invaris.com
  Target Milestone: -----

The module-info.class of tomcat-embed-websocket.jar is missing the following
two uses directives to be able to be used in a project that enables the JPMS.

uses javax.websocket.ContainerProvider;
uses javax.websocket.server.ServerEndpointConfig.Configurator;

The first one is required because
javax.websocket.ContainerProvider#getWebSocketContainer() calls
ServiceLoader.load(ContainerProvider.class).

The second one is required because
javax.websocket.server.ServerEndpointConfig.Configurator#loadDefault() calls
ServiceLoader.load(ServerEndpointConfig.Configurator.class).

Both calls fail with a ServiceConfigurationError if the uses directives are
missing. I managed to fix this issue locally by patching the JAR in such a way,
that both uses directives are included.

This bug is analogous to #64751.

I believe (but did not verify) that the same bug occurs in Tomcat 10 as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 65362] Missing uses-Directives in JPMS descriptor of tomcat-embed-websocket.jar

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65362

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
This looks a side-effect of removing the BND annotations from the API classes
because they broke the TCK (arguably the TCK should have ignored them but the
TCK team disagreed).

The fix should - hopefully - be as simple as adding the same manual entries to
the embed JARs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 65362] Missing uses-Directives in JPMS descriptor of tomcat-embed-websocket.jar

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65362

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- 10.1.x for 10.1.0-M1 onwards
- 10.0.x for 10.0.7 onwards
- 9.0.x for 9.0.47 onwards

8.5.x does not include JPMS metadata

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org