Dependency is not resolved using pom.xml file (unirest-java lib)

Comments

4 comments

  • Support

    Hi Sumit,

    I have updated the JAVA Readme with an alternative build instructions.
    Please let me know how you get along.

    0
    Comment actions Permalink
  • sumit thakur

    thanks ,

    it was error due to proxy server restrict me to add some dependency.

    But now getting another issue:


    Exception in thread "pool-1-thread-1" java.lang.NoSuchFieldError: INSTANCE
    at org.apache.http.impl.conn.HttpClientConnectionOperator.<init>(HttpClientConnectionOperator.java:74)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:151)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:138)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:114)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:105)
    at com.mashape.unirest.http.options.Options.refresh(Options.java:70)
    at com.mashape.unirest.http.options.Options.<clinit>(Options.java:38)
    at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:170)
    at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:134)
    at com.mashape.unirest.request.BaseRequest.asString(BaseRequest.java:55)
    at io.apimatic.examples.http.client.UnirestClient.executeAsStringAsync(UnirestClient.java:49)
    at io.apimatic.examples.controllers.SimpleMyCalculatorController$4.run(SimpleMyCalculatorController.java:90)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:724)

    Please help me to solve this issue .
    Also do you have any example to understand api call using SDK.

    Thanks & Regards
    Sumit Thakur

    0
    Comment actions Permalink
  • sumit thakur

    Can we also use IP address instance of domain name????

    0
    Comment actions Permalink
  • Support

    Hi,

    The domain authority from the URL is used for constructing package names e.g., api.example.com becomes com.example.api. You can give it a proper Url for code generation and later edit the Configuration.java file and put in an IP address.

    Let me know if this works for you.

    Regards,
    Zeeshan

    0
    Comment actions Permalink

Please sign in to leave a comment.