[ 
https://issues.apache.org/jira/browse/JCLOUDS-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Gaul resolved JCLOUDS-1214.
----------------------------------
    Resolution: Invalid
      Assignee: Andrew Gaul

Cannot create a provider-specific {{SwiftApi}} using a {{transient}} api.  
Instead create a portable {{BlobStoreContext}}.

> No implementation for org.jclouds.openstack.swift.v1.SwiftApi was bound error 
> when using transient provider
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1214
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1214
>             Project: jclouds
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Aleksandra Nowak
>            Assignee: Andrew Gaul
>
> Using "transient" as a providerOrApi parameter in 
> org.jclouds.ContextBuilder#newBuilder(java.lang.String) causes this exception
> {code}
> com.google.inject.ConfigurationException: Guice configuration errors:
> 1) No implementation for org.jclouds.openstack.swift.v1.SwiftApi was bound.
>   while locating org.jclouds.openstack.swift.v1.SwiftApi
> 1 error
>       at 
> com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)
>       at 
> com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1009)
>       at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:651)
>       at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:643)
> {code}
> Here is the code. When run with "openstack-swift" and correct credentials it 
> works just fine. 
> {code}
> SwiftApi swiftApi = ContextBuilder.newBuilder("transient")
>                 .endpoint(endpoint)
>                 .credentials(user, password)
>                 .modules(modules)
>                 .overrides(overrides)
>                 .buildApi(SwiftApi.class);
> {code}
> Dependencies used in the code:
> {code}
>     <dependency>
>         <groupId>org.apache.jclouds.driver</groupId>
>         <artifactId>jclouds-slf4j</artifactId>
>         <version>2.0.0</version>
>     </dependency>
>     <dependency>
>         <groupId>org.apache.jclouds.api</groupId>
>         <artifactId>openstack-keystone</artifactId>
>         <version>2.0.0</version>
>     </dependency>
>     <dependency>
>         <groupId>org.apache.jclouds.api</groupId>
>         <artifactId>openstack-swift</artifactId>
>         <version>2.0.0</version>
>     </dependency>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to