The problem is in the commons-httpclient-3.1 jar witch is not present in the jboss server, to get arround the problem you cad add it as
a module in your JBoss server at: <JBossAS7_HOME>/modules/org/apache/commons/httpclient/main directory. Basically you need to create the directory structure, put the commons-httpclient-3.1.jar in the main directory, and create a modules.xml file as bellow
<module xmlns="urn:jboss:module:1.0" name="org.apache.commons.httpclient">
<!-- Insert resources here -->
is need add "org.apache.commons.httpclient" dependency for "org.jboss.resteasy.resteasy-jaxrs" module.
I had the same problem.
fixed adding commons-httpclient-3.1.jar as dependency into my pom.
I did the following to fix this problem:
- Add "Dependencies: org.apache.httpcomponents" to my war's META-INF/MANIFEST.MF file.
- Specify HttpClient4 in Resteasy's creation of the rest proxy (3.1 is still the default even though AS7 does not come with it).
Here is my code:
YahooPlacefinderApi client = ProxyFactory.create(
ApacheHttpClient4Executor is a resteasy class, so you don't have to add any http client libraries to your war.
thanks for your clean solution for the client, I'll remove http-client-3.
I also want to configure resteasy to use httpclient4 on the service side:
I have some annotated classes exposed as rest services.
Can you help me on this point?
I also have some rest services and haven't done any extra configuration. HttpClient isn't used to provide rest services, just clients.
My rest service uses a rest client