I am trying to write simple RESTEasy client. Below given is sample code:
Client client = ClientBuilder.newBuilder().build();
WebTarget target = client.target
At last after banging my head for couple of days, I could resolve these issues.
Error: "java.lang.NoSuchMethodError: org.jboss.resteasy.spi.ResteasyProviderFactory.(Lorg/jboss/resteasy/spi/ResteasyProviderFactory;)"
Solution: I resolved this issue, by adding more resteasy modules in exclusion list inside jboss-deployment-structure.xml. My current state of jboss-deployment-structure.xml is as:
I believe, it could have worked by simply excluding modules "org.jboss.resteasy.resteasy-jaxrs" and "org.jboss.resteasy.resteasy-cdi". But I did not try further as I faced another issue. You can try by removing un-necessary exclusions.
Error: "Caused by: java.lang.NoSuchMethodError: javax.ws.rs.core.Response.readEntity(Ljava/lang/Class;)Ljava/lang/Object;"
Solution: JBOSS EAP 6.1, is bundled with default resteasy distribution. I downloaded latest resteasy jax-rs implementation (resteasy-jaxrs-3.0.7.Final-all.zip) from location.
It comes with zip file called resteasy-jboss-modules-3.0.7.Final.zip. Unzip this file inside modules/system/layers/base/ directory of the JBoss EAP 6.1 distribution. This will overwrite some of the existing files there. This will resolve second issue.
Hope this information would help others.