Plugins cannot import JAX-RS 2.0 bundle due to atlassian-rest-module JAX-RS-1.0 dependency

Description

The atlassian-rest-module-6.0.1.jar repackages JAX-RS 1.0.
For plugins that don't need to be rest servers, the jaxrs-ri-2.25.1.jar implementation of JAX-RS 2.0 is more convenient to use.

However in repackaging JAX-RS-1.0, the atlassian-rest-module also appears to import the javax.ws.rs.ext package.
At runtime, it ends up using the javax.ws.rs.ext.RuntimeDelegate from the jaxrs-ri-2.25.1.jar bundle, and registers a 1.0 implementation of RuntimeDelegate via the RuntimeDelegate.setInstance() method.

This causes plugins that use the jaxrs-ri-2.25.1.jar bundle to fail, with exceptions like:

At present, the workaround is to either:

  • use JAX-RS 1.0

  • embed JAX-RS 2.0 dependencies in plugins

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Affects versions

Priority

Minor
Configure