尝试通过java调用Watson Visual Recognition Service时,我收到SSL握手错误。任何帮助将受到高度赞赏。
public static void main(String[] args) throws FileNotFoundException {
VisualRecognition service = new VisualRecognition(VisualRecognition.VERSION_DATE_2016_05_20);
service.setApiKey("api_key");
InputStream imagesStream = new FileInputStream("C:\\fruitbowl.jpg");
ClassifyOptions classifyOptions =
new ClassifyOptions.Builder().imagesFile(imagesStream).imagesFilename("fruitbowl.jpg")
.parameters(
"{\"classifier_ids\": [\"fruits_1462128776\", + \"SatelliteModel_6242312846\"],\"threshold\": 0.6}")
.build();
ClassifiedImages result = service.classify(classifyOptions).execute();
System.out.println(result);
}}
线程“main”中的异常java.lang.RuntimeException:javax.net.ssl.SSLHandshakeException:收到致命警报:handshake_failure
在com.ibm.watson.developer_cloud.service.WatsonService $ 1.execute(WatsonService.java:176)
在editcsvfile.csv.MainTest.main(MainTest.java:22)
引起:javax.net.ssl.SSLHandshakeException:收到致命警报:handshake_failure