1
I’m trying to access a Webservice
Code:
public void testeWSRestful() {
    Client client = ClientBuilder.newBuilder().build();
    WebTarget target = client.target("http://localhost:8080/teste");
    Response response = target.request().get();
}
And here’s the thing
Error:
java.lang.NoSuchMethodError: org.jboss.resteasy.spi.ResteasyProviderFactory.(Lorg/jboss/resteasy/spi/ResteasyProviderFactory;) V: org.jboss.interceptor.proxy.InterceptorException: java.lang.NoSuchMethodError: org.jboss.resteasy.spi.ResteasyProviderFactory.(Lorg/jboss/resteasy/spi/ResteasyProviderFactory;) V
Maven:
<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-client</artifactId>
    <version>3.0.9.Final</version>
</dependency>
<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jaxb-provider</artifactId>
    <version>3.0.9.Final</version>
</dependency>
<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jaxrs</artifactId>
    <version>3.0.9.Final</version>
</dependency>
Can anyone tell me what’s missing, or where the mistake is?
I did a local test using these same dependency and it worked in a java application. For the message is running an application on Jboss, right? What’s the version of container? If it’s even in the Jboss / Wildfly, try changing the scope of dependencies to
provided.– Bruno César
I’m using the Jboss7 and JEE7 . Change to
providedin mycontoller? Thank you– Mamga
Change to
providedin the application you have this REST client(testeWSRestful) and do the deploy again.– Bruno César