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

Can not register jersey client in guice #101

Open
pavelkokush opened this issue Jan 5, 2017 · 0 comments
Open

Can not register jersey client in guice #101

pavelkokush opened this issue Jan 5, 2017 · 0 comments

Comments

@pavelkokush
Copy link

Given
new class

@Path("/")
public interface SomeResource
{
	@GET
	Integer get();
}

and client registration method in TestModule

    @Provides
    @Singleton
    public SomeResource someClient()
    {
        Client c = ClientBuilder.newClient(new ClientConfig());
        return WebResourceFactory.newResource(SomeResource.class, c.target(""));
    }

and new dependency

        <dependency>
            <groupId>org.glassfish.jersey.ext</groupId>
            <artifactId>jersey-proxy-client</artifactId>
            <version>${dep.jersey.version}</version>
            <scope>test</scope>
        </dependency>

Then:
GuiceBundleTest, HK2LinkerTest, InjectedIntegrationTest, InjectedResourcesTest are failed.

(Actually I got a bit different error in my app, but seems reason same: it tried to initialize RuntimeDelegate before guice ServiceLocatorFactory installed)

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

No branches or pull requests

1 participant