Felipe Gutierrez
Felipe Gutierrez

Reputation: 535

jclouds filesystem example

I am trying to test this example http://jclouds.apache.org/guides/filesystem/ but I get this error on the line:

BlobStoreContext context = ContextBuilder.newBuilder("filesystem")
                 .overrides(properties)
                 .buildView(BlobStoreContext.class);

error:

13:39:23 ERROR main step.AbstractStep - Encountered an error executing the step
java.lang.NoClassDefFoundError: com/google/gson/TypeAdapter
    at org.jclouds.rest.config.RestModule.configure(RestModule.java:62)
    at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
    at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
    at com.google.inject.spi.Elements.getElements(Elements.java:101)
    at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
    at com.google.inject.Guice.createInjector(Guice.java:95)
    at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
    at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
    at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
    at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)

Thanks!

Upvotes: 0

Views: 640

Answers (1)

Andrew Gaul
Andrew Gaul

Reputation: 2402

Try upgrading your Guava from 14.0 to 15.0 to match the jclouds dependency on Guava. Do not use a newer version than 15.0 since jclouds 1.7.x works around an incompatibility between Java 7u51 and Guava < 16.0.1 and the workaround does not support newer Guava:

https://issues.apache.org/jira/browse/JCLOUDS-427

Upvotes: 1

Related Questions