saalfeldlab / n5-utils

simple standalone BigDataViewer for multiple N5 (or HDF5) datasets
Other
8 stars 16 forks source link

Fix AWS S3 support #20

Closed igorpisarev closed 4 years ago

igorpisarev commented 4 years ago

AWS S3 SDK and Google Cloud SDK depend on different versions of jackson, which leads to conflicts at runtime. Previously, attempting to open an AWS S3 link in n5-view generated the following NoSuchMethod exception. Excluding the transitive dependencies and specifying jackson-databind dependency explicitly fixes it.

Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
    at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:537)
    at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:448)
    at com.amazonaws.internal.config.InternalConfig.<clinit>(InternalConfig.java:43)
    at com.amazonaws.internal.config.InternalConfig$Factory.<clinit>(InternalConfig.java:304)
    at com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:142)
    at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:137)
    at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:100)
    at com.amazonaws.ClientConfiguration.<clinit>(ClientConfiguration.java:65)
    at com.amazonaws.ClientConfigurationFactory.getDefaultConfig(ClientConfigurationFactory.java:46)
    at com.amazonaws.ClientConfigurationFactory.getConfig(ClientConfigurationFactory.java:36)
    at com.amazonaws.client.builder.AwsClientBuilder.resolveClientConfiguration(AwsClientBuilder.java:163)
    at com.amazonaws.client.builder.AwsClientBuilder.access$000(AwsClientBuilder.java:52)
    at com.amazonaws.client.builder.AwsClientBuilder$SyncBuilderParams.<init>(AwsClientBuilder.java:411)
    at com.amazonaws.client.builder.AwsClientBuilder.getSyncClientParams(AwsClientBuilder.java:354)
    at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
    at org.janelia.saalfeldlab.N5Factory.createN5S3(N5Factory.java:318)
    at org.janelia.saalfeldlab.N5Factory.createN5(N5Factory.java:248)
    at org.janelia.saalfeldlab.N5Factory.createN5Reader(N5Factory.java:187)
    at org.janelia.saalfeldlab.View.call(View.java:279)
    at org.janelia.saalfeldlab.View.call(View.java:166)
    at picocli.CommandLine.execute(CommandLine.java:1173)
    at picocli.CommandLine.access$800(CommandLine.java:141)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
    at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
    at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
    at picocli.CommandLine.call(CommandLine.java:1786)
    at picocli.CommandLine.call(CommandLine.java:1710)
    at org.janelia.saalfeldlab.View.main(View.java:499)
axtimwalde commented 4 years ago

@igorpisarev is this still relevant?

igorpisarev commented 4 years ago

@axtimwalde I just tested the current master, and the error still occurs there so it's relevant. But since N5 is being added to pom-scijava, I tried with 29.0.0-SNAPSHOT and it worked fine, so it seems that the conflict is taken care of there.

I don't think that pom-scijava with N5 has been released yet, but when it's out we can use it instead and close this PR.