Open rashmimaharana opened 1 day ago
Hi @rashmimaharana @SergiyBojko,
Your bug reports seems to be related.
Would you guys be able to provide JUnit test cases for them? Perhaps something with TestContainers?
We would be really happy to receive pull requests with fixes for this as we have limited resources at the moment.
@rashmimaharana We haven't had a chance to look into this yet. Can you try the code you have with the 1.0.6-SNAPSHOT version which is published in Maven Central Snapshots? There was a bug related to the properties not being passed from the Files.newFileSystem
down to the S3FileSystem
which could have been related to the problem you are seeing.
Hi @carlspring
Bug Description
I have been trying to integrate this file system with Apache Mina sshd
2.12.1
. But its failing. Here is the code snippet that I configured. If I pass the bucket name as plain with out any/
, its throwing error asthis.fileStore
isnull
and when i passed the bucket with/mybucket/
, it's connecting but giving error as below. I am usingorg.carlspring.cloud.aws:s3fs-nio:1.0.5
.Steps To Reproduce
2.12.1
.org.carlspring.cloud.aws:s3fs-nio:1.0.5
.FileSystemFactory
like below and integrate with Apache Mina2.12.1
.public FileSystemFactory createFileSystemFactory(String bucketName) throws IOException { Map<String, ?> env = ImmutableMap.<String, Object>builder().put(ACCESS_KEY, "AKIAX*") .put(SECRET_KEY, "hnBpn**") .put(REGION,"us-east-1") .build(); FileSystem fileSystem = FileSystems.newFileSystem(URI.create("s3:///"), env, Thread.currentThread() .getContextClassLoader()); Path bucketPath = fileSystem.getPath(bucketName); return new VirtualFileSystemFactory(bucketPath); }
full output of mvn -version (or java -version) Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: C:\Users\rrmahar\Documents\binary\apache-maven-3.9.5 Java version: 17.0.11, vendor: Azul Systems, Inc., runtime: C:\Program Files\Zulu\zulu-17 Default locale: en_IN, platform encoding: Cp1252 OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
java -version openjdk version "17.0.11" 2024-04-16 LTS OpenJDK Runtime Environment Zulu17.50+20-SA (build 17.0.11+9-LTS) OpenJDK 64-Bit Server VM Zulu17.50+20-SA (build 17.0.11+9-LTS, mixed mode, sharing)
-nio2-thread-9] o.a.s.server.session.ServerSessionImpl : exceptionCaught(ServerSessionImpl[rrmahar@/[0:0:0:0:0:0:0:1]:50619])[state=Opened] NullPointerException: Cannot invoke "org.carlspring.cloud.storage.s3fs.S3FileStore.name()" because "this.fileStore" is null
-nio2-thread-6] o.a.s.server.session.ServerSessionImpl : exceptionCaught(ServerSessionImpl[rrmahar@/[0:0:0:0:0:0:0:1]:50662])[state=Opened] UnsupportedOperationException: Not a directory: s3://AKIAXMZ***@s3.amazonaws.com/mybucket/