Still new to jclouds. I'm trying a trivial test to confirm I can talk to AT&T Synaptic Compute as a Service via the vCloud API using jclouds 1.5.0-beta.4:
----- Source ------
import org.jclouds.ContextBuilder;
import org.jclouds.compute.ComputeService;
import org.jclouds.compute.ComputeServiceContext;
public class Test {
public static void main(String[] args) throws Exception {
ContextBuilder cb = ContextBuilder.newBuilder("vcloud")
.credentials("[REDACTED]", "[REDACTED]")
.endpoint("
https://vcloudapi.[REDACTED].
synaptic.att.com/api");
ComputeServiceContext csc = cb.buildView(ComputeServiceContext.class);
try {
ComputeService cs = csc.getComputeService();
System.out.println("Nodes:");
System.out.println(cs.listNodes());
} finally {
csc.close();
}
}
}
----- Output -----
Nodes:
Exception in thread "main" java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at com.google.common.collect.SingletonImmutableSet.<init>(SingletonImmutableSet.java:47)
at com.google.common.collect.ImmutableSet.of(ImmutableSet.java:93)
at com.google.common.collect.ImmutableSet.copyFromCollection(ImmutableSet.java:357)
at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:302)
at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:287)
at org.jclouds.util.Iterables2.concreteCopy(Iterables2.java:38)
at org.jclouds.vcloud.functions.OrgsForNames.apply(OrgsForNames.java:57)
at org.jclouds.vcloud.functions.OrgsForNames.apply(OrgsForNames.java:42)
at org.jclouds.vcloud.config.VCloudRestClientModule$OrgMapSupplier.get(VCloudRestClientModule.java:279)
at org.jclouds.vcloud.config.VCloudRestClientModule$OrgMapSupplier.get(VCloudRestClientModule.java:265)
at org.jclouds.rest.suppliers.SetAndThrowAuthorizationExceptionSupplier.get(SetAndThrowAuthorizationExceptionSupplier.java:49)
at org.jclouds.concurrent.RetryOnTimeOutExceptionSupplier.get(RetryOnTimeOutExceptionSupplier.java:47)
at org.jclouds.util.Suppliers2$ExpiringMemoizingSupplier.get(Suppliers2.java:130)
at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:64)
at org.jclouds.vcloud.compute.strategy.VCloudComputeServiceAdapter.listNodes(VCloudComputeServiceAdapter.java:128)
at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listDetailsOnNodesMatching(AdaptingComputeServiceStrategies.java:115)
at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listNodes(AdaptingComputeServiceStrategies.java:110)
at org.jclouds.compute.internal.BaseComputeService.listNodes(BaseComputeService.java:342)
at Test.main(Test.java:16)
-----
This kind of test worked with SoftLayer and EC2, perhaps accidentally. Any idea where I'm going wrong with vCloud? Do I need to consider adding EntepriseConfigurationModule? Something else?
Paul