jclouds文件系统示例

时间:2014-05-22 16:47:00

标签: java jclouds

我正在尝试测试此示例http://jclouds.apache.org/guides/filesystem/,但我收到此错误:

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

错误:

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)

谢谢!

1 个答案:

答案 0 :(得分:0)

尝试将Guava从14.0升级到15.0,以匹配对Guava的jclouds依赖。不要使用比15.0更新的版本,因为jclouds 1.7.x解决了Java 7u51和Guava之间不兼容的问题。 16.0.1和解决方法不支持更新的番石榴:

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