0
我试图使用Apache Commons VFS从http://openexchangerates.org API获取数据。我收到的错误意味着它试图使用SSL验证 - 而不是我通过我的网站计划提供的东西。有没有办法可以'强制'VFS使用http而不是https?阻止Apache Commons VFS尝试使用SSL
巨大的堆栈跟踪的相关要点如下包括 - 如果需要,可以提供更多的信息:
org.apache.commons.vfs2.VFS.getManager().resolveFile("http://openexchangerates.org/api/latest.json?api_id=MY_APP_ID")
org.apache.commons.vfs2.FileSystemException: Could not connect to HTTP server on "openexchangerates.org".
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
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
感谢您的解释! – Serenthia