abashev / vfs-s3

Amazon S3 driver for Apache commons-vfs (Virtual File System) project
Apache License 2.0
93 stars 50 forks source link

Update AWS-S3 Version #79

Closed ptahchiev closed 1 year ago

ptahchiev commented 2 years ago

Hello, I hit the exact same error as these guys here:

https://github.com/aws/aws-sdk-java/issues/2213

This seems to be a know bug which was fixed in version 1.11.925 as per the last comment:

We have updated the AWS SDK for Java, version 1.11.925 and newer, to correct instances where the Apache Xerces library was used incorrectly when parsing XML documents.

Can you please update the version of the AWS SDK. It is blocking me now to use the library.

ptahchiev commented 2 years ago

I tried manually updating the aws version but I got this exception:

 2021-11-19 15:07:15,776 org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/storefront].[dispatcherServlet] [https-jsse-nio-0.0.0.0-8112-exec-3] ERROR: Servlet.service() for servlet [dispatcherServlet] in context with path [/storefront] threw exception [Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.apache.commons.vfs2.provider.UriParser.extractScheme([Ljava/lang/String;Ljava/lang/String;Ljava/lang/StringBuilder;)Ljava/lang/String;] with root cause
java.lang.NoSuchMethodError: org.apache.commons.vfs2.provider.UriParser.extractScheme([Ljava/lang/String;Ljava/lang/String;Ljava/lang/StringBuilder;)Ljava/lang/String;
    at com.github.vfss3.AbstractFileObject$1.run(AbstractFileObject.java:1388)
    at com.github.vfss3.AbstractFileObject$1.run(AbstractFileObject.java:1384)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at com.github.vfss3.AbstractFileObject.getURL(AbstractFileObject.java:1384)
    at com.github.vfss3.S3FileObject.getURL(S3FileObject.java:38)
    at org.apache.commons.vfs2.operations.DefaultFileOperations.getOperation(DefaultFileOperations.java:92)
    at io.nemesis.platform.module.s3.core.service.S3FileStorageService.setFilePermissions(S3FileStorageService.java:83)

when I try to set the permissions of the file:

    @Override
    public void setFilePermissions(FileObject file) throws FileSystemException {
        IAclGetter aclGetter = (IAclGetter) file.getFileOperations().getOperation(IAclGetter.class);
        aclGetter.process();
        Acl fileAcl = aclGetter.getAcl();

        IAclSetter aclSetter = (IAclSetter) file.getFileOperations().getOperation(IAclSetter.class);

        fileAcl.allow(Acl.Group.EVERYONE, Acl.Permission.READ);

        aclSetter.setAcl(fileAcl);
        aclSetter.process();
    }
uabajwa commented 1 year ago

anything on this one. and also can you please let me know if you have any plans to move to aws-sdk v2 ? or at least if sdk 1 is being used it should be at the latest version.