Question

I'm trying to accomplish Reading and Creating folders in the operations Own Cloud server through AsyncTask, login to the server with my credentials is done successfully, but when trying to create folders and read the following errors in the log is described below, which would be the possible reason for the error?

    04-07 15:45:24.500: I/OwnCloud(31352): Sending File
04-07 15:45:24.510: I/OwnCloud(31352): Start Read Remote Folder
04-07 15:45:24.620: I/ReadRemoteFolderOperation(31352): Synchronized /: Operation finished with HTTP status code 207 (success)
04-07 15:45:24.630: I/OwnCloud(31352): Sending File
04-07 15:45:24.630: W/dalvikvm(31352): threadid=11: thread exiting with uncaught exception (group=0x40ffe438)
04-07 15:45:24.640: E/AndroidRuntime(31352): FATAL EXCEPTION: AsyncTask #1
04-07 15:45:24.640: E/AndroidRuntime(31352): java.lang.RuntimeException: An error occured while executing doInBackground()
04-07 15:45:24.640: E/AndroidRuntime(31352):    at android.os.AsyncTask$3.done(AsyncTask.java:299)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.lang.Thread.run(Thread.java:856)
04-07 15:45:24.640: E/AndroidRuntime(31352): Caused by: java.lang.ArrayIndexOutOfBoundsException: length=5; index=5
04-07 15:45:24.640: E/AndroidRuntime(31352):    at com.prologica.procamera.MainActivity$UploadPhotos.SendFolders(MainActivity.java:127)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at com.prologica.procamera.MainActivity$UploadPhotos.doInBackground(MainActivity.java:95)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at com.prologica.procamera.MainActivity$UploadPhotos.doInBackground(MainActivity.java:1)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at android.os.AsyncTask$2.call(AsyncTask.java:287)
04-07 15:45:24.640: E/AndroidRuntime(31352):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-07 15:45:24.640: E/AndroidRuntime(31352):    ... 5 more
Was it helpful?

Solution

You have an array out of bound in com.prologica.procamera.MainActivity UploadPhotos.SendFolders(MainActivity.java:127). Check line 127 in MainActivity to make sure you are not going out of bounds. According to the log, the length is 5 and you are trying to access index 5(which does not exist)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top