Error when sending JSONRequest - Forum - Rollbase - Progress Community

Error when sending JSONRequest

 Forum

Error when sending JSONRequest

This question is answered

If i try to use rbv_api.sendJSONRequest i get an error

ex:

headers["Authorization"]="Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
var onehublistfilesurl="ws-api.onehub.com/.../1038835141.json";
var dirlist=rbv_api.sendJSONRequest(onehublistfilesurl, null, "GET", null, null, null, headers);

I get this error form Rollbase:

"unable to find valid certification path to requested target (line #6) in formula"

It is no problem to get the correct answer when i use "Advanced Rest Client Application" to test this in Chrome?

Any suggestions?

Verified Answer
All Replies
  • Hello,

    Just a quick reply.

    The error message seems to suggest that that the Rollbase instance is not aware of the SSL certificate.

    Perhaps, there might be a way that you could register the certificate so that it recognizes it.

    BTW, why is the Authorization header using "Bearer" instead of "Basic"? Are you implementing your own authentication?

    If you are using regular BASIC authentication, then you should be able to use the username and password parameters.

    I hope this helps.

  • I think you need to import the ssl certificate to the trusted store. Check this out - blogs.oracle.com/.../unable_to_find_valid_certification

    OR

    After I debug this I found the exact exception and solution

    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    Here is the same issue discussed on Stackoverflow-

    http://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore

    Since Smartsys is on public hosting, Please log a case with support.

  • BTW the link you were trying to hit is basically secured by a certificate signed by Go Daddy.

    So just an FYI-

    This is why it is not working: tozny.com/.../godaddys-ssl-certs-dont-work-in-java-the-right-solution

    If the java client is running inside a JRE 8 then it automatically fixes the problem.

  • Thank you, then this is the reaseon why it Works in a browser.

    But how can i fix this, so i can use a trigger in a batch-job form Rollbase?

    Can you help me to clearify this?

  • This has to be fixed by us. Please raise a support case

  • A supportcase was registred yesterday. Se casno: 332446.

    When can this be fixed???

  • A defect # 29036  has been logged against this issue.

    Will update you soon with more details on fix.

    -Mani.

  • This is fixed now. Please try now