Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-904

Using ContextBuilder to build new aws-s3 context throws NoClassDefFoundError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.9.0
    • 1.9.1, 2.0.0
    • jclouds-blobstore
    • Karaf OSGi Container

    Description

      Following the steps of the quickstart

      context = ContextBuilder.newBuilder("aws-s3")
                   .credentials(accesskeyid, secretaccesskey)
                   .buildView(BlobStoreContext.class);

      using version 1.9.0 creates a NoClassDefFoundError when calling buildView():

      java.lang.NoClassDefFoundError: org.jclouds.io.Payload not found by aws-s3 [77]
      	at com.sun.proxy.$Proxy45.<clinit>(Unknown Source)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.7.0_45]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)[:1.7.0_45]
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.7.0_45]
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)[:1.7.0_45]
      	at java.lang.reflect.Proxy.newInstance(Proxy.java:748)[:1.7.0_45]
      	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)[:1.7.0_45]
      	at org.jclouds.rest.config.AnnotatedHttpApiProvider.get(AnnotatedHttpApiProvider.java:45)
      	at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:55)
      	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
      	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
      	at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
      	at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:98)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
      	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
      	at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
      	at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:98)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
      	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
      	at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
      	at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:98)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
      	at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
      	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
      	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      	at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
      	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:204)
      	at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:198)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
      	at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:198)
      	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:179)
      	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
      	at com.google.inject.Guice.createInjector(Guice.java:95)
      	at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:402)
      	at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:326)
      	at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:608)
      	at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:588)
      	at org.jclouds.ContextBuilder.build(ContextBuilder.java:581)
      	at org.jclouds.karaf.commands.blobstore.BlobStoreCommandWithOptions.getBlobStore(BlobStoreCommandWithOptions.java:142)
      	at org.jclouds.karaf.commands.blobstore.BlobListCommand.doExecute(BlobListCommand.java:49)
      	at org.jclouds.karaf.commands.blobstore.BlobStoreCommandWithOptions.execute(BlobStoreCommandWithOptions.java:64)
      	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45]
      	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45]
      	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
      	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
      	at org.apache.karaf.shell.console.commands.$BlueprintCommand1164857634.execute(Unknown Source)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[17:org.apache.karaf.shell.console:2.4.1]
      	at org.apache.karaf.shell.console.jline.Console.run(Console.java:195)[17:org.apache.karaf.shell.console:2.4.1]
      	at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]

      While using version 1.8 works without problems.

      Attachments

        Activity

          People

            Unassigned Unassigned
            s.luetge Sebastian Lütge
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: