Hello,

For a while now I've been attempting to get a webapp working that uses
a custom NIO.2 FileSystem implementation (
https://github.com/Upplication/Amazon-S3-FileSystem-NIO2). It seems
like the Service Provider Interface isn't working when the war is
deployed in tomcat resulting in a
 java.nio.file.ProviderNotFoundException when
FileSystems.newFileSystem() is called for and URI like
"s3://access_key:secret_...@s3.amazonaws.com/bucket".

All googling and code debugging seems to point at 
java.nio.file.spi.FileSystemProvider.loadInstalledProviders()

Specifically 
ServiceLoader<FileSystemProvider> sl =
ServiceLoader.load(FileSystemProvider.class,
ClassLoader.getSystemClassLoader());

This attempts to find all resources (inside jars in the classpath) that
match "/META-INF/services/java.nio.file.spi.FileSystemProvider"

Generally, in the Eclipse IDE, this works like a charm but once
deployed in tomcat the FileSystemProviders aren't found. Might this
point towards an issue with tomcat's custom ClassLoader strategy?

Has anyone else run into problems with this and perhaps found a
fix/workaround? Or did I miss anything in my hunt for a solution?



Kind regards,

Syte

PS: Software versions used:
Tomcat Version: Apache Tomcat/7.0.57
JVM Version: 1.7.0_80-b15
JVM Vendor: Oracle Corporation

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to