Comments (14)
This seems to be a problem with the HttpClient version used, what version are you running? Is it >= 4.3.5.
?
from unirest-java.
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.
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.
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.
I have the same problem , did you fix it ?
from unirest-java.
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.
+1
from unirest-java.
+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.
I am also facing the same issue...:(
any fix..??
from unirest-java.
+1
any fix??
from unirest-java.
+1
from unirest-java.
Three years and no response...
from unirest-java.
+1
from unirest-java.
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)
- bug query get with version 4 HOT 5
- Jackson MismatchedInputException for successful response with no body, after migrating to Unirest 4 HOT 2
- Automatic Retries not being used HOT 2
- MockClient: allow fine grained request verification or "un-expected" routes HOT 2
- Request cancellation (such as download cancellation) HOT 2
- Can't turn auto retries standard on HOT 10
- Incorrect Unirest version in README.md HOT 1
- Incorrect link to Interceptor file HOT 1
- Supported windows versions
- Configured HttpClient.Version ignored HOT 10
- MockClient: Mocking same route with different methods only invokes first registered/expected mocking response HOT 2
- multipart/form-data POST is missing content types HOT 6
- How to set read timeout duration HOT 4
- Can we add a response failure retry function? HOT 1
- Making header method to avoid redundant typing. HOT 2
- Make all HttpRequest.asObject work the same way HOT 2
- Strange behavior of response.getRequestSummary().getUrl() HOT 3
- Support the Partitioned flag on cookies HOT 1
- Is Unirest supported Server-Sent Events? HOT 2
- Requests are cancelled unexpectedly - connectTimeout limits request duration HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unirest-java.