Trying to access my file through the browser:

http://storage.googleapis.com/BUCKETNAME/FILENAME

I get the following:

<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
</Error>


On Friday, March 15, 2013 5:26:03 PM UTC-7, Sevak Asadorian wrote:
>
> SEVERE: javax.servlet.ServletContext log: Exception while dispatching 
> incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
> abstract java.lang.String 
> com.maple.main.client.GreetingService.importData() throws 
> java.io.IOException' threw an unexpected exception: 
> java.lang.IllegalArgumentException: 
> https://storage.cloud.google.com/maple/save.txt is not a valid path
>
>
> On Friday, March 15, 2013 5:25:23 PM UTC-7, Sevak Asadorian wrote:
>>
>> I am getting an ExpectedException trying to read from Google Cloud 
>> Storage. Please help!
>>
>> This is the function that I am using to read my file.
>>
>> public String importData() {
>>
>> String result = "Done reading file.";
>> boolean lockForRead = false;
>> String filename = "/gs/maple/save.txt";
>>  try { 
>> // Get the file
>> FileService fileService = FileServiceFactory.getFileService(); 
>> AppEngineFile readableFile = new AppEngineFile(filename);
>> FileReadChannel readChannel = fileService.openReadChannel(readableFile, 
>> lockForRead);
>>
>> // Read the file
>> BufferedReader reader = new 
>> BufferedReader(Channels.newReader(readChannel, "UTF8"));
>> String line = reader.readLine();
>> System.out.println("line = " + line);
>> readChannel.close();
>>  }
>> catch (IOException e) { 
>> result = "Failed to read file";
>> e.printStackTrace();
>> }
>> return result;
>> }
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to