Skip to content

Test failures after migration to Jersey 3.1.1 #5295

@sergey-morenets

Description

@sergey-morenets

Hi

We've just migrated from Jersey 3.0.3 to 3.1.1 and noticed that most of our Jersey-related integration tests started failing with 404 error.
Our investigation figured out that cause of this issue is this commit - a83c7cd

Previously Jersey Grizzly 2 container didn't use path value from @ApplicationPath so we provided "orders" relative path in the tests using WebTarget object.
But in Jersey 3.1.x application path is actually used:

final String appPath = handler.getApplicationHandler().getConfiguration().getApplicationPath();
final String uriPath = appPath == null ? uri.getPath() : uri.getPath() + "/" + appPath;

So we have to update tests and include application path: "api/orders".

This seems to be breaking change but it's never mentioned in the Jersey documentation ("Migration Guide" section) - https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest31x/migration.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions