Community

Server problems using Java Code sample (Server redirected too many times)

Hi,

I have downloaded the sample Java code from https://ocrsdk.com

I had given the application id, application password and the proxy details. But I'm not able to convert the document.

The error message that I am getting is as follows.

 Exception occured:Server redirected too many  times (20)

java.net.ProtocolException: Server redirected too many  times (20)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at java.net.HttpURLConnection.getResponseCode(Unknown Source)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)

at com.abbyy.ocrsdk.Client.getResponse(Client.java:253)

at com.abbyy.ocrsdk.Client.postFileToUrl(Client.java:238)

at com.abbyy.ocrsdk.Client.processImage(Client.java:36)

at TestApp.performRecognition(TestApp.java:174)

at TestApp.main(TestApp.java:45)

 

Please let me know your thoughts on this!

0

Comments

2 comments

  • Avatar
    Koen de Leijer

    Hi

    I/we did not have any trouble getting the samples to work in both Java and Python (your other post) ,
    can you provide the complete source-code (excl license information) you are using?

    Best regards
    Koen de Leijer

    0
  • Avatar
    Oksana Serdyuk

    @Koen, thanks for your answers and the attitude!

    @Viji, according to our database, the requests from your application do not come to ABBYY side. Have you specified the correct authentication credentials:

    • Application ID is a human friendly name which you entered when creating the application
    • Application Password is a password to the application that should have been sent together with the Application ID right after the application registration

    in the code sample?

    Also please see the Stackoverflow developer’s forum, where similar issues are also discussed.

    And if the persists, kindly send us the logs from the Fiddler debugger. For this please download and install Fiddler and let it run and capture traffic while you reproduce the problem. Then press the Save button on the top toolbar to save a .saz-file and send it to CloudOCRSDK@abbyy.com.

    0

Please sign in to leave a comment.