jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felipe gutierrez <fel...@usto.re>
Subject Re: Error on connect with jclouds
Date Thu, 22 May 2014 20:02:51 GMT
Thanks for reply Andrew,

Do i need some account at AWS when I use a "filesystem" ?

I have it o my maven:
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-blobstore</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.apache.jclouds.provider</groupId>
<artifactId>aws-s3</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.apache.jclouds.api</groupId>
<artifactId>filesystem</artifactId>
<version>1.7.2</version>
</dependency>
</dependencies>

and gson-2.0.jar at my maven directory.

With out credentials I got this error:

17:01:42 ERROR main step.AbstractStep - Encountered an error executing the
step
java.util.ServiceConfigurationError:
org.jclouds.providers.ProviderMetadata: Provider
org.jclouds.aws.s3.AWSS3ProviderMetadata could not be instantiated:
java.lang.IllegalAccessError: tried to access class
com.google.common.reflect.TypeResolver from class
org.jclouds.util.TypeToken2
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at
com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:354)
at
com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:604)
at org.jclouds.providers.Providers.all(Providers.java:84)
at org.jclouds.providers.Providers.withId(Providers.java:101)
at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:166)
at
org.jscsi.target.storage.JCloudsStorageModule.<init>(JCloudsStorageModule.java:140)
at
org.jscsi.target.storage.RandomAccessStorageModule.open(RandomAccessStorageModule.java:357)
at org.jscsi.target.Configuration.parseTargetElement(Configuration.java:317)
at org.jscsi.target.Configuration.create(Configuration.java:235)
at org.jscsi.batch.TargetApp.execute(TargetApp.java:43)
at
org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:395)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at
org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:267)
at
org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:77)
at
org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:368)
at
org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at
org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at
org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:253)
at
org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195)
at
org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:137)
at
org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
at
org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:152)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:131)
at
org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135)
at
org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:301)
at
org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:134)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at
org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:127)
at org.jscsi.batch.App.startTarget(App.java:32)
at org.jscsi.batch.App.main(App.java:55)
Caused by: java.lang.IllegalAccessError: tried to access class
com.google.common.reflect.TypeResolver from class
org.jclouds.util.TypeToken2
at org.jclouds.util.TypeToken2.where(TypeToken2.java:47)
at
org.jclouds.rest.internal.BaseRestApiMetadata.contextToken(BaseRestApiMetadata.java:60)
at
org.jclouds.rest.internal.BaseRestApiMetadata$Builder.<init>(BaseRestApiMetadata.java:74)
at org.jclouds.s3.S3ApiMetadata$Builder.<init>(S3ApiMetadata.java:102)
at
org.jclouds.aws.s3.AWSS3ApiMetadata$Builder.<init>(AWSS3ApiMetadata.java:71)
at org.jclouds.aws.s3.AWSS3ApiMetadata.<init>(AWSS3ApiMetadata.java:55)
at
org.jclouds.aws.s3.AWSS3ProviderMetadata$Builder.<init>(AWSS3ProviderMetadata.java:84)
at
org.jclouds.aws.s3.AWSS3ProviderMetadata.builder(AWSS3ProviderMetadata.java:47)
at
org.jclouds.aws.s3.AWSS3ProviderMetadata.<init>(AWSS3ProviderMetadata.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 32 more
17:01:42 ERROR main batch.App - Exit Status :
[java.util.ServiceConfigurationError:
org.jclouds.providers.ProviderMetadata: Provider
org.jclouds.aws.s3.AWSS3ProviderMetadata could not be instantiated:
java.lang.IllegalAccessError: tried to access class
com.google.common.reflect.TypeResolver from class
org.jclouds.util.TypeToken2]





On Thu, May 22, 2014 at 4:24 PM, Andrew Phillips <andrewp@apache.org> wrote:

> Hi Felipe
>
> From your error, it looks like you are either missing some JARs, or have
> mixed/incompatible versions of JARs on your classpath. Could you check your
> classpath and let us know which JARs are on it?
>
> Also, I think you should be able to get away without the .credentials(...)
> part when creating the filesystem context (see e.g. [1]) ;-)
>
> Regards
>
> ap
>
> [1] https://github.com/jclouds/jclouds/blob/master/apis/
> filesystem/src/test/java/org/jclouds/filesystem/
> FilesystemAsyncBlobStoreTest.java#L94
>

Mime
View raw message