Welcome to the new Box Support website. Check out all the details here on what’s changed.

Error when using box-java-sdk

New post

Comments

5 comments

  • ramasanka

    I get a similar error. This exact code worked fine yesterday!!

    com.box.sdk.BoxAPIException: Couldn't connect to the Box API due to a network error.
    at com.box.sdk.BoxAPIRequest.writeBody(BoxAPIRequest.java:320)
    at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:389)
    at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:209)
    at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:184)
    at com.box.sdk.BoxAPIConnection.refresh(BoxAPIConnection.java:464)
    at com.box.sdk.BoxAPIConnection.getAccessToken(BoxAPIConnection.java:266)
    at QBox.setupBoxAPIConnection(QBox.java:71)
    at QBox.(QBox.java:45)
    at QBox.main(QBox.java:35)
    Caused by: 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
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
       

     

    0
    Comment actions Permalink
  • Box Product Support

    I am facing the exact same issue. Please let me know if you got the solution to this problem. It has become very critical for us.

    0
    Comment actions Permalink
  • Box Product Support

    Hi,

    I am also facing same network connection issue for box.

    If you found any solution for this, please let me know.

    It would be appreciate.

    Regards,

    Santhosh

    0
    Comment actions Permalink
  • Murtza

        I am not 100% sure why you are seeing this error. Please take a look at this StackOverflow thread, which has a few potential fixes for this issue. In addition to the fixes suggested on StackOverflow, please take a look at this thread from this forum, which might be related to this issue.

     

     

    0
    Comment actions Permalink
  • lguo

    See my post https://community.box.com/t5/Developer-Forum/Box-Java-SDK-Connection-Problem-SSLHandshakeException/m-p/27133/highlight/true#M1288 for the same error. It always leads me to research the valid certification and firewall, but it ends with no luck. For my case, it is the security software "Netscope Client" on my machine blocking the access and causing the above error.  


    It is most likely the same issue and you have to disable the security software. I would also suggest to run your same code on different computers and networks since it definitely can work. The same code is very likely running fine on your personal computer/network without these errors. Hope it is as easy as disabling a piece of security software or at least can help you narrow down the cause of the problem.

    0
    Comment actions Permalink

Please sign in to leave a comment.