1

我有下面的代码 - 有人可以告诉我错误的原因吗?

`String provider = "openstack-nova";
 String username = "admin:admin";
 String credential = "luel2005";
 String endpoint = "httpenter code here://192.168.2.100:5000/v2.0/";
 ContextBuilder contextBuilder = ContextBuilder.newBuilder(provider).credentials(username, credential).endpoint(endpoint);`

错误:

Exception in thread "main" java.util.ServiceConfigurationError: org.jclouds.providers.ProviderMetadata: Provider org.jclouds.aws.route53.AWSRoute53ProviderMetadata could not be instantiated: java.lang.reflect.MalformedParameterizedTypeException
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:342)
4

1 回答 1

1

乍一看,您用于创建 Context 的端点似乎格式不正确:

String endpoint = "httpenter code here://192.168.2.100:5000/v2.0/";

尝试从该字符串中删除“在此处输入代码”,然后再试一次。如需进一步参考,请查看 jclouds OpenStack QuickStartCompute Basics示例和Rackspace Cloud Servers示例。

于 2013-12-06T00:08:02.633 回答