我使用了下面的代码:
Iterable<Module> modules = ImmutableSet.<Module> of(
new SshjSshClientModule());
ContextBuilder builder = ContextBuilder.newBuilder(provider).endpoint(endpoint)
.credentials(identity, credential)
.modules(modules);
System.out.printf(">> initializing %s%n", builder.getApiMetadata());
ComputeService compute = builder.buildView(ComputeServiceContext.class).getComputeService();System.out.println(compute1.listImages());
但我收到以下错误消息.........
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:应为字符串,但在org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:92)的org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)的第1行第787列为BEGIN_ARRAY
代码起作用了。之前..。
发布于 2014-03-29 22:41:04
您肯定遇到了介于您正在使用的jcloud版本和您正在使用的任何云的版本之间的某个bug。我们需要更多的信息来解决这个问题。请仔细阅读如何Report a Bug到Apache jcloud的说明。
https://stackoverflow.com/questions/22699829
复制相似问题