Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No suitable client type found to create storage client #22

Open
ptahchiev opened this issue Oct 5, 2020 · 1 comment
Open

No suitable client type found to create storage client #22

ptahchiev opened this issue Oct 5, 2020 · 1 comment

Comments

@ptahchiev
Copy link
Contributor

When I try to use it I get the following exception:

 2020-10-05 18:31:11,446 org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/storefront].[dispatcherServlet] [http-nio-8111-exec-1] ERROR: Servlet.service() for servlet [dispatcherServlet] in context with path [/storefront] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: No suitable client type found to create storage client] with root cause
java.lang.RuntimeException: No suitable client type found to create storage client
	at com.celarli.commons.vfs.provider.google.GCSClientFactory.lambda$getClient$0(GCSClientFactory.java:27)
	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
	at com.celarli.commons.vfs.provider.google.GCSClientFactory.getClient(GCSClientFactory.java:27)
	at com.celarli.commons.vfs.provider.google.GCSFileProvider.doCreateFileSystem(GCSFileProvider.java:39)
	at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:117)

Seems like GcsFileSystemConfigBuilder.getInstance().getClientType(fileSystemOptions); returns a nulltype and then ClientType.getByType(type); also returns null. Maybe I am doing something wrong. Can you help me please?

@ptahchiev
Copy link
Contributor Author

OK, I found it:

        FileSystemOptions options = new FileSystemOptions();
        GcsFileSystemConfigBuilder configBuilder = GcsFileSystemConfigBuilder.getInstance();
        configBuilder.setClientType(options, 1);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant