jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Everett Toews <everett.to...@RACKSPACE.COM>
Subject Re: error with example code for OpenStack
Date Thu, 18 Dec 2014 19:51:57 GMT
If you’re only using the example from the website, there should be no trace of jclouds 1.5.7
in your dependency tree. Can you please share your pom.xml file with us?

It should exactly match this one [1].

Thanks,
Everett

[1] http://jclouds.apache.org/guides/openstack/#pom


On Dec 16, 2014, at 6:33 AM, Jesus arteche <chechu.linux@gmail.com<mailto:chechu.linux@gmail.com>>
wrote:

hey

thanks for the answer, I downloaded following the steps from the website, using the Maven
approach (yesterday). This is the output of your command:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ my-app ---
[INFO] com.mycompany.app:my-app:jar:1.0-SNAPSHOT
[INFO] +- org.apache.jclouds:jclouds-all:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.api:rackspace-cloudidentity:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.api:openstack-keystone:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.api:openstack-cinder:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds:jclouds-core:jar:1.8.1:compile
[INFO] |  |     \- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] |  +- org.apache.jclouds.api:rackspace-clouddns:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:aws-cloudwatch:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.api:cloudwatch:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:rackspace-cloudblockstorage-us:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:rackspace-cloudblockstorage-uk:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:rackspace-clouddns-us:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:rackspace-clouddns-uk:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:rackspace-clouddatabases-us:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.api:openstack-trove:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:rackspace-clouddatabases-uk:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:aws-sqs:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.api:sqs:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:aws-sts:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.api:sts:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:aws-route53:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.api:route53:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:ultradns-ws:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds.provider:dynect:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds:jclouds-allloadbalancer:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:rackspace-cloudloadbalancers-uk:jar:1.8.1:compile
[INFO] |  |  |  +- org.apache.jclouds:jclouds-loadbalancer:jar:1.8.1:compile
[INFO] |  |  |  \- org.apache.jclouds.api:rackspace-cloudloadbalancers:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.provider:rackspace-cloudloadbalancers-us:jar:1.8.1:compile
[INFO] |  +- org.apache.jclouds:jclouds-allcompute:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:aws-ec2:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:openstack-nova:jar:1.8.1:compile
[INFO] |  |  |  \- org.apache.jclouds:jclouds-compute:jar:1.8.1:compile
[INFO] |  |  |     \- org.apache.jclouds:jclouds-scriptbuilder:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:openstack-nova-ec2:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:byon:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:ec2:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:cloudservers-us:jar:1.8.1:compile
[INFO] |  |  |  \- org.apache.jclouds.common:openstack-common:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:cloudservers-uk:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:cloudservers:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:vcloud:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:gogrid:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:elasticstack:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:elastichosts-lon-p:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:elastichosts-sat-p:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:elastichosts-lon-b:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:openhosting-east1:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:serverlove-z1-man:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:skalicloud-sdg-my:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:go2cloud-jhb1:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:softlayer:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.api:cloudstack:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:hpcloud-compute:jar:1.8.1:compile
[INFO] |  |  +- org.apache.jclouds.provider:rackspace-cloudservers-us:jar:1.8.1:compile
[INFO] |  |  \- org.apache.jclouds.provider:rackspace-cloudservers-uk:jar:1.8.1:compile
[INFO] |  \- org.apache.jclouds:jclouds-allblobstore:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.api:s3:jar:1.8.1:compile
[INFO] |     |  \- org.apache.jclouds:jclouds-blobstore:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.provider:aws-s3:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.provider:azureblob:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.api:atmos:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.api:swift:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.api:openstack-swift:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.api:cloudfiles:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.provider:cloudfiles-us:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.provider:cloudfiles-uk:jar:1.8.1:compile
[INFO] |     +- org.apache.jclouds.api:filesystem:jar:1.8.1:compile
[INFO] |     \- org.apache.jclouds.provider:hpcloud-objectstorage:jar:1.8.1:compile
[INFO] +- org.jclouds:jclouds-allcompute:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:greenhousedata-element-vcloud:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:eucalyptus-partnercloud-ec2:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds.api:eucalyptus:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:deltacloud:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds:jclouds-compute:jar:1.5.7:compile
[INFO] |  |     \- org.jclouds:jclouds-scriptbuilder:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:aws-ec2:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds.common:aws-common:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:rimuhosting:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:openstack-nova:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds.api:openstack-keystone:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:openstack-nova-ec2:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:nova:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds.common:openstack-common:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:byon:jar:1.5.7:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.10:compile
[INFO] |  +- org.jclouds.api:ec2:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:cloudservers-us:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:cloudservers-uk:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:cloudservers:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:vcloud:jar:1.5.7:compile
[INFO] |  |  \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
[INFO] |  +- org.jclouds.api:cloudsigma:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:trmk-vcloudexpress:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds.common:trmk-common:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:trmk-ecloud:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:bluelock-vcloud-zone01:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:stratogen-vcloud-mycloud:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:gogrid:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:slicehost:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:elasticstack:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:elastichosts-lon-p:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:elastichosts-sat-p:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:elastichosts-lon-b:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:openhosting-east1:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:serverlove-z1-man:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:skalicloud-sdg-my:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:cloudsigma-zrh:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:cloudsigma-lvs:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:go2cloud-jhb1:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:softlayer:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:cloudstack:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:ninefold-compute:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:hpcloud-compute:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:trystack-nova:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:rackspace-cloudservers-us:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds.api:rackspace-cloudidentity:jar:1.5.7:compile
[INFO] |  \- org.jclouds.provider:rackspace-cloudservers-uk:jar:1.5.7:compile
[INFO] +- org.jclouds:jclouds-allblobstore:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:s3:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds:jclouds-blobstore:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:aws-s3:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:ninefold-storage:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:synaptic-storage:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:cloudonestorage:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:walrus:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:eucalyptus-partnercloud-s3:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:azureblob:jar:1.5.7:compile
[INFO] |  |  \- org.jclouds.common:azure-common:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:atmos:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:swift:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:cloudfiles:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:cloudfiles-us:jar:1.5.7:compile
[INFO] |  +- org.jclouds.provider:cloudfiles-uk:jar:1.5.7:compile
[INFO] |  +- org.jclouds.api:filesystem:jar:1.5.7:compile
[INFO] |  |  \- commons-io:commons-io:jar:2.4:compile
[INFO] |  \- org.jclouds.provider:hpcloud-objectstorage:jar:1.5.7:compile
[INFO] \- org.jclouds.driver:jclouds-slf4j:jar:1.5.4:compile
[INFO]    +- org.jclouds:jclouds-core:jar:1.5.4:compile
[INFO]    |  +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile
[INFO]    |  +- aopalliance:aopalliance:jar:1.0:compile
[INFO]    |  +- com.sun.jersey:jersey-core:jar:1.12:compile
[INFO]    |  +- com.google.inject.extensions:guice-assistedinject:jar:3.0:compile
[INFO]    |  +- com.google.inject:guice:jar:3.0:compile
[INFO]    |  +- org.99soft.guice:rocoto:jar:6.1:compile
[INFO]    |  +- javax.inject:javax.inject:jar:1:compile
[INFO]    |  +- javax.annotation:jsr250-api:jar:1.0:compile
[INFO]    |  +- com.google.code.gson:gson:jar:2.2:compile
[INFO]    |  \- com.google.guava:guava:jar:13.0:compile
[INFO]    \- org.slf4j:slf4j-api:jar:1.6.4:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.557s
[INFO] Finished at: Tue Dec 16 12:31:42 GMT 2014
[INFO] Final Memory: 11M/22M
[INFO] ------------------------------------------------------------------------


Thanks


On Mon, Dec 15, 2014 at 5:21 PM, Ignasi Barrera <nacx@apache.org<mailto:nacx@apache.org>>
wrote:

Hi,

Which version of jclouds are you using? Also, which dependencies have you configured in your
project? (if you use Maven the output of running "mvn dependency:tree" on your project will
help).

I.

El 15/12/2014 16:24, "Jesus arteche" <chechu.linux@gmail.com<mailto:chechu.linux@gmail.com>>
escribió:

Hey guys,

I'm running the example code for OpenStack from this site: https://jclouds.apache.org/guides/openstack/
for nova

And I'm getting this error when it tries to build the connector:

JCloudsNova.java:42: error: no suitable method found for buildApi(Class<NovaApi>)
                .buildApi(NovaApi.class);
                ^
    method ContextBuilder.<A#1>buildApi(TypeToken<A#1>) is not applicable
      (no instance(s) of type variable(s) A#1 exist so that argument type Class<NovaApi>
conforms to formal parameter type TypeToken<A#1>)
    method ContextBuilder.<A#2>buildApi(Class<A#2>) is not applicable
      (inferred type does not conform to declared bound(s)
        inferred: NovaApi
        bound(s): Closeable)
  where A#1,A#2 are type-variables:
    A#1 extends Closeable declared in method <A#1>buildApi(TypeToken<A#1>)
    A#2 extends Closeable declared in method <A#2>buildApi(Class<A#2>)
JCloudsNova.java:59: error: method close in class Closeables cannot be applied to given types;
        Closeables.close(novaApi, true);
                  ^
  required: Closeable,boolean
  found: NovaApi,boolean
  reason:  actual argument NovaApi cannot be converted to Closeable by method invocation conversion
2 errors



This is part of teh code:


 public JCloudsNova() {
        Iterable<Module> modules = ImmutableSet.<Module>of(new SLF4JLoggingModule());

        String provider = "openstack-nova";
        String identity = "demo:demo"; // tenantName:userName
        String credential = "devstack";

        novaApi = ContextBuilder.newBuilder(provider)
                .endpoint("http://xxx.xxx.xxx.xxx:5000/v2.0/")
                .credentials(identity, credential)
                .modules(modules)
                .buildApi(NovaApi.class);
        zones = novaApi.getConfiguredZones();
    }

Any idea why?

Thanks in advance


Mime
View raw message