Java Question java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facepp/http/HttpRequests;

Discussion in 'Libraries developers questions' started by DonManfred, Jan 24, 2015.

  1. DonManfred

    DonManfred Expert Licensed User

    i´m writing a wrapper for face++ using the jar they provide.

    the example shows the use of a HttpRequests wrapper
    Open Declaration com.facepp.http.HttpRequests
    new HttpRequests(apiKey, apiSecret).request(
    "detection""detect", postParameters)
    new HttpRequests(apiKey, apiSecret).train()

    new Thread(new Runnable() {
    public void run() {
                    HttpRequests httpRequests = new HttpRequests(
    The wrapper compiles fine with slc but when i want to use it in a b4a project i got the above error

    I tried
    import com.facepp.http.*s;
    import com.facepp.error.*;
    import com.facepp.result.*;
    import com.facepp.http.HttpRequests;
    import com.facepp.http.PostParameters;
    import com.facepp.error.FaceppParseException;
    import com.facepp.result.FaceppResult;
    Everytime the same result.
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Open their jar with jd-gui and check if the HttpRequests class actually exists inside that jar.
  3. DonManfred

    DonManfred Expert Licensed User

    Seem that this class do exists.

  4. Erel

    Erel Administrator Staff Member Licensed User

    Have you added the @DependsOn annotation? Can you post the full error message. Sometimes the top message can be misleading.
  5. DonManfred

    DonManfred Expert Licensed User

  6. Erel

    Erel Administrator Staff Member Licensed User

    Not sure why it happens. Note that you don't really need a library for this. They provide REST api which doesn't look too complicated.
  7. DonManfred

    DonManfred Expert Licensed User

    They provide a Android jar too. Why should i write my own rest solution when the provide a jar with everything included. I just need a wrapper. And writing the wrapper was much less work than building a rest solution
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice