-
1. Re: Remote Rest API Webapp
abhijithumbe May 14, 2015 8:59 PM (in response to kocoubb)Hi,
This is caused by transitive dependencies bringing in wrong version of
httpclient
andhttpcore
. Update thepom.xml
to specify the correct version ofhttpcore
andhttpclient
explicitly.==============
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.1</version>
</dependency>
==============
hope it helps..
-
2. Re: Remote Rest API Webapp
kocoubb May 14, 2015 9:10 PM (in response to abhijithumbe)Yes, thank you.
Additionally I had to modify the "org.apache.httpcomponents" module adding these dependencies.
<resources>
<! - <resource-root path = "httpclient-4.1.3-redhat-1.jar" />
<resource-root path = "httpcore-4.1.4-redhat-1.jar" /> ->
<resource-root path = "httpclient-4.2.1.jar" />
<resource-root path = "httpcore-4.2.1.jar" />
<resource-root path = "httpmime-4.1.3-redhat-1.jar" />
<! - Insert resources here ->
</ resources>I would like to do it in the jboss-deployment-structure XML file, It is posible?
-
3. Re: Remote Rest API Webapp
abhijithumbe May 14, 2015 9:50 PM (in response to kocoubb)Hi,
Yes, we can add these dependencies through jboss-deployment-structure.xml file, like as:
=================
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="module.name"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
=================
If you are using war file then this jboss-deployment-structure.xml file will work, but if you are using ear file then you have to add
<
sub-deployment> tag.Go through Class Loading in AS7 - JBoss AS 7.1 - Project Documentation Editor
for more details.