Git Product home page Git Product logo

Comments (14)

subnetmarco avatar subnetmarco commented on July 28, 2024

This seems to be a problem with the HttpClient version used, what version are you running? Is it >= 4.3.5. ?

from unirest-java.

tortilaman avatar tortilaman commented on July 28, 2024

I've updated to the most recent versions since I posted this. I think the versions stated on the mashape website (and not github) are out of date and that was the issue. My current dependencies in gradle (as maven isn't working) are:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('C:/Users/torti_000/Documents/Recip.ie/libs/unirest-java-1.3.26.jar')
    compile 'org.apache.httpcomponents:httpclient:4.3.5'
    compile 'org.apache.httpcomponents:httpmime:4.3.5'
    compile 'org.apache.httpcomponents:httpasyncclient:4.0.2'
}

from unirest-java.

subnetmarco avatar subnetmarco commented on July 28, 2024

Oh! You're right, sorry for the confusion I'm updating the website now. But does it work with version 4.3.5 ?

from unirest-java.

tortilaman avatar tortilaman commented on July 28, 2024

It's not working with version 4.3.5 unfortunately. Here's my logcat output. The first line is the error that's causing all this I think.

11-25 11:46:15.831    5490-5741/com.akqa.glass.recipie E/dalvikvm﹕ Could not find class 'org.apache.http.impl.client.CloseableHttpClient', referenced from method com.mashape.unirest.http.Unirest.shutdown
11-25 11:46:15.831    5490-5741/com.akqa.glass.recipie W/dalvikvm﹕ VFY: unable to resolve check-cast 451 (Lorg/apache/http/impl/client/CloseableHttpClient;) in Lcom/mashape/unirest/http/Unirest;
11-25 11:46:15.831    5490-5741/com.akqa.glass.recipie D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0006
11-25 11:46:15.839    5490-5741/com.akqa.glass.recipie I/dalvikvm﹕ Could not find method org.apache.http.client.methods.HttpRequestBase.releaseConnection, referenced from method com.mashape.unirest.http.HttpClientHelper.request
11-25 11:46:15.839    5490-5741/com.akqa.glass.recipie W/dalvikvm﹕ VFY: unable to resolve virtual method 1095: Lorg/apache/http/client/methods/HttpRequestBase;.releaseConnection ()V
11-25 11:46:15.839    5490-5741/com.akqa.glass.recipie D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0012
11-25 11:46:15.839    5490-5741/com.akqa.glass.recipie I/dalvikvm﹕ Could not find method org.apache.http.client.methods.HttpRequestBase.releaseConnection, referenced from method com.mashape.unirest.http.HttpClientHelper.request
11-25 11:46:15.839    5490-5741/com.akqa.glass.recipie W/dalvikvm﹕ VFY: unable to resolve virtual method 1095: Lorg/apache/http/client/methods/HttpRequestBase;.releaseConnection ()V
11-25 11:46:15.839    5490-5741/com.akqa.glass.recipie D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0021
11-25 11:46:15.847    5490-5741/com.akqa.glass.recipie I/dalvikvm﹕ Could not find method org.apache.http.client.config.RequestConfig.custom, referenced from method com.mashape.unirest.http.options.Options.refresh
11-25 11:46:15.847    5490-5741/com.akqa.glass.recipie W/dalvikvm﹕ VFY: unable to resolve static method 1069: Lorg/apache/http/client/config/RequestConfig;.custom ()Lorg/apache/http/client/config/RequestConfig$Builder;
11-25 11:46:15.847    5490-5741/com.akqa.glass.recipie D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0020
11-25 11:46:15.847    5490-5741/com.akqa.glass.recipie D/dalvikvm﹕ DexOpt: unable to opt direct call 0x070c at 0x49 in Lcom/mashape/unirest/http/options/Options;.refresh
11-25 11:46:15.847    5490-5741/com.akqa.glass.recipie W/dalvikvm﹕ Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/mashape/unirest/http/options/Options;
11-25 11:46:15.855    5490-5741/com.akqa.glass.recipie W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0x4162bbd8)
11-25 11:46:15.855    5490-5742/com.akqa.glass.recipie D/PARSER﹕ Inside Parser
11-25 11:46:15.855    5490-5742/com.akqa.glass.recipie I/dalvikvm﹕ Rejecting re-init on previously-failed class Lcom/mashape/unirest/http/options/Options; v=0x0
11-25 11:46:15.855    5490-5742/com.akqa.glass.recipie W/dalvikvm﹕ threadid=12: thread exiting with uncaught exception (group=0x4162bbd8)

from unirest-java.

IslamBesto avatar IslamBesto commented on July 28, 2024

I have the same problem , did you fix it ?

from unirest-java.

subnetmarco avatar subnetmarco commented on July 28, 2024

Can you try to run mvn dependency:tree and see if another library is overriding the required dependencies org.apache.httpcomponents:httpclient:jar:4.3.6 or org.apache.httpcomponents:httpasyncclient:jar:4.0.2 with a different, previous, version?

from unirest-java.

CrazyPython avatar CrazyPython commented on July 28, 2024

+1

from unirest-java.

zakyg avatar zakyg commented on July 28, 2024

+1

also getting these messages from gradle:

Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency commons-logging:commons-logging:1.1.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.json:json:20140107 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency commons-logging:commons-logging:1.1.3 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.json:json:20140107 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage with jarjar to change the class packages

from unirest-java.

vineetvermait avatar vineetvermait commented on July 28, 2024

I am also facing the same issue...:(

any fix..??

from unirest-java.

mittalharsh54 avatar mittalharsh54 commented on July 28, 2024

+1
any fix??

from unirest-java.

darkfalt avatar darkfalt commented on July 28, 2024

+1

from unirest-java.

CrazyPython avatar CrazyPython commented on July 28, 2024

Three years and no response...

from unirest-java.

benlevine13 avatar benlevine13 commented on July 28, 2024

+1

from unirest-java.

ryber avatar ryber commented on July 28, 2024

We are now on Apache HttpClient 4.5.6. Not sure if this is still an issue or what Unirest could even do about it if it's a Apache problem

from unirest-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.