Hi,

I am using App Engine java 8 that exposes a few HTTPS GET API's. When I 
test my API from the browser it works perfectly, but when I create a java 
client from code that calls the API I receive an exception:
" sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target"

I don't know why am I receiving the exception as I have yet set any 
security measures and more surprisingly, the call works fine with my 
browser. 

This is the code I am using for the java client:
Any ideas why is it happening?

URL myUrl = new URL(httpsURL);
HttpsURLConnection conn = (HttpsURLConnection) myUrl.openConnection();
conn.setRequestMethod("GET");
InputStream is = conn.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);

String inputLine;

while ((inputLine = br.readLine()) != null) {
    System.out.println(inputLine);
}

br.close();

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/67bf7134-e4dd-46e1-9637-f508c426a25e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine... Shachar Grembek

Reply via email to