Re: Error on storing JCLoud blob

2015-11-11 Thread Felipe Gutierrez
yes. thanks

On Wed, Nov 11, 2015 at 2:11 PM, Ignasi Barrera  wrote:

> > java.io.IOException: Não há espaço disponível no dispositivo
>
> It looks like the disk ran out of space?
>



--


Error on storing JCLoud blob

2015-11-11 Thread Felipe Gutierrez
Hi,
I got this error using JClouds after 2 days I am copying files to my
container.

The line is where I call putBlob

Blob blob = mStore.blobBuilder(Integer.toString(mBucketIndex)).build();
blob.setPayload(data);
mStore.putBlob(mContainerName, blob);

I am using this versions

org.apache.jclouds
  jclouds-blobstore
  1.9.0
  jar


  org.apache.jclouds.api
  filesystem
  1.9.0


Thanks, Felipe



nov 10, 2015 3:38:06 PM org.jclouds.logging.jdk.JDKLogger logError
GRAVE: An error occurred storing the new blob with name [23790] to
container [bench53473ResourcegraveISCSI9284].
java.io.IOException: Não há espaço disponível no dispositivo
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:326)
at com.google.common.io.ByteStreams.copy(ByteStreams.java:179)
at com.google.common.io.ByteSink.writeFrom(ByteSink.java:139)
at
org.jclouds.filesystem.strategy.internal.FilesystemStorageStrategyImpl.putBlob(FilesystemStorageStrategyImpl.java:377)
at
org.jclouds.blobstore.config.LocalBlobStore.putBlob(LocalBlobStore.java:482)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
at com.sun.proxy.$Proxy98.putBlob(Unknown Source)
at
org.jscsi.target.storage.JCloudsStorageModule$WriteTask.call(JCloudsStorageModule.java:496)
at
org.jscsi.target.storage.JCloudsStorageModule$WriteTask.call(JCloudsStorageModule.java:441)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


--


Re: too may files open

2014-11-19 Thread Felipe Gutierrez
thanks, apparently it is working well. I already could 130Gb and the files
open remain around 2800. Let's see until 400Gb.

On Wed, Nov 19, 2014 at 12:46 AM, Andrew Gaul  wrote:

> On Tue, Nov 18, 2014 at 05:27:48PM -0300, felipe gutierrez wrote:
> > time ago I asked here why I am getting "too many files open" with jclouds
> > and the answer was I needed to close my BlobStoreContext. I did but now I
> > am getting this error again. I believe the context is opening in other
> > location. This is my code <http://pastebin.com/xCMMMqFR>. I close the
> > context at lines 175 and 508. Maybe I have to close other objects. But I
> am
> > still getting the error:
> >
> > Caused by: java.io.FileNotFoundException:
> > /home/felipe/udrive/disks/storage/bench53473ResourcegraveISCSI9284/355
> (Too
> > many files open)
>
> Try closing the results of bloblgetPayload().getInput() (lines 428 and
> 431).  You can do this via Java 7 try-with-resources or with
> ByteStreams2.toByteArrayAndClose.  These InputStream are actually
> FileInputStream and likely the cause of your leaks.
>
> --
> Andrew Gaul
> http://gaul.org/
>


distributed file system with jclouds.

2014-11-19 Thread felipe gutierrez
Hi Gaul,

I was reading your site  and this presentation
. Thanks to
share that =)!

I am wondering to study about distributed file systems and may you have any
books/papers to help me on the theory about it? I also wonder to create
simple Java tests with jclouds.

Thanks in advance.
Felipe


too may files open

2014-11-18 Thread felipe gutierrez
Hi,

time ago I asked here why I am getting "too many files open" with jclouds
and the answer was I needed to close my BlobStoreContext. I did but now I
am getting this error again. I believe the context is opening in other
location. This is my code . I close the
context at lines 175 and 508. Maybe I have to close other objects. But I am
still getting the error:

Caused by: java.io.FileNotFoundException:
/home/felipe/udrive/disks/storage/bench53473ResourcegraveISCSI9284/355 (Too
many files open)

Does anyone have any hint?
Thanks! Felipe


Re: Blobstore Filesystem: does it work on shared folders with concurrent clients?

2014-11-12 Thread felipe gutierrez
Thanks Andrian,

I think I am looking for something like this
https://maginatics.com/product/maginatics-cloud-storage-platform
but one I can download and test.


On Wed, Nov 12, 2014 at 2:32 PM, Adrian Cole 
wrote:

> Not a good fit, Felipe. I would use something that exposes S3 apis and
> is already a distributed service. There are a number of things like
> this including swift, ceph, many cassandra-like-things, etc.
>
> Filesystem was designed just as a tool, not as a production service.
>
> Hope this helps!
> -A
>
> On Wed, Nov 12, 2014 at 9:28 AM, felipe gutierrez  wrote:
> > Hi, and about distributed servers with jCloud file system? Is that
> possible?
> > Is there any example of it?
> >
> > Thanks in advance!
> >
> > On Wed, Nov 12, 2014 at 12:57 PM, Adrian Cole 
> > wrote:
> >>
> >> Hi, Anthony. There is no synchronized, or mutex code in the current
> >> filesystem implementation. There are also no multithreaded tests to
> >> show it doesn't need that. In other words, I would use it only from a
> >> single thread, and synchronize externally. That said, you can always
> >> raise a pull request to help with the race conditions :)
> >>
> >> -A
> >
> >
>


Re: Blobstore Filesystem: does it work on shared folders with concurrent clients?

2014-11-12 Thread felipe gutierrez
Hi, and about distributed servers with jCloud file system? Is that
possible? Is there any example of it?

Thanks in advance!

On Wed, Nov 12, 2014 at 12:57 PM, Adrian Cole 
wrote:

> Hi, Anthony. There is no synchronized, or mutex code in the current
> filesystem implementation. There are also no multithreaded tests to
> show it doesn't need that. In other words, I would use it only from a
> single thread, and synchronize externally. That said, you can always
> raise a pull request to help with the race conditions :)
>
> -A
>


Re: Version of jclouds 1.8.0 with jdk1.7.0_60

2014-10-14 Thread felipe gutierrez
it is compiling with the reflections-spring and jclouds. Now I am working
to build these reflections.

On Tue, Oct 14, 2014 at 3:41 PM, Andrew Phillips  wrote:

> Thanks Andrew, at the reflection jar there is another guava.jar. So I
>> excluded it:
>>
>
> Do things work now? ;-)
>
> ap
>


Re: Version of jclouds 1.8.0 with jdk1.7.0_60

2014-10-14 Thread felipe gutierrez
Thanks Andrew, at the reflection jar there is another guava.jar. So I
excluded it:

org.reflections
reflections
0.9.9


guava
com.google.guava




org.reflections
reflections-spring
0.9.9-RC1


On Tue, Oct 14, 2014 at 2:21 PM, Andrew Phillips  wrote:

> Hi Felipe
>
> This looks very much like JCLOUDS-427 [1], which should certainly be fixed
> in 1.8.0. Can you verify that there are no different versions of jclouds
> and/or Guava on your project's classpath?
>
> Thanks!
>
> ap
>
> [1] https://issues.apache.org/jira/browse/JCLOUDS-427
>


Version of jclouds 1.8.0 with jdk1.7.0_60

2014-10-14 Thread felipe gutierrez
hello,

Does any one knows if it is about versions of jclouds with java? Thanks!

my app is using jclouds version 1.8.0 with jdk1.7.0_60 and I am getting
this error below when I add these dependencies at my pom:


org.reflections
reflections
0.9.9


org.reflections
reflections-spring
0.9.9-RC1


code:
Properties properties = new Properties();
properties.setProperty(FilesystemConstants.PROPERTY_BASEDIR,
pFile.getAbsolutePath());
ContextBuilder overrides =
ContextBuilder.newBuilder("filesystem").overrides(properties);
mContext = overrides.buildView(BlobStoreContext.class);


error:
[DEBUG] BACKUP Files started [100]:  - 2035 - 2036 - 2037 - 2038 - 2039 -
2040 - 2041 - 2042 - 2043 - 2044 - 2045 - 2046 - 2047 - 2048 - 2049 - 2050
- 2051 - 2052 - 2053 - 2054 - 2055 - 2056 - 2057 - 2058 - 2059 - 2060 -
2061 - 2062 - 2063 - 2064 - 2065 - 2066 - 2067 - 2068 - 2069 - 2070 - 2071
- 2072 - 2073 - 2074 - 2075 - 2076 - 2077 - 2078 - 2079 - 2080 - 2081 -
2082 - 2083 - 2084 - 2085 - 2086 - 2087 - 2088 - 2089 - 2090 - 2091 - 2092
- 2093 - 2094 - 2095 - 2096 - 2097 - 2098 - 2099 - 2100 - 2101 - 2102 -
2103 - 2104 - 2105 - 2106 - 2107 - 2108 - 2109 - 2110 - 2111 - 2112 - 2113
- 2114 - 2115 - 2116 - 2117 - 2118 - 2119 - 2120 - 2121 - 2122 - 2123 -
2124 - 2125 - 2126 - 2127 - 2128 - 2129 - 2130 - 2131 - 2132 - 2133 - 2134
[DEBUG] BACKUP Files completed [3]:  - 2032 - 2033 - 2034
13:47:59 ERROR main batch.TargetApp - The Target server is not started!
java.io.IOException: java.lang.reflect.InvocationTargetException
at
org.jscsi.target.storage.RandomAccessStorageModule.open(RandomAccessStorageModule.java:153)
at org.jscsi.target.Configuration.parseTargetElement(Configuration.java:328)
at org.jscsi.target.Configuration.create(Configuration.java:234)
at org.jscsi.batch.TargetApp.execute(TargetApp.java:60)
at
org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
at
org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at
org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)
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:257)
at
org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:198)
at
org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
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:67)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:162)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:141)
at
org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)
at
org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:304)
at
org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at
org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)
at org.jscsi.batch.App.startTarget(App.java:41)
at org.jscsi.batch.App.main(App.java:67)
Caused by: java.lang.reflect.InvocationTargetException
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
org.jscsi.target.storage.RandomAccessStorageModule.open(RandomAccessStorageModule.java:150)
... 25 more
Caused by: com.google.inject.CreationException: Guice creation errors:

1) No implementation for org.jclouds.blobstore.BlobStore was bound.
  while locating org.jclouds.blobstore.BlobStore
for parameter 5 at
org.jclouds.blobstore.internal.BlobStoreContextImpl.(BlobStoreContextImpl.java:50)
  while locating org.jclouds.blobstore.BlobStoreContext
for parameter 0 at
org.jclouds.blobstore.LocalAsyncBlobStore.(LocalAsyncBlobStore.java:112)
  at
org.jclouds.filesystem.config.FilesystemBlobStoreContextModule.configure(FilesystemBlobStoreContextModule.java:44)

2) No implementation for org.jclouds.blobstore.BlobStore was bound.
  while locating org.j

Re: Method initialization failed from the command prompt

2014-09-08 Thread felipe gutierrez
I think you are missing some jars.

http://stackoverflow.com/questions/15475576/error-package-org-jclouds-logging-slf4j-config-does-not-exist-the-class-slf4j


On Mon, Sep 8, 2014 at 1:48 PM, Sofiane Bendoukha 
wrote:

> Hello,
>
> executing this https://jclouds.apache.org/guides/openstack/ from Eclipse
> is successful.
>
> The problem is when I try from the command line (unix system) I get these
> error:
>
> ERROR: Action exception in step (2): Constructor call resulted in an
> exception: java.lang.NoClassDefFoundError: org/jclouds/logging/slf4j/
> config/SLF4JLoggingModule
> java.lang.RuntimeException: Action exception in step (2): Constructor call
> resulted in an exception: java.lang.NoClassDefFoundError:
> org/jclouds/logging/slf4j/config/SLF4JLoggingModule
>
>
> Any one can help?
>
> Regards,
>
> Sofiane.
>


Re: Error: No space left on device

2014-08-27 Thread felipe gutierrez
yes, it is better to do this.
Thanks


On Wed, Aug 27, 2014 at 3:44 PM, Andrew Gaul  wrote:

> Felipe, you exhausted your rootfs space; a file system with 83 GB
> available cannot accommodate a 100 GB copy.  Perhaps change your basedir
> to your home partition which has 750 GB available?  Note that the
> filesystem blobstore does not create any temporary files although other
> processes can consume this space.
>
> On Mon, Aug 25, 2014 at 03:12:59PM -0300, felipe gutierrez wrote:
> > I am using rootfs, but I deleted the blocks to start again. So I have 83G
> > free. My copy of 100G stoped in 80G.
> >
> > $ df -h
> > Filesystem  Size  Used Avail
> Use% Mounted on
> > rootfs   92G  4.7G
>  83G   6% /
> > udev 10M 0
>  10M   0% /dev
> > tmpfs   779M  620K
> 779M   1% /run
> > /dev/disk/by-uuid/5147a770-64ed-4aae-918e-21bd237b359b   92G  4.7G
>  83G   6% /
> > tmpfs   5.0M 0
> 5.0M   0% /run/lock
> > tmpfs   4.6G   72K
> 4.6G   1% /run/shm
> > /dev/sda6   811G   17G
> 753G   3% /home
> >
> >
> > On Mon, Aug 25, 2014 at 2:44 PM, Andrew Phillips 
> wrote:
> >
> > > How could I delete the files only the temporary directory? I also cant
> find
> > >> this directory at /tmp
> > >>
> > >
> > > All I can see in your stacktrace is:
> > >
> > >
> > >  java.lang.RuntimeException: java.io.IOException: No space left on
> device
> > >>
> > >
> > > It does not say *which* device is out of space. Could you check on your
> > > target system to find out which device has no space left [1]?
> > >
> > > ap
> > >
> > > [1] https://kb.iu.edu/d/agfe
> > >
>
> --
> Andrew Gaul
> http://gaul.org/
>


Re: Error: No space left on device

2014-08-25 Thread felipe gutierrez
yes, I used local file system context.

Properties properties = new Properties();
properties.setProperty(FilesystemConstants.PROPERTY_BASEDIR,
pFile.getAbsolutePath());
ContextBuilder overrides =
ContextBuilder.newBuilder("filesystem").overrides(properties);
mContext = overrides.buildView(BlobStoreContext.class);

Is there a way to go around it? Thanks.


On Mon, Aug 25, 2014 at 3:00 PM, Jeremy Daggett <
jeremy.dagg...@rackspace.com> wrote:

> Hi Felipe!
>
> Would you be able to send a code example of what you are trying to
> accomplish?  I have a feeling that you have configured your Context to use
> the local blob store (local filesystem) which could potentially exhaust
> resources on the system.
>
> Please let us known, thanks!
>
> /jd
>
>
>
>
> On 8/25/14, 10:44 AM, "Andrew Phillips"  wrote:
>
> >> How could I delete the files only the temporary directory? I also cant
> >>find
> >> this directory at /tmp
> >
> >All I can see in your stacktrace is:
> >
> >> java.lang.RuntimeException: java.io.IOException: No space left on device
> >
> >It does not say *which* device is out of space. Could you check on
> >your target system to find out which device has no space left [1]?
> >
> >ap
> >
> >[1] https://kb.iu.edu/d/agfe
>
>


Re: Error: No space left on device

2014-08-25 Thread felipe gutierrez
I am using rootfs, but I deleted the blocks to start again. So I have 83G
free. My copy of 100G stoped in 80G.

$ df -h
Filesystem  Size  Used Avail
Use% Mounted on
rootfs   92G  4.7G   83G
6% /
udev 10M 0   10M
0% /dev
tmpfs   779M  620K  779M
1% /run
/dev/disk/by-uuid/5147a770-64ed-4aae-918e-21bd237b359b   92G  4.7G   83G
6% /
tmpfs   5.0M 0  5.0M
0% /run/lock
tmpfs   4.6G   72K  4.6G
1% /run/shm
/dev/sda6   811G   17G  753G
3% /home


On Mon, Aug 25, 2014 at 2:44 PM, Andrew Phillips  wrote:

> How could I delete the files only the temporary directory? I also cant find
>> this directory at /tmp
>>
>
> All I can see in your stacktrace is:
>
>
>  java.lang.RuntimeException: java.io.IOException: No space left on device
>>
>
> It does not say *which* device is out of space. Could you check on your
> target system to find out which device has no space left [1]?
>
> ap
>
> [1] https://kb.iu.edu/d/agfe
>


Re: Error: No space left on device

2014-08-25 Thread felipe gutierrez
I am writing on the root "/storage/bench53473ResourcegraveISCSI9284" at my
linux and my provide is a BlobStore.

How could I delete the files only the temporary directory? I also cant find
this directory at /tmp



On Mon, Aug 25, 2014 at 2:12 PM, Andrew Phillips  wrote:

> org.jclouds.blobstore.LocalAsyncBlobStore.putBlob(
>> LocalAsyncBlobStore.java:405)
>>
>
> The error is in putBlob, which actually tries to write the blob to the
> target location, but may also write to the temporary directory.
>
> Which drive on your system actually has no space left any more? And what
> is the root directory that you are passing to the filesystem provider?
>
> ap
>


Error: No space left on device

2014-08-25 Thread felipe gutierrez
Hi,

I am trying to understand this error:
22:21:39 ERROR pool-13-thread-3 storage.JCloudsStorageModule - Error when
storing blob:
java.lang.RuntimeException: java.io.IOException: No space left on device
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at
org.jclouds.blobstore.LocalAsyncBlobStore.putBlob(LocalAsyncBlobStore.java:405)

At internet says I should increase the size of my /tmp directory because it
is too small (
https://github.com/cloudfoundry/docs-deploying-cf/blob/master/ec2/deploy_aws_cf.html.md
).

Is this a cache directory, right?
I would like to delete the blobs from the BlobStore and /tmp directory with
out delete the real files. Is that possible?

Thanks, Felipe


Re: How does jclouds storage my files?

2014-08-13 Thread felipe gutierrez
ok, I understood, thanks Andrew. I believe I need to check it at the iSCSI
protocol and create meta-data for it.


On Tue, Aug 12, 2014 at 12:35 PM, Andrew Phillips 
wrote:

> yes. But What I am doing is editing jscsi code. So they don't know how to
>> answer because they don't move the blobs to other place.
>>
>
> Ah, OK. Still, the specific details of how a blob is stored are either
> jSCSI-specific, or (as Andrew Gaul pointed out) specific to the native
> filesystem provider in the JVM, which in turn depends on the underlying
> filesystem.
>
> The jclouds filesystem API does not do any of this work itself: it simply
> uses the standard Java file libraries to write and write files.
>
> So I suspect you will have to either check with jSCSI or examine the file
> handling implementation of the JVM on which you are running :-(
>
> ap
>


Re: How does jclouds storage my files?

2014-08-12 Thread felipe gutierrez
yes. But What I am doing is editing jscsi code. So they don't know how to
answer because they don't move the blobs to other place.


On Tue, Aug 12, 2014 at 10:27 AM, Andrew Phillips 
wrote:

> 2 - I use this implementation of iSCSI http://jscsi.org/. And it is this
>> class that saves my blobs
>> http://grepcode.com/file/repo1.maven.org/maven2/org.
>> jscsi/target/2.5.2/org/jscsi/target/storage/
>> JCloudsStorageModule.java?av=f
>>
>
> As far as I can see, the questions you have are related to jSCSI, which is
> not part of jclouds. Have you tried asking on the jSCSI mailing list [1]?
>
> ap
>
> [1] https://github.com/disy/jSCSI/blob/master/pom.xml#L65-L72
>


Re: How does jclouds storage my files?

2014-08-12 Thread felipe gutierrez
ok, thanks for reply.

1 - To store the Blobs I am using it:

private BlobStore mStore;
mStore = mContext.getBlobStore();
if (!mStore.containerExists(mContainerName)) {
  Location locToSet = null;
  for (Location loc : mStore.listAssignableLocations()) {
  if (loc.getId().equals("eu-west-1")) {
  locToSet = loc;
  break;
  }
  }
  mStore.createContainerInLocation(locToSet, mContainerName);
}

Blob blob = mStore.blobBuilder(Integer.toString(mBucketIndex)).build();
blob.setPayload(data);
mStore.putBlob(mContainerName, blob);

2 - I use this implementation of iSCSI http://jscsi.org/. And it is this
class that saves my blobs
http://grepcode.com/file/repo1.maven.org/maven2/org.jscsi/target/2.5.2/org/jscsi/target/storage/JCloudsStorageModule.java?av=f

3 - I do not know how to create a small test case. What it should have?

4 - Format means I have a disk that I can partition it and format.

5 - The indexes are the blobs that indicates there are some files on my
driver, but not really the file content.

Hope this answer.



On Mon, Aug 11, 2014 at 9:33 PM, Andrew Gaul  wrote:

> On Mon, Aug 11, 2014 at 05:08:16PM -0300, felipe gutierrez wrote:
> > I am new with jclouds. What I am doing is: Opening a disk with java and
> > formatting it with jclouds. So, instead of write Files.write() I use
> > jclouds.
> >
> > When I format I can see about 63 blocks of 2MB. The blocks next to it,
> say
> > the 30 neighbors, are the indexes of my files copied to the disk. It is
> so
> > true that if I save 100 files for example, I can keep these blocks and
> move
> > the another blocks to my cloud and I can still open the disk and see all
> > files inside. Only see, of course. If I tried to open I need to move back
> > the exactly blocks of that file I want to open.
> >
> > My question: When I copied 50GB of movies I still can see all movies on
> my
> > disk. When I open the movie I need to restore all blocks. It is what my
> app
> > does. But I got a claim saying the index of the movie are not integrate.
> I
> > still can see the size of the movie is 800MB, but when I open it says
> only
> > 20 minutes of movie. So I would like to restore all the blocks of that
> > movie, not only what my app is asking to read.
>
> Can you explain how you open a disk and what it means to format it with
> jclouds?  Also what does an index mean?  The jclouds filesystem provider
> does not provide any indexing; the underlying operating system provides
> this.
>
> --
> Andrew Gaul
> http://gaul.org/
>


How does jclouds storage my files?

2014-08-11 Thread felipe gutierrez
Hi,

I am new with jclouds. What I am doing is: Opening a disk with java and
formatting it with jclouds. So, instead of write Files.write() I use
jclouds.

When I format I can see about 63 blocks of 2MB. The blocks next to it, say
the 30 neighbors, are the indexes of my files copied to the disk. It is so
true that if I save 100 files for example, I can keep these blocks and move
the another blocks to my cloud and I can still open the disk and see all
files inside. Only see, of course. If I tried to open I need to move back
the exactly blocks of that file I want to open.

My question: When I copied 50GB of movies I still can see all movies on my
disk. When I open the movie I need to restore all blocks. It is what my app
does. But I got a claim saying the index of the movie are not integrate. I
still can see the size of the movie is 800MB, but when I open it says only
20 minutes of movie. So I would like to restore all the blocks of that
movie, not only what my app is asking to read.

Did I make myself clear?

Thanks in advanced, Felipe.


connect jclouds to a private cloud

2014-07-15 Thread felipe gutierrez
Hi all,

In my code I have two options to connect jclouds to a filesystem or to an
aws-s3 cloud.

if (credentials.length == 0) {
Properties properties = new Properties();
properties.setProperty(FilesystemConstants.PROPERTY_BASEDIR,
pFile.getAbsolutePath());
ContextBuilder overrides =
ContextBuilder.newBuilder("filesystem").overrides(properties);
mContext = overrides.buildView(BlobStoreContext.class);
} else {
mContext =
ContextBuilder.newBuilder("aws-s3").credentials(getCredentials()[0],
getCredentials()[1]).buildView(BlobStoreContext.class);
}

Since I have my on private cloud, that is not at the list of jclouds, I
want to include a lib to connect to it. Where do I can start?

Thanks in advance!
Felipe


Examples of another providers

2014-07-15 Thread felipe gutierrez
Hi all,

I use org.jclouds.blobstore.domain.Blob to manage my block of files and
send it to the cloud. Eg:

ContextBuilder overrides =
ContextBuilder.newBuilder("filesystem").overrides(properties);
mContext = overrides.buildView(BlobStoreContext.class);

Looking at the jclouds git I saw another lib providers like
https://github.com/disy/jclouds/tree/master/providers/imagestore or the
list of it: https://github.com/disy/jclouds/tree/master/providers

Where can I find an example to implement my store with these providers?

Thanks in advance!
Felipe


Maginatics Cloud Storage Platform

2014-06-02 Thread felipe gutierrez
Hi,

I have a doubt about Maginatics Cloud Storage Platform.

JClouds is a subproject of it?

Can I use the platform for free? Where can I download?

Thanks in advance!
Felipe


Re: How to identify the index blocks on jclouds filesystem?

2014-05-29 Thread felipe gutierrez
I think I will need to write my own blobstore, but I do not know from where
to start =(
Do you have any recomendation or links?
The challenge I am working is to write blocks, send it to some cloud and
delete from my filesystem. When I want to read the files I will restore
these blocks from the cloud.

About Swift, I thinks is very specific for openstack, since I am using a
different cloud (private cloud).

About Riak CS I didn't find much information.


On Thu, May 29, 2014 at 3:01 AM, Andrew Gaul  wrote:

> If you are so inclined, you could write your own blobstore using the raw
> block device, e.g., /dev/sda on Linux, which would give you total
> control over block management.  However, I strongly recommend looking at
> the existing blobstores, such as Swift and Riak CS, which may already
> solve the problem you have and offer a lot in terms of performance,
> reliability, and robustness.
>
> On Wed, May 28, 2014 at 11:35:59PM -0300, felipe gutierrez wrote:
> > ok. Thanks. It is I would like to know.
> >
> > I wonder to develope a method to check if some block has the index files
> of
> > my driver, so I could open a driver with many files only with few blocks,
> > and fill the other blocks demand.
> >
> > Would you point some code I could develop this?
> > This is for personal stuff, but do you think it will contribute to
> apache?
> >
> > Thanks Andrew
> >
> >
> > On Wed, May 28, 2014 at 5:08 PM, Andrew Gaul  wrote:
> >
> > > On Wed, May 28, 2014 at 08:40:50AM -0300, felipe gutierrez wrote:
> > > > Hi all,
> > > >
> > > > I am using jClouds BlobStore with filesystem, so I have blocks at my
> > > > FileSystem. I woould like to know if there is a way to check which
> blocks
> > > > contain the index of all files of my driver.
> > > >
> > > > For example, when I format a new driver, jclouds creates
> > > > {0,1,2,...,16,2040,2047} blocks. If I add more files, more blocks
> will be
> > > > create. But I can move the blocks to other place and still open the
> > > driver
> > > > with the blocks {0,1,2,...,16,2040,2047}. But when I open one of the
> > > files
> > > > I need the another blocks.
> > > >
> > > > So I would like to make a routine to preserve only the index blocks.
> The
> > > > other blocks I will move to other place when it is necessary.
> > > >
> > > > Did I make myself clear?
> > > > Thanks in advance,
> > > > Felipe
> > >
> > > Sorry I do not understand.  jclouds filesystem blobstore creates files
> > > on disk and does not know anything about the underlying blocks.  It
> uses
> > > the underlying filesystem index mechanism and this is opaque to Java.
> > >
> > > --
> > > Andrew Gaul
> > > http://gaul.org/
> > >
>
> --
> Andrew Gaul
> http://gaul.org/
>


Re: How to identify the index blocks on jclouds filesystem?

2014-05-28 Thread felipe gutierrez
ok. Thanks. It is I would like to know.

I wonder to develope a method to check if some block has the index files of
my driver, so I could open a driver with many files only with few blocks,
and fill the other blocks demand.

Would you point some code I could develop this?
This is for personal stuff, but do you think it will contribute to apache?

Thanks Andrew


On Wed, May 28, 2014 at 5:08 PM, Andrew Gaul  wrote:

> On Wed, May 28, 2014 at 08:40:50AM -0300, felipe gutierrez wrote:
> > Hi all,
> >
> > I am using jClouds BlobStore with filesystem, so I have blocks at my
> > FileSystem. I woould like to know if there is a way to check which blocks
> > contain the index of all files of my driver.
> >
> > For example, when I format a new driver, jclouds creates
> > {0,1,2,...,16,2040,2047} blocks. If I add more files, more blocks will be
> > create. But I can move the blocks to other place and still open the
> driver
> > with the blocks {0,1,2,...,16,2040,2047}. But when I open one of the
> files
> > I need the another blocks.
> >
> > So I would like to make a routine to preserve only the index blocks. The
> > other blocks I will move to other place when it is necessary.
> >
> > Did I make myself clear?
> > Thanks in advance,
> > Felipe
>
> Sorry I do not understand.  jclouds filesystem blobstore creates files
> on disk and does not know anything about the underlying blocks.  It uses
> the underlying filesystem index mechanism and this is opaque to Java.
>
> --
> Andrew Gaul
> http://gaul.org/
>


How to identify the index blocks on jclouds filesystem?

2014-05-28 Thread felipe gutierrez
Hi all,

I am using jClouds BlobStore with filesystem, so I have blocks at my
FileSystem. I woould like to know if there is a way to check which blocks
contain the index of all files of my driver.

For example, when I format a new driver, jclouds creates
{0,1,2,...,16,2040,2047} blocks. If I add more files, more blocks will be
create. But I can move the blocks to other place and still open the driver
with the blocks {0,1,2,...,16,2040,2047}. But when I open one of the files
I need the another blocks.

So I would like to make a routine to preserve only the index blocks. The
other blocks I will move to other place when it is necessary.

Did I make myself clear?
Thanks in advance,
Felipe


links about BlobStore?

2014-05-27 Thread felipe gutierrez
Hi all,

I am learning about jclouds and BlobStore. I executed an example of jClouds
with filesystem and I would like to know more about BlobStore.

For example, this link http://jclouds.apache.org/start/blobstore/ there is
some thing about BlobRequestSigner, but I would like to know more about
this. Does anyone recomend any links?

And about Filesystem providers. How could I know more about this?

I am doing an integration with a private cloud. The better way is to use
BlobStore or to implement some lib?

Thanks!
Felipe


Re: Error on ContextBuilder.newBuilder("filesystem")

2014-05-23 Thread felipe gutierrez
I got to work here. With this code I could see there are more gson-2.0 and
I took it out

URLClassLoader classLoader = (URLClassLoader) App.class.getClassLoader();
for (URL url : classLoader.getURLs()) {
System.out.println(url);
}

I have other errors now on jscsi <http://jscsi.org/>, but I am gonna work
on this later.

Thanks!
Regards
Felipe



On Fri, May 23, 2014 at 6:31 PM, Andrew Phillips  wrote:

> Quoting felipe gutierrez :
>
>  The error is on the line
>>
>> mContext = overrides.buildView(BlobStoreContext.class);
>>
>> jclouds is importing gson-2.2.4 and all the other places I put an
>> exclusion
>> on maven:
>>
>
> OK, so now it seems to be complaining that the PropertiesAdapter [1] is
> not an instance of TypeAdapter, even though it clearly is. This would seem
> to point to a classloader conflict.
>
> Are you running this inside a webapp? Do we know which classloader is
> initially loading the Gson library? Could you add some debug statements to
> your code to compare the classloader for com.google.gson.TypeAdapter with
> the classloader for e.g. org.jclouds.json.config.GsonModule?
>
> Regards
>
> ap
>
> [1] https://github.com/jclouds/jclouds/blob/master/core/src/
> main/java/org/jclouds/json/config/GsonModule.java#L244
> [2] https://code.google.com/p/google-gson/source/browse/
> trunk/gson/src/main/java/com/google/gson/GsonBuilder.java line 448
>


Re: Error on ContextBuilder.newBuilder("filesystem")

2014-05-23 Thread felipe gutierrez
I runned from cmd and I think it is the same output.


On Fri, May 23, 2014 at 2:30 PM, Andrew Phillips  wrote:

> from eclipse
>>
>
> Then I suspect we still have something on the command line that maybe is
> either in the project config cache, or is not being managed via Maven.
> Could you try to compile and run this project from the command line, and
> see if you get the same result?
>
> Thanks!
>
> ap
>
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 
2014-02-14T15:37:52-03:00)
Maven home: C:\Program Files\apache-maven-3.2.1\bin\..
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_45\jre
Default locale: pt_BR, platform encoding: Cp1252
OS name: "windows 8", version: "6.2", arch: "amd64", family: "windows"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\Program 
Files\apache-maven-3.2.1\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\Leandro\.m2\settings.xml
[DEBUG] Using local repository at C:\Users\Leandro\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for 
C:\Users\Leandro\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.jscsi:target:jar:2.5-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from 
ClassRealm[plexus.core, parent: null]
[DEBUG] Resolving plugin prefix dependency from [org.apache.maven.plugins, 
org.codehaus.mojo]
[DEBUG] Resolved plugin prefix dependency to 
org.apache.maven.plugins:maven-dependency-plugin from POM 
org.jscsi:target:jar:2.5-SNAPSHOT
[DEBUG] === REACTOR BUILD PLAN 
[DEBUG] Project: org.jscsi:target:jar:2.5-SNAPSHOT
[DEBUG] Tasks:   [dependency:resolve]
[DEBUG] Style:   Regular
[DEBUG] ===
[INFO] 
[INFO] Using the builder 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder
 with a thread count of 1
[INFO] 
[INFO] 
[INFO] Building Target 2.5-SNAPSHOT
[INFO] 
[DEBUG] Resolving plugin prefix dependency from [org.apache.maven.plugins, 
org.codehaus.mojo]
[DEBUG] Resolved plugin prefix dependency to 
org.apache.maven.plugins:maven-dependency-plugin from POM 
org.jscsi:target:jar:2.5-SNAPSHOT
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, 
process-sources, generate-resources, process-resources, compile, 
process-classes, generate-test-sources, process-test-sources, 
generate-test-resources, process-test-resources, test-compile, 
process-test-classes, test, prepare-package, package, pre-integration-test, 
integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN 
[DEBUG] Project:   org.jscsi:target:2.5-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [test]
[DEBUG] Repositories (dependencies): [ustore-localrepo 
(http://10.0.1.202:8080/maven2, releases+snapshots), maven2-repository.java.net 
(http://download.java.net/maven/2/, releases+snapshots), repo1 
(http://repo1.maven.org/maven2/, releases+snapshots), central 
(http://repo.maven.apache.org/maven2, releases)]
[DEBUG] Repositories (plugins) : [central 
(http://repo.maven.apache.org/maven2, releases)]
[DEBUG] ---
[DEBUG] Goal:  
org.apache.maven.plugins:maven-dependency-plugin:2.4:resolve (default-cli)
[DEBUG] Style: Regular
[DEBUG] Configuration: 

  ${appendOutput}
  ${classifier}
  ${excludeArtifactIds}
  ${excludeClassifiers}
  ${excludeGroupIds}
  ${excludeScope}
  ${excludeTransitive}
  ${excludeTypes}
  ${includeArtifactIds}
  ${includeClassifiers}
  ${includeGroupIds}
  ${includeScope}
  ${includeTypes}
  ${localRepository}
  ${markersDirectory}
  ${outputAbsoluteArtifactFilename}
  ${outputFile}
  ${mdep.outputScope}
  ${overWriteIfNewer}
  ${overWriteReleases}
  ${overWriteSnapshots}
  ${mdep.prependGroupId}
  ${project}
  ${reactorProjects}
  ${project.remoteArtifactRepositories}
  ${silent}
  ${type}

[DEBUG] ===
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=7, 
ConflictMarker.markTime=3, ConflictMarker.nodeCount=596, 
ConflictIdSorter.graphTime=4, ConflictIdSorter.topsortTime=2, 
ConflictIdSorter.conflictIdCount=145, ConflictIdSorter.conflictIdCycleCount=0, 
ConflictResolver.totalTime=324, ConflictResolver.conflictItemCount=255, 
DefaultDependencyCollector.collectTime=1448, 
DefaultDependencyCollector.transformTime=344

Re: Error on ContextBuilder.newBuilder("filesystem")

2014-05-23 Thread felipe gutierrez
from eclipse


On Fri, May 23, 2014 at 2:12 PM, Andrew Phillips  wrote:

> I don't see any obvious classpath dependency conflicts now, but the error
> still very much looks like that.
>
> Are you running the program from Eclipse, or from the command line via
> Maven?
>
> ap
>


Re: Error on ContextBuilder.newBuilder("filesystem")

2014-05-23 Thread felipe gutierrez
yes >

org.apache.jclouds
jclouds-blobstore
1.7.2


org.apache.jclouds.api
filesystem
1.7.2


com.google.guava
guava
15.0



On Fri, May 23, 2014 at 10:40 AM, Andrew Phillips wrote:

> Hi Filipe
>
>
>  Caused by: java.lang.IncompatibleClassChangeError: class
>> com.google.common.cache.CacheBuilder$3 has interface
>> com.google.common.base.Ticker as super class
>>
>
> This indeed also looks like a library incompatibility. Could you list the
> various versions of Google libraries that are on your classpath?
>
> Regards
>
> ap
>


Error on ContextBuilder.newBuilder("filesystem")

2014-05-23 Thread felipe gutierrez
Hi all,

I got other error on the line:

ContextBuilder overrides =
ContextBuilder.newBuilder("filesystem").overrides(properties);
mContext = overrides.buildView(BlobStoreContext.class);

maybe is another wrong version of some .jar. Does anybody have a idea? Or
how do I discover the error?

Thanks a lot! Felipe


10:18:44 ERROR main step.AbstractStep - Encountered an error executing the
step
java.util.ServiceConfigurationError: org.jclouds.apis.ApiMetadata: Provider
org.jclouds.blobstore.TransientApiMetadata could not be instantiated:
java.lang.IncompatibleClassChangeError: class
com.google.common.cache.CacheBuilder$3 has interface
com.google.common.base.Ticker as super class
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:317)
at
com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:619)
at org.jclouds.apis.Apis.all(Apis.java:72)
at org.jclouds.apis.Apis.withId(Apis.java:89)
at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:168)
at
org.jscsi.target.storage.JCloudsStorageModule.(JCloudsStorageModule.java:141)
at
org.jscsi.target.storage.RandomAccessStorageModule.open(RandomAccessStorageModule.java:345)
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.IncompatibleClassChangeError: class
com.google.common.cache.CacheBuilder$3 has interface
com.google.common.base.Ticker as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.google.common.cache.CacheBuilder.(CacheBuilder.java:207)
at org.jclouds.reflect.Reflection2.(Reflection2.java:149)
at
org.jclouds.apis.internal.BaseApiMetadata$Builder.(BaseApiMetadata.java:96)
at
org.jclouds.blobstore.TransientApiMetadata$Builder.(TransientApiMetadata.java:50)
at
org.jclouds.blobstore.TransientApiMetadata.(TransientApiMetadata.java:41)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccess

Re: Error on connect with jclouds

2014-05-23 Thread felipe gutierrez
Thanks Andrew, I solved with this dependency, guava-14.0 was breaking my
code:


  com.google.guava
  guava
  15.0




On Fri, May 23, 2014 at 1:11 AM, Andrew Phillips  wrote:

> I attached the output of mvn dependency:tree.
>>
>
> Thanks, Gaul! In that case, could you give us some details of what you
> meant by "and gson-2.0.jar at my maven directory", Filipe? jclouds itself
> uses
>
> com.google.code.gson:gson:jar:2.2.4:compile
>
> so if there's a different version of Gson also on the classpath, that
> could indeed cause problems.
>
> Regards
>
> ap
>


Re: Error on connect with jclouds

2014-05-22 Thread felipe gutierrez
Taking out the aws dependency at pom.xml I have other error

17:30:07 ERROR main step.AbstractStep - Encountered an error executing the
step
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.util.TypeToken2.where(TypeToken2.java:68)
at
org.jclouds.rest.config.BinderUtils.bindCallGetOnFutures(BinderUtils.java:145)
at
org.jclouds.rest.config.BinderUtils.bindSyncToAsyncApi(BinderUtils.java:135)
at
org.jclouds.filesystem.config.FilesystemBlobStoreContextModule.configure(FilesystemBlobStoreContextModule.java:50)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
at
org.jscsi.target.storage.JCloudsStorageModule.(JCloudsStorageModule.java:140)
at
org.jscsi.target.storage.RandomAccessStorageModule.open(RandomAccessStorageModule.java:345)
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)
17:30:07 ERROR main batch.App - Exit Status :
[java.lang.IllegalAccessError: tried to access class
com.google.common.reflect.TypeResolver from class
org.jclouds.util.TypeToken2]



On Thu, May 22, 2014 at 5:02 PM, felipe gutierrez  wrote:

> Thanks for reply Andrew,
>
> Do i need some account at AWS when I use a "filesystem" ?
>
> I have it o my maven:
>  
> org.apache.jclouds
> jclouds-blobstore
>  1.7.2
> 
> 
>  org.apache.jclouds.provider
> aws-s3
>  1.7.2
> 
> 
>  org.apache.jclouds.api
> filesystem
>  1.7.2
> 
> 
>
> 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$

Re: Error on connect with jclouds

2014-05-22 Thread felipe gutierrez
Thanks for reply Andrew,

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

I have it o my maven:

org.apache.jclouds
jclouds-blobstore
1.7.2


org.apache.jclouds.provider
aws-s3
1.7.2


org.apache.jclouds.api
filesystem
1.7.2



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.(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.(BaseRestApiMetadata.java:74)
at org.jclouds.s3.S3ApiMetadata$Builder.(S3ApiMetadata.java:102)
at
org.jclouds.aws.s3.AWSS3ApiMetadata$Builder.(AWSS3ApiMetadata.java:71)
at org.jclouds.aws.s3.AWSS3ApiMetadata.(AWSS3ApiMetadata.java:55)
at
org.jclouds.aws.s3.AWSS3ProviderMetadata$Builder.(AWSS3ProviderMetadata.java:84)
at
org.jclouds.aws.s3.AWSS3ProviderMetadata.builder(AWSS3ProviderMetadata.java:47)
at
org.jclouds.aws.s3.AWSS3ProviderMetadata.(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.jc

Error on connect with jclouds

2014-05-22 Thread felipe gutierrez
Hi all,

I am trying for the first time to connect in a filesystem with jclouds:

Properties properties = new Properties();
properties.setProperty(FilesystemConstants.PROPERTY_BASEDIR,
pFile.getAbsolutePath());
mContext =
ContextBuilder.newBuilder("filesystem").overrides(properties).credentials("Unused",
Optional.absent().toString()).buildView(BlobStoreContext.class);

and I get this error:

16:01:15 ERROR main step.AbstractStep - Encountered an error executing the
step
java.lang.NoClassDefFoundError: com/google/gson/TypeAdapterFactory
at org.jclouds.rest.config.RestModule.configure(RestModule.java:62)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)