6 Replies Latest reply on Oct 5, 2016 10:23 AM by Raciel Gutierrez Andaya

    JBoss 6.4 EAP - Apache HttpComponents being exported in resteasy-jaxrs module

    michael sosa Newbie

      So I came across a class loader error when using JBoss 6.4.  We need to use apache httpcore 4.4.1, but apache httpcore 4.3.3 is included in 6.4.  This previously wasn't a problem when we were using jboss 6.2 because the resteasy-jaxrs module.xml did not export httpcore library. 

       

      I found an issue that seemed to also be caused by this jar being exported in the module:

      [WFLY-2634] Classloading Problem with Apache httpclient - JBoss Issue Tracker

       

      To test it out I removed the export true from the module and JBoss picked the right jar that I was including.  If I don't remove this line I get this error

       

      Caused by: java.lang.NoSuchMethodError: org.apache.http.util.Asserts.check(ZLjava/lang/String;Ljava/lang/Object;)V

       

      Which is odd because looking a 4.3.3 there is a method with that signature.  Is there any reason this jar is now being exported?  I also tried exclusion but when I do this I will also have to exclude resteasy.