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

Java client has conflicting javax.ws.rs dependencies #380

Open
3 of 5 tasks
GitoMat opened this issue Oct 4, 2024 · 2 comments
Open
3 of 5 tasks

Java client has conflicting javax.ws.rs dependencies #380

GitoMat opened this issue Oct 4, 2024 · 2 comments
Labels
bug Something is not working.

Comments

@GitoMat
Copy link

GitoMat commented Oct 4, 2024

Preflight checklist

Ory Network Project

No response

Describe the bug

In https://github.com/ory/sdk/blob/master/contrib/poms/client/pom.xml two dependencies are defined, javax.ws.rs:javax.ws.rs:2.1.1 and javax.ws.rs:jsr311-api:111. Those are basically different versions of the same library and contain overlapping classes. So to me it happened in our Docker deployment everything is fine but if I run our web application (using Jersey 2.29) in a stand-alone Tomcat the latter library is given preference and then I get the following error:

jersey java.lang.NoSuchMethodError: 'java.util.Map [[javax.ws.rs](http://javax.ws.rs/)](http://javax.ws.rs/).core.Application.getProperties()'

Excluding the JAX RS 1.0 library in our POM solved the issue for me:

      <dependency>
            <groupId>sh.ory</groupId>
            <artifactId>ory-client</artifactId>
            <version>1.6.2</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.ws.rs</groupId>
                    <artifactId>jsr311-api</artifactId>
                </exclusion>
            </exclusions>
        <dependency>

Reproducing the bug

I use the Maven Cargo plugin 1.10.9 to run Tomcat 9.0.80, but I'm not sure what influences the library loading order.

Relevant log output

No response

Relevant configuration

No response

Version

1.6.2

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Other

Additional Context

No response

@GitoMat GitoMat added the bug Something is not working. label Oct 4, 2024
@aeneasr
Copy link
Member

aeneasr commented Oct 21, 2024

Can yuo please upgrade to a newer version of our SDK?

@GitoMat
Copy link
Author

GitoMat commented Nov 4, 2024

The dependencies are still both present on the master branch and I've confirmed the problem persists with version 1.15.7 of the Java client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants