Open kazurayam opened 1 year ago
at java.base/java.nio.file.spi.FileSystemProvider.installedProviders(FileSystemProvider.java:198)
this line reminds me that the materialstore library supports AWS S3 as filesystem. See
I tried to run the same Test Case on Katalon Studio v8.6.8, an older version.
...
The Test Case worked fine on the v8.6.8.
The v9.0.0 runs on Java 17, v8.6.8 runs on Java1.8. This difference might be the case of "Curcular loading of installed provider".
The following lines in the stacktrace would prove that it has something to do with Java version.
at org.codehaus.groovy.vmplugin.v9.Java9.doFindClasses(Java9.java:116)
at org.codehaus.groovy.vmplugin.v9.Java9.getDefaultImportClasses(Java9.java:103)
So what to do next?
Quoting a javadoc from java.nio.file.FileSystems
Factory methods for file systems. This class defines the getDefault method to get the default file system and factory methods to construct other types of file systems. The first invocation of any of the methods defined by this class causes the default provider to be loaded. The default provider, identified by the URI scheme "file", creates the FileSystem that provides access to the file systems accessible to the Java virtual machine. If the process of loading or initializing the default provider fails then an unspecified error is thrown.
The first invocation of the installedProviders method, by way of invoking any of the newFileSystem methods defined by this class, locates and loads all installed file system providers. Installed providers are loaded using the service-provider loading facility defined by the ServiceLoader class. Installed providers are loaded using the system class loader. If the system class loader cannot be found then the extension class loader is used; if there is no extension class loader then the bootstrap class loader is used. Providers are typically installed by placing them in a JAR file on the application class path or in the extension directory, the JAR file contains a provider-configuration file named java.nio.file.spi.FileSystemProvider in the resource directory META-INF/services, and the file lists one or more fully-qualified names of concrete subclass of FileSystemProvider that have a zero argument constructor. The ordering that installed providers are located is implementation specific. If a provider is instantiated and its getScheme returns the same URI scheme of a provider that was previously instantiated then the most recently instantiated duplicate is discarded. URI schemes are compared without regard to case. During construction a provider may safely access files associated with the default provider but care needs to be taken to avoid circular loading of other installed providers. If circular loading of installed providers is detected then an unspecified error is thrown.
This class also defines factory methods that allow a ClassLoader to be specified when locating a provider. As with installed providers, the provider classes are identified by placing the provider configuration file in the resource directory META-INF/services.
If a thread initiates the loading of the installed file system providers and another thread invokes a method that also attempts to load the providers then the method will block until the loading completes.
Quoting from https://github.com/freelunchcap/ParallelGit/issues/9
Calling FileSystemProvider.installedProviders(); by anyone before a single GitFileSystem has been instantiated causes a circular dependency. This also happens when trying to run under GraalVM with node starting jvm. The node process tries to get all the installedProviders causing circular dependency exception.
In the stack trace I noticed
org.codehaus.groovy.vmplugin.v9.ClassFinder.find(
I checked the javadoc of ClassFinder
class:
since 3.0.2
Well, I know, Katalon Studio v9.0.0 migrated to Grovvy 3.0.17, which is newer than 3.0.2.
Coincidence!
I found the source code of Groovy 3.0.17, org.codehaus.groovy.vmplugin.v9 package
I found an interesting stuff in https://github.com/apache/groovy/blob/GROOVY_3_0_17/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java
result.putAll(doFindClasses(URI.create("jrt:/modules/java.base/"), "java", javaPns));
What is the jrt:/modules/java.base/
stuff?
The term module
is Java9 specific thing. Java8 does not have module
. So I need to look at this in more detail.
Using the Katalon Studio Arm64.app (v9.0.0), I executed
then I got the following error: