Skip to content

OpenStack4j v3.0.2 with javax.ws.rs-api 2.0.1 and resteasy #835

@ScottMaclure

Description

@ScottMaclure

Apologies in advance - unsure how to raise/discuss an issue like this. Don't do much java coding.

My project already uses javax.ws.rs-api v2.0.1 implementation from Oracle:

<dependency>
    <groupId>javax.ws.rs</groupId>
    <artifactId>javax.ws.rs-api</artifactId>
    <version>2.0.1</version>
</dependency>

I recently added openstack4j v3.0.2 and I get the following error when Oracle's jar loads first, and I try to authenticate:

java.lang.AbstractMethodError: 
javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;

Seems there's a some-kind of signature mismatch with the UriBuilder returned from resteasy, and I get a NPE - around UriBuilder.fromUri(someUriString) in openstack4j\connectors\resteasy\HttpCommand.java

I got the project/code to work by excluding javax.ws.rs-api dep and rely on resteasy-jaxrs & jaxrs-api for the project's needs (seems to work so far for the rest of the project).

I guess I'm after recommendations on best practice here? Can OpenStack4j be updated to use a newer version of resteasy-jaxrs, which may be compatible with javax.ws.rs-api, and then I could exclude jaxrs-api?

Or is that the wrong approach here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions