このhttps://www.cityofathens.gr/khe/epixeiriseis/json?shop_id=49087ページにJavaクライアントを使用していくつかのjsonデータを読み込もうとしています。奇妙なことは、私は自分のコンピュータ上でそれを実行すると、それだけで正常に動作していることですが、私は、VMにjarファイルを実行すると、私がした後、このSSLHandshakeExceptionが1台のコンピュータを使用していて、他のコンピュータで動作しています
String url="https://www.cityofathens.gr/khe/epixeiriseis/json?shop_id=49087";
BufferedReader in = new BufferedReader(new InputStreamReader(new URL(url).openStream()));
String result=IOUtils.toString(in);
System.out.println(result);
を使用しています
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
私は、このエラーを与えていますいくつかの掘削私はHttpsURLConnectionを使用しようとしました
String url="https://www.cityofathens.gr/khe/epixeiriseis/json?shop_id=49087";
URL myurl = new URL(url);
HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection();
InputStream ins = con.getInputStream();
InputStreamReader isr = new InputStreamReader(ins);
BufferedReader in = new BufferedReader(isr);
しかし、エラーは同じままです!
助けてくださいか? ありがとう
ヘンリー、Linuxのルートとしてルート@欠落しているルート証明書 – Henry
のように見えますか?クライアントまたはサーバーの面白いことに、私の古いPC上でそれを試してみましたか、それとも(Ubuntuを使用しているすべて3) –