Graal-js 抛出文件系统提供程序错误

Graal-js is throwing File system provider error

我正在尝试 运行 简单的代码 - 添加了本文档中提到的所有依赖项:https://github.com/graalvm/graal-js-jdk11-maven-demo/blob/master/pom.xml

    ScriptEngine graaljsEngine = new ScriptEngineManager().getEngineByName("graal.js");
    try {
        graaljsEngine.eval(SOURCE);
    } catch (ScriptException e) {
        e.printStackTrace();
    }

我仍然看到以下错误:

  org.graalvm.polyglot.PolyglotException: java.util.ServiceConfigurationError: 
   java.nio.file.spi.**FileSystemProvider**: Provider 
   org.apache.sshd.client.subsystem.sftp.SftpFileSystemProvider could not be instantiated

at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:803)
at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:721)
at java.base/java.util.ServiceLoader.next(ServiceLoader.java:1394)
at java.base/java.nio.file.spi.FileSystemProvider.loadInstalledProviders(FileSystemProvider.java:155)
at java.base/java.nio.file.spi.FileSystemProvider.run(FileSystemProvider.java:205)
at java.base/java.nio.file.spi.FileSystemProvider.run(FileSystemProvider.java:202)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.nio.file.spi.FileSystemProvider.installedProviders(FileSystemProvider.java:202)
at com.oracle.truffle.polyglot.FileSystems.findDefaultFileSystemProvider(FileSystems.java:205)
at com.oracle.truffle.polyglot.FileSystems.newDefaultFileSystem(FileSystems.java:100)
at com.oracle.truffle.polyglot.FileSystems$LanguageHomeFileSystem.<init>(FileSystems.java:1057)
at com.oracle.truffle.polyglot.FileSystems.newLanguageHomeFileSystem(FileSystems.java:112)
at com.oracle.truffle.polyglot.PolyglotEngineImpl.createContext(PolyglotEngineImpl.java:1584)
at org.graalvm.polyglot.Context$Builder.build(Context.java:1627)
at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.createDefaultContext(GraalJSScriptEngine.java:304)
at com.oracle.truffle.js.scriptengine.GraalJSBindings.initContext(GraalJSBindings.java:89)
at com.oracle.truffle.js.scriptengine.GraalJSBindings.requireContext(GraalJSBindings.java:84)
at com.oracle.truffle.js.scriptengine.GraalJSBindings.entrySet(GraalJSBindings.java:170)
at java.base/java.util.AbstractMap.containsKey(AbstractMap.java:144)
at javax.script.SimpleScriptContext.getAttribute(SimpleScriptContext.java:158)
at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.createSource(GraalJSScriptEngine.java:401)
at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:397)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)

解决方案:Bouncy Castle 安全提供程序无法向 JCE 注册provider.tried将 JDK11 的 sshd-core 依赖库版本降级到 1.2