[google-appengine] Remote API + File API
Hi, Maybe I've misunderstood docs, but I thought it was possible an external application to integrate with App Engine by creating a file in Blobstore. Am I doing something wrong?? Any way to accomplish this?? http://code.google.com/appengine/docs/java/blobstore/overview.html#Writing_Files_to_the_Blobstore Thanks. Code: public class RemoteAPI { public static void main(String[] args) throws IOException { String username = "x...@gmail.com"; String password = "x"; RemoteApiOptions options = new RemoteApiOptions() .server("primepartes.appspot.com", 443) .credentials(username, password); RemoteApiInstaller installer = new RemoteApiInstaller(); installer.install(options); FileService fileService = FileServiceFactory.getFileService(); BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); AppEngineFile file = fileService.createNewBlobFile("text/ plain"); FileWriteChannel writeChannel = fileService.openWriteChannel(file, true); PrintWriter out = new PrintWriter(Channels.newWriter(writeChannel, "UTF8")); out.println("The woods are lovely dark and deep."); out.println("But I have promises to keep."); out.close(); writeChannel.closeFinally(); // This line throwns the excepion bellow .. java.lang.IllegalStateException: The current request does not hold the exclusive lock. at com.google.appengine.api.files.FileServiceImpl.close(FileServiceImpl.java: 315) at com.google.appengine.api.files.FileWriteChannelImpl.closeFinally(FileWriteChannelImpl.java: 78) at br.com.teste.RemoteAPI.main(RemoteAPI.java:82) -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Remote API + File API
Without "out.close()" throws this exception on or "writeChannel.closeFinally()": Exception in thread "main" java.lang.IllegalStateException: The current request does not hold the exclusive lock. at com.google.appengine.api.files.FileServiceImpl.close(FileServiceImpl.java: 315) at com.google.appengine.api.files.FileWriteChannelImpl.closeFinally(FileWriteChannelImpl.java: 78) at br.com.teste.RemoteAPI.main(RemoteAPI.java:94) Excuse me, bill is not enabled for my app, but exception should be clear about this. "Note: The Blobstore API is only available for apps with billing enabled. You still get an amount of quota for free, but billing must be enabled to use it." http://code.google.com/appengine/docs/quotas.html#Blobstore Thanks. On 18 ago, 17:35, "Wen (Google)" wrote: > I read the doc. you pointed out as such: when "out.close()" was > called, the "writeChannel" was not closed; when "readChannel.close()" > was called, the "reader" itself was not closed. So, looks like you > only need to do one or the other. It may have to do with how closing > is implemented on the channels. > > So remove "out.close()", and see if the exception would go away. > > Wen > > On Aug 18, 7:05 am, André Salvati wrote: > > > > > > > > > Hi, > > > Maybe I've misunderstood docs, but I thought it was possible an > > external application to integrate with App Engine by creating a file > > in Blobstore. Am I doing something wrong?? Any way to accomplish > > this?? > > >http://code.google.com/appengine/docs/java/blobstore/overview.html#Wr... > > > Thanks. > > > Code: > > > public class RemoteAPI { > > > public static void main(String[] args) throws IOException { > > > String username = "x...@gmail.com"; > > String password = "x"; > > > RemoteApiOptions options = new RemoteApiOptions() > > .server("primepartes.appspot.com", 443) > > .credentials(username, password); > > RemoteApiInstaller installer = new RemoteApiInstaller(); > > installer.install(options); > > > FileService fileService = FileServiceFactory.getFileService(); > > BlobstoreService blobstoreService = > > BlobstoreServiceFactory.getBlobstoreService(); > > > AppEngineFile file = fileService.createNewBlobFile("text/ > > plain"); > > > FileWriteChannel writeChannel = > > fileService.openWriteChannel(file, true); > > > PrintWriter out = new > > PrintWriter(Channels.newWriter(writeChannel, "UTF8")); > > out.println("The woods are lovely dark and deep."); > > out.println("But I have promises to keep."); > > > out.close(); > > writeChannel.closeFinally(); // This line throwns the excepion > > bellow > > > .. > > > java.lang.IllegalStateException: The current request does not hold the > > exclusive lock. > > at > > com.google.appengine.api.files.FileServiceImpl.close(FileServiceImpl.java: > > 315) > > at > > com.google.appengine.api.files.FileWriteChannelImpl.closeFinally(FileWriteC > > hannelImpl.java: > > 78) > > at br.com.teste.RemoteAPI.main(RemoteAPI.java:82) -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: How to set Task Queue order?
Hi Leandro, I've asked same question os stackoverflow. http://stackoverflow.com/questions/9982369/is-there-a-way-to-assure-fifo-first-in-first-out-behavior-with-task-queues-on Please star it ;) On Apr 4, 10:47 am, Leandro Rezende wrote: > Nicholas Verne, i will try the , what about the > order? > > as i read in doc, it says that is FIFO, but in my tests it was running in a > random order. > > thx > > 2012/4/4 David Hardwick > > > > > > > > > The Pipeline would be my recommendation. > > >http://code.google.com/p/appengine-pipeline/ > > > On Apr 4, 4:10 am, Nicholas Verne wrote: > > > You could add task 2 from task 1, add task 3 from task 2 etc. > > > > To prevent task2 starting before task1 finishes, set > > > max_concurrent_requests to 1 for the queue. > > > > Nick Verne > > > > On Wed, Apr 4, 2012 at 3:37 PM, Leandro Rezende > > > > wrote: > > > > im adding 10 taskes at the Queue, but i would like to a Task wait the > > > > previous task finish before it run.. > > > > > Example: > > > > > - Added 10 tasks. > > > > - Task 1 Run > > > > - Task 1 Finish > > > > - Task 2 Begin > > > > - Task 2 Finish > > > > - Task 3 Begin > > > > - .. > > > > > is it possible? > > > > > Leandro > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Google App Engine" group. > > > > To post to this group, send email to google-appengine@googlegroups.com > > . > > > > To unsubscribe from this group, send email to > > > > google-appengine+unsubscr...@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/google-appengine?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to google-appengine@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Google App Engine File Upload Canceled. Where is the HTTP 32MB size limit?
Hi, could someone from App Engine team take a look at this?? http://stackoverflow.com/questions/11637121/google-app-engine-file-upload-canceled Thanks. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/l8zAwEmQo5cJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Billing issues
We have a very critical app. Is there any trouble with the billing process or I'm not being charged anymore? I'm not being able to see charges since September-18. Someone from Google (App Engine) could answer? Thanks. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
[google-appengine] Issues deploying app
Hi, I'm having issues deploying my Java app (see log attached). It started yesterday. Is there something wrong with GAE environment? Thanks. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out. appcfg46759059643469556.log Description: Binary data