[ 
https://issues.apache.org/jira/browse/JCLOUDS-979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14650379#comment-14650379
 ] 

Roman Coedo commented on JCLOUDS-979:
-------------------------------------

This bug was introduced with this commit 
https://github.com/jclouds/jclouds/commit/5ad245dea56b94735cc85c792a19c7121a0eb7dd
 which assumes that every local blobstore returns blobs with a ByteArrayPayload 
or a FilePayload. This is not the case in JdbcBlobStore.

Changing the way this blobstore handles the payloads is not trivial, since jpa 
doesn't support mapping big blobs, we have to chunk every payload and have a 
special stream which make database calls to ask for more chunks when needed.

> BaseJdbcBlobStoreTest.testRanges failure
> ----------------------------------------
>
>                 Key: JCLOUDS-979
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-979
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore, jclouds-labs
>    Affects Versions: 2.0.0
>            Reporter: Andrew Gaul
>            Assignee: Roman Coedo
>            Priority: Minor
>
> {noformat}
> java.lang.ClassCastException: org.jclouds.jdbc.util.JdbcInputStream cannot be 
> cast to com.google.common.io.ByteSource
>       at 
> org.jclouds.blobstore.config.LocalBlobStore.getBlob(LocalBlobStore.java:689)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>       at com.sun.proxy.$Proxy58.getBlob(Unknown Source)
>       at 
> org.jclouds.jdbc.BaseJdbcBlobStoreTest.testRanges(BaseJdbcBlobStoreTest.java:596)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
>       at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
>       at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
>       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
>       at 
> org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
>       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> {noformat}
> From: 
> https://jclouds.ci.cloudbees.com/job/jclouds-labs/1061/org.apache.jclouds.labs$jdbc/testReport/junit/org.jclouds.jdbc/EclipselinkH2BlobStoreTest/testRanges/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to