Skip to content

Challenge: ClientClosedTest should not use same path to three standalone targets #402

@dmatej

Description

@dmatej
@Path("/")
@RegisterRestClient(baseUri = "http://localhost:8080")
public interface StringClient { ... }

@Path("/")
@RegisterRestClient(baseUri = "http://localhost:8080")
public interface CloseableClient extends StringClient, Closeable { ... }

@Path("/")
@RegisterRestClient(baseUri = "http://localhost:8080")
public interface AutoCloseableClient extends StringClient, AutoCloseable { ... }

The test targets something different, so it should not be a problem.

Yet the validation error; Jersey could avoid validation of client's classes, but I believe validating them is not incorrect.

  WebModule[/ClientClosedTest]StandardWrapper.Throwable
org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.
[[FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and "@Produces" annotations at Java methods public abstract java.lang.String org.eclipse.microprofile.rest.client.tck.interfaces.cdi.scoped.StringClient.executeGet() and public abstract java.lang.String org.eclipse.microprofile.rest.client.tck.interfaces.cdi.scoped.StringClient.executeGet() at matching regular expression /. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source='org.glassfish.jersey.server.model.RuntimeResource@713ef70', [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and "@Produces" annotations at Java methods public abstract java.lang.String org.eclipse.microprofile.rest.client.tck.interfaces.cdi.scoped.StringClient.executeGet() and public abstract java.lang.String org.eclipse.microprofile.rest.client.tck.interfaces.cdi.scoped.StringClient.executeGet() at matching regular expression /. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source='org.glassfish.jersey.server.model.RuntimeResource@713ef70', [FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and "@Produces" annotations at Java methods public abstract java.lang.String org.eclipse.microprofile.rest.client.tck.interfaces.cdi.scoped.StringClient.executeGet() and public abstract java.lang.String org.eclipse.microprofile.rest.client.tck.interfaces.cdi.scoped.StringClient.executeGet() at matching regular expression /. These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source='org.glassfish.jersey.server.model.RuntimeResource@713ef70']
        at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:387)
        at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:309)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
        at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:232)
        at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:308)
        at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:273)
        at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:315)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:154)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions