我正在尝试使用 Apache Commons VFS从http://openexchangerates.org API 获取数据。我收到的错误表明它正在尝试使用 SSL 验证——这不是我通过网站计划提供的。有没有办法可以“强制”VFS 使用 http 而不是 https?
巨大堆栈跟踪的相关点包括在下面 - 如果需要,可以提供更多信息:
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