[appengine-java] Re: Problem with query
Use the query API to define the query (such as query.setFilter() etc). The single-string parsing had a bug in the (old) version of DataNucleus being used. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: ability to implement queue or wrapper to queue with an internal latch
Hi Ikai, Yes and a little more. The individual work processes can run multiply in parallel, but the pattern I'm using is a sequential workflow (of parallelizable processes). Having the workflow schedule definable in a configuration file like the cron.xml or queue.xml, but with the added ability to terminate on a certain condition is what I was thinking about. Alternatively the queue.xml file has the ability to specify the frequency of the operation and the cron.xml file has the ability to specify the a discrete set of times for the operation, so the combined ability to specify a set of start times with an interval over which an operation repeats would be a good substitution. To add a little more context, I'm working from the perspective of wanting to use the cron.xml to invoke my workflow on a regular schedule, not having enough slots to enter the number of iterations it needs along with other processes outside of it in that cron.xml. I'm interested in using the Task Queue API instead for the workflow, but do not want the operation to run all day. I'm still reading the Task Queue API, so it may be that it's straight forward to add and remove a task from the Queue... it's just that the total solution for the problem I've set up requires many moving parts (a cron.xml operation to put the workflow in a task and an operation to remove it when the workflow state changes) and I like the idea of being able to configure it in a file if possible. Thanks for your help, pushing it back onto the queue from a cron job sounds like the right solution for now. -Nichole On Nov 10, 2:51 pm, Ikai L (Google) ika...@google.com wrote: Nichole, Our Task Queue API will take care of distributing your background tasks across separate application instances:http://code.google.com/appengine/docs/java/taskqueue/overview.html It sounds like what you are describing is the ability to increase your ability to parallelize long running tasks. A typical pattern for this would be to lazy when possible in your job execution: when the first queue comes in, chop it up into several other tasks and push them back into the queue. Repeat as necessary. On Sat, Nov 7, 2009 at 4:03 AM, Nichole nichole.k...@gmail.com wrote: Hello, Thanks for use of the app engine! I'm wondering if there are future plans to implement something like the ability to use a concurrent count down latch with a wrapper to or within a queue implementation? It would be nice to be able to set a condition upon which multiple processors operating on the same task are done and the next in a sequence of tasks can be started. I'm implementing this in other ways currently... -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] export large dataset
hi all, I need export a large dataset may be 25k entitys with 15string properties. I know limit of 1000 and 30 seconds. Any idea to can export data to csv, I can split in little chuck ok but how download?. I know appcfg but my feature is for end user and I would like do a simple page with a button. Can I create a datataset in memory and build and put in a datastore to dowload. What happend if download process spent more than 30 sec. ? many thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Jdo: detaching objects vs. merging transient objects
thanks for your answers: Pierre, the StreamingQueryResult is not serializable. However, to my understanding this problem is alleviated when you work with detached objects since you call something like Collection c = pm.detachCopyAll(resultList); at the end and you are then returning the instance c Rusty, I am creating a wicket-based application from scratch. At the beginning I included spring for dependency injection, transactions, and open session in view behavior. However, I got rid of spring since its behavior in terms of transactions is mosty not required on GAE and also sometimes not completely clear to me. OSIV is nice, but I trying to do that by means of wicket only (if required since we don't work with so many tables as in web application having relational datastores. without spring I am currently not experiencing big problems with detached objects. regards, andr On 10 Nov., 22:54, Rusty Wright rwright.li...@gmail.com wrote: I'm finding that it's nearly impossible to work with the detaching objects style. I can't tell for sure what's happening other than when I add a PersistenceCapable object to another PersistenceCapable object's collection (i.e., the first one will be the child of the second one) that I get an error about trying to persist objects in different entity groups in the same transaction. I'm using Spring and subclassing JdoDaoSupport and the transactions are handled for me; I'm not sure if that's part of the problem. With JdoDaoSupport I never need to open or close the persistence manager or start and commit transactions, although I do have an xml file that does the aop proxy wrapping of my classes. a.mazawrote: I've used the merging of transient objects approach for a while as described inhttp://timepedia.blogspot.com/2009/04/google-appengine-and-gwt-now-ma... and it works quite fine. I only subsituted the proposed implementation of copying fields by dozer. However, I am still thinking to move to the detaching objects approach and played around with it a bit. So far, the detaching objects approachs seems more cumbersome to me... I would be happy to hear some thoughts... regards, andr- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Bi-directional unowned one-to-many relationships?
I am thinking if it makes sense from a design perspektive to model unowned bi-directional one-to-many relationships.I did some search on the web but didn't find many thoughts about such type of relationship. The two entity types I have should not be in an owned relationship for some reasons. Thus, I was thinking about using the relation index pattern as presented at Google I/O (http://code.google.com/intl/de-AT/ events/io/2009/sessions/BuildingScalableComplexApps.html) However, I am not fully happy with that as outlined in another thread (http://groups.google.com/group/google-appengine-java/browse_thread/ thread/2bba41ce4699d65e/918fee627cc41e02?#918fee627cc41e02) mainly due to performance issues when iterating over the keys in memory. Thus I was thinking about modeling the two entities in an unowned bi- directional style implying that I have to update the two entities in separate transactions in order to keep the relationship between the two entities. I would like to hear your thoughts about this. My main concern is consistency when something goes wrong in one of the two transactions. thanks, andr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: any plans for deferred.defer in Java?
Hi Vince, On Wed, Nov 11, 2009 at 2:07 PM, Vince Bonfanti vbonfa...@gmail.com wrote: Hi Nick, I'm taking this off-list for now. I've visited codereview.appspot.com, but am confused. I tried creating a new issue, but: - what do I specify for SVN base? Leave it blank if it'll let you - otherwise, use *http*:// googleappengine.googlecode.com/svn/trunk/java/ - it will only let me upload a patch file (not a java source file), but I'm not sure how to create a patch for a brand-new file? Try diff /dev/null /path/to/your/file. :) Can you offer some help? thanks. Vince On Tue, Nov 10, 2009 at 5:12 PM, Nick Johnson (Google) nick.john...@google.com wrote: Hi Vince, Thanks for doing this! Could you upload your code to codereview.appspot.com and link to it from the issue? We can continue the discussion there. -Nick On Tue, Nov 10, 2009 at 9:37 PM, Vince Bonfanti vbonfa...@gmail.com wrote: I've faxed over the CLA and created issue #2381 for this: http://code.google.com/p/googleappengine/issues/detail?id=2381 Here are the changes I've made since the original implementation: - The Deferrable.doTask method is now declared to throw Exception (instead of PermanentTaskFailure). This allows implementations to throw any subclass of Exception in order to have the task retried. (PermanentTaskFailure remains a subclass of Exception). - The Deferrable.doTask method no longer takes any arguments. - Removed the TaskHolder nested class since it's no longer needed. - Allow an extra 240 bytes for task overhead; in testing the actual overhead was 101 bytes, so this will leave some head-room. In addition, the IllegalArgumentException that's thrown if the task size is exceeded is caught (and logged), and the task it then written to the datastore. - An exception is logged if payload is not an instance of Deferrable. - If the task is written to the datastore and there's a subsequent failure to queue the task, the datastore entity is deleted. - Try twice for datatstore puts and deletes in case of DatastoreTimeoutException. - Try twice when queuing a task in case of TransientFailureException. - Added comments. Let me know if you have additional feedback. Vince On Sun, Nov 8, 2009 at 3:34 PM, Nick Johnson (Google) nick.john...@google.com wrote: Hi Vince, On Sun, Nov 8, 2009 at 7:58 PM, Vince Bonfanti vbonfa...@gmail.com wrote: Hi Nick, Thanks for your feedback. Yes, I'm very interested in seeing this included in the official SDK. What are the steps from here? See this doc: http://groups.google.com/group/google-appengine/web/how-to-submit-a-patch-to-the-sdk See responses to specific questions inserted below. Vince - Perhaps make PermanentTaskFailure a runtime exception, which would eliminate the need to declare it on methods that throw it. That's fine. I generally prefer checked exceptions, but if the AppEngine team prefers unchecked exceptions, I'm happy to make this change. I wouldn't say we prefer them in general - but personally, I think common uses of PermanentTaskFailure fit into the same sort of category as out of memory errors, divisions by zero, and so forth - they're not predictable at design-time. - If you do the above, you could make the Deferrable interface extend Runnable, as suggested in the meeting. I'm not sure that's appropriate, since the implications of Runnable are different. I think Runnable is not appropriate. I also looked at Callable, but in the end thought a new interface--Deferrable--was the best option. Fair enough. - I'm not sure there's any need to be able to pass arguments to the Deferrable, since users will already have to declare a deferrable class and instantiate it. I'm open to convincing, though. I put the arguments there to mimic the Python API and then realized later they're not really needed. Removing the arguments also simplifies the code by eliminating the need for the TaskHolder class--the Deferrable class could be serialized directly. I'm happy to remove the arguments if that's what the AppEngine team decides is best. Since the Java version is inevitably different due to the need for a custom class instead of a function object, I'd vote to drop the arguments. - Have you tested tasks of size exactly MaxTaskSizeBytes? At least in Python, the actual limit seems to include some overhead that varies from task to task. No, I haven't tested this yet. - If payload isn't an instance of TaskHolder, the task will silently return - it should log an error. I think the only way payload won't be an instance of TaskHolder is if the deserialize() method returns null, in which case an error has already been logged. But I'll
[appengine-java] Re: Problem with gdata services
The JAR files are being included in my build. The first time I run the app, I get this error: HTTP ERROR: 500 INTERNAL_SERVER_ERROR RequestURI=/view Caused by: java.lang.ExceptionInInitializerError at com.google.gdata.client.http.GoogleGDataRequest $Factory.createRequest(GoogleGDataRequest.java:73) at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest (HttpGDataRequest.java:162) at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest (HttpGDataRequest.java:168) at com.google.gdata.client.Service.createRequest(Service.java:713) at com.google.gdata.client.GoogleService.createRequest (GoogleService.java:535) at com.google.gdata.client.Service.createFeedRequest(Service.java: 1174) at com.google.gdata.client.Service.getFeed(Service.java:994) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 662) at com.google.gdata.client.Service.query(Service.java:1155) at com.google.gdata.client.Service.query(Service.java:1096) at contacts.ViewContacts.doGet(ViewContacts.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:342) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete (HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run (BoundedThreadPool.java:442) Caused by: java.security.AccessControlException: access denied (java.net.NetPermission getCookieHandler) at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323) at java.security.AccessController.checkPermission (AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java: 532) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:151) at java.net.CookieHandler.getDefault(CookieHandler.java:58) at com.google.gdata.client.http.GoogleGDataRequest $GoogleCookieHandler.(GoogleGDataRequest.java:316) at com.google.gdata.client.http.GoogleGDataRequest $GoogleCookieHandler.(GoogleGDataRequest.java:305) at com.google.gdata.client.http.GoogleGDataRequest. (GoogleGDataRequest.java:408) ... 36 more Caused by: java.security.AccessControlException: access denied (java.net.NetPermission getCookieHandler) at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323) at java.security.AccessController.checkPermission (AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java: 532) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:151) at java.net.CookieHandler.getDefault(CookieHandler.java:58) at com.google.gdata.client.http.GoogleGDataRequest $GoogleCookieHandler.(GoogleGDataRequest.java:316) at com.google.gdata.client.http.GoogleGDataRequest
[appengine-java] Re: export large dataset
Hi there, Good question. I think you'll probably need to make the export an asynchronous process that iterates through your dataset and writes out a CSV blob to a temp Datastore entity, or to memcache in 1MB chunks. I've done some toy examples of this, but nothing in production. My recipe involves 3 basic parts: - AJAX progress-bar type control on the client UI (reusable) - Main request handler that is response for queueing the export request, polling for status, and fetching the completed results (reusable) - Async task queue handler that does the work of building the export data (custom per-export type) Pseudo-code might work like this: - User clicks 'export' button, which fires off an AJAX request to your GAE request handler URL to kick off an export - Request handler is invoked in your app - Creates an ExportJob entity in the datastore. ExportJob might have these properties: - Key key - boolean isDone - int entitiesProcessed - ListString memcacheKeys - Queues up a TaskQueue invocation with params: offset=0, exportJobKey=[key] (key of ExportJob entity in datastore) - Returns the exportJobKey back to the client - AJAX call completes - client now has a key to the job - Client polls the server using that key, which returns the entitiesProcessed and isDone fields, so you can tell the user Processed xxx entities - ExportJobTask handler gets invoked in background - In loop, loads a window of entities from the DataStore using the offset passed in - Appends CSV data to a StringBuilder - Loop exit when a timeout upper limit is reached (say, 15 seconds) OR when stringbuilder.size() is close to 1MB OR when all entities are done - Loads ExportJob with this key from DataStore - Puts the CSV stringbuilder into a new memcache entry, using the key + a numeric offset - Appends the memcache key to ExportJob.memcacheKeys - Sets ExportJob.entitiesProcessed += CSV line count - If no more entities: - Sets ExportJob.isDone = true - Saves ExportJob back to DataStore - Else - Stores ExportJob back to DataStore - Queues another taskqueue job back to itself with the same key, and with offset = entitiesProcessed-1 - When job done, AJAX handler invokes initial request handler with key and another flag getData=1 or something - Loads ExportJob from datastore - Loops through ExportJob.memcacheKeys - Loads CSV blob from memcache - streams to servletresponse - deletes memache entry - Deletes ExportJob - Done.. Maybe there's a simpler way? -- James On Nov 11, 2:12 am, alf alberto@gmail.com wrote: hi all, I need export a large dataset may be 25k entitys with 15string properties. I know limit of 1000 and 30 seconds. Any idea to can export data to csv, I can split in little chuck ok but how download?. I know appcfg but my feature is for end user and I would like do a simple page with a button. Can I create a datataset in memory and build and put in a datastore to dowload. What happend if download process spent more than 30 sec. ? many thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Paging in java application
Greetings to All, I found this documentation http://code.google.com/appengine/articles/paging.html on paging in python. Can some one suggest the best way to implement pagin in a java application deployed in GAE and data store in GAE data store. I want to show say 10 images in every page out of around 1000 (available in DB). Also please let me know any widgets available to implement pagination. -Sanjith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] logs in dashboard ... how do they work?
I love the way that the google app engine does logs. It's very useful to filter by info / error / warn and then just click the + to expand the message complete with stack trace. I want be able to do this with my spring app in a normal tomcat / glassfish container. Is this backed by some open source software that might make this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Problem with gdata services
Check out http://code.google.com/intl/zh-HK/appengine/kb/java.html#googledata and http://code.google.com/p/gdata-java-client/issues/detail?id=122 On Nov 11, 2:39 pm, Josh joshua.t.gr...@gmail.com wrote: The JAR files are being included in my build. The first time I run the app, I get this error: HTTP ERROR: 500 INTERNAL_SERVER_ERROR RequestURI=/view Caused by: java.lang.ExceptionInInitializerError at com.google.gdata.client.http.GoogleGDataRequest $Factory.createRequest(GoogleGDataRequest.java:73) at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest (HttpGDataRequest.java:162) at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest (HttpGDataRequest.java:168) at com.google.gdata.client.Service.createRequest(Service.java:713) at com.google.gdata.client.GoogleService.createRequest (GoogleService.java:535) at com.google.gdata.client.Service.createFeedRequest(Service.java: 1174) at com.google.gdata.client.Service.getFeed(Service.java:994) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 662) at com.google.gdata.client.Service.query(Service.java:1155) at com.google.gdata.client.Service.query(Service.java:1096) at contacts.ViewContacts.doGet(ViewContacts.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:342) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete (HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run (BoundedThreadPool.java:442) Caused by: java.security.AccessControlException: access denied (java.net.NetPermission getCookieHandler) at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323) at java.security.AccessController.checkPermission (AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java: 532) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:151) at java.net.CookieHandler.getDefault(CookieHandler.java:58) at com.google.gdata.client.http.GoogleGDataRequest $GoogleCookieHandler.(GoogleGDataRequest.java:316) at com.google.gdata.client.http.GoogleGDataRequest $GoogleCookieHandler.(GoogleGDataRequest.java:305) at com.google.gdata.client.http.GoogleGDataRequest. (GoogleGDataRequest.java:408) ... 36 more Caused by: java.security.AccessControlException: access denied (java.net.NetPermission getCookieHandler) at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323) at java.security.AccessController.checkPermission (AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java: 532) at com.google.appengine.tools.development.DevAppServerFactory
[appengine-java] app engine query error - java.lang.OutOfMemoryError: Java heap space
When accessing a certain page on my app i get the error: Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. The report link does not seem to work so i thought i'd post it here, please let me know if I should be reporting this elsewhere. thankyou heres the query: query: select from com.dr.reviewengine.entity.Rating where name == iniciador madrid and the trace: # Error for /entity java.lang.OutOfMemoryError: Java heap space at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.newByteArray (ProtocolSource.java:468) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.getUninterpreted (ProtocolSource.java:461) at com.google.storage.onestore.v3.OnestoreEntity$Reference.merge (OnestoreEntity.java:4192) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:377) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:394) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.parseFrom (ProtocolMessage.java:506) at com.google.appengine.api.datastore.KeyFactory.stringToKey (KeyFactory.java:196) at org.datanucleus.store.appengine.query.DatastoreQuery.internalPkToKey (DatastoreQuery.java:1163) at org.datanucleus.store.appengine.query.DatastoreQuery.addLeftPrimaryExpression (DatastoreQuery.java:940) at org.datanucleus.store.appengine.query.DatastoreQuery.addExpression (DatastoreQuery.java:715) at org.datanucleus.store.appengine.query.DatastoreQuery.addFilters (DatastoreQuery.java:663) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute (DatastoreQuery.java:214) at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute (JDOQLQuery.java:84) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithArray(Query.java: 1371) at org.datanucleus.store.query.Query.execute(Query.java:1344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221) at com.dr.reviewengine.ReviewengineServlet.viewHelper (ReviewengineServlet.java:327) at com.dr.reviewengine.ReviewengineServlet.doGet (ReviewengineServlet.java:65) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter (SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) # C 11-11 10:09AM 01.840 Uncaught exception from servlet java.lang.OutOfMemoryError: Java heap space at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.newByteArray (ProtocolSource.java:468) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.getUninterpreted (ProtocolSource.java:461) at com.google.storage.onestore.v3.OnestoreEntity$Reference.merge (OnestoreEntity.java:4192) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:377) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:394) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.parseFrom (ProtocolMessage.java:506) at com.google.appengine.api.datastore.KeyFactory.stringToKey (KeyFactory.java:196) at org.datanucleus.store.appengine.query.DatastoreQuery.internalPkToKey (DatastoreQuery.java:1163) at org.datanucleus.store.appengine.query.DatastoreQuery.addLeftPrimaryExpression (DatastoreQuery.java:940) at org.datanucleus.store.appengine.query.DatastoreQuery.addExpression (DatastoreQuery.java:715) at org.datanucleus.store.appengine.query.DatastoreQuery.addFilters (DatastoreQuery.java:663) at
[appengine-java] Update on current problems
Hi noticed that several of my applications were down for a while today. Any news on what caused the outage? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: app engine query error - java.lang.OutOfMemoryError: Java heap space
I used getObjectById() instead of newQuery() and the error went away Thanks Max On Wed, Nov 11, 2009 at 8:04 PM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: I'm pretty sure you're hitting this: http://code.google.com/p/googleappengine/issues/detail?id=2221 This will be fixed in the next SDK (1.2.8) but until then the workaround is to replace the hard-coded String with a parameter and pass a Key value instead of the string. On Wed, Nov 11, 2009 at 10:20 AM, david fastn...@gmail.com wrote: When accessing a certain page on my app i get the error: Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. The report link does not seem to work so i thought i'd post it here, please let me know if I should be reporting this elsewhere. thankyou heres the query: query: select from com.dr.reviewengine.entity.Rating where name == iniciador madrid and the trace: # Error for /entity java.lang.OutOfMemoryError: Java heap space at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.newByteArray (ProtocolSource.java:468) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.getUninterpreted (ProtocolSource.java:461) at com.google.storage.onestore.v3.OnestoreEntity$Reference.merge (OnestoreEntity.java:4192) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:377) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:394) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.parseFrom (ProtocolMessage.java:506) at com.google.appengine.api.datastore.KeyFactory.stringToKey (KeyFactory.java:196) at org.datanucleus.store.appengine.query.DatastoreQuery.internalPkToKey (DatastoreQuery.java:1163) at org.datanucleus.store.appengine.query.DatastoreQuery.addLeftPrimaryExpression (DatastoreQuery.java:940) at org.datanucleus.store.appengine.query.DatastoreQuery.addExpression (DatastoreQuery.java:715) at org.datanucleus.store.appengine.query.DatastoreQuery.addFilters (DatastoreQuery.java:663) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute (DatastoreQuery.java:214) at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute (JDOQLQuery.java:84) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithArray(Query.java: 1371) at org.datanucleus.store.query.Query.execute(Query.java:1344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221) at com.dr.reviewengine.ReviewengineServlet.viewHelper (ReviewengineServlet.java:327) at com.dr.reviewengine.ReviewengineServlet.doGet (ReviewengineServlet.java:65) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter (SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) # C 11-11 10:09AM 01.840 Uncaught exception from servlet java.lang.OutOfMemoryError: Java heap space at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.newByteArray (ProtocolSource.java:468) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSource.getUninterpreted (ProtocolSource.java:461) at com.google.storage.onestore.v3.OnestoreEntity$Reference.merge (OnestoreEntity.java:4192) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:377) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolMessage.mergeFrom (ProtocolMessage.java:394) at
[appengine-java] Re: Problem with gdata services
Thanks. That worked. On Nov 11, 1:01 pm, Roy roy.smith@googlemail.com wrote: Check out http://code.google.com/intl/zh-HK/appengine/kb/java.html#googledata and http://code.google.com/p/gdata-java-client/issues/detail?id=122 On Nov 11, 2:39 pm, Josh joshua.t.gr...@gmail.com wrote: The JAR files are being included in my build. The first time I run the app, I get this error: HTTP ERROR: 500 INTERNAL_SERVER_ERROR RequestURI=/view Caused by: java.lang.ExceptionInInitializerError at com.google.gdata.client.http.GoogleGDataRequest $Factory.createRequest(GoogleGDataRequest.java:73) at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest (HttpGDataRequest.java:162) at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest (HttpGDataRequest.java:168) at com.google.gdata.client.Service.createRequest(Service.java:713) at com.google.gdata.client.GoogleService.createRequest (GoogleService.java:535) at com.google.gdata.client.Service.createFeedRequest(Service.java: 1174) at com.google.gdata.client.Service.getFeed(Service.java:994) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 662) at com.google.gdata.client.Service.query(Service.java:1155) at com.google.gdata.client.Service.query(Service.java:1096) at contacts.ViewContacts.doGet(ViewContacts.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:342) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete (HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run (BoundedThreadPool.java:442) Caused by: java.security.AccessControlException: access denied (java.net.NetPermission getCookieHandler) at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323) at java.security.AccessController.checkPermission (AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java: 532) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:151) at java.net.CookieHandler.getDefault(CookieHandler.java:58) at com.google.gdata.client.http.GoogleGDataRequest $GoogleCookieHandler.(GoogleGDataRequest.java:316) at com.google.gdata.client.http.GoogleGDataRequest $GoogleCookieHandler.(GoogleGDataRequest.java:305) at com.google.gdata.client.http.GoogleGDataRequest. (GoogleGDataRequest.java:408) ... 36 more Caused by: java.security.AccessControlException: access denied (java.net.NetPermission getCookieHandler) at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323) at java.security.AccessController.checkPermission
[appengine-java] Re: Session handleing example
Ilya, One thing you will want to check will be if sessions are enabled. Sessions are off by default, so you'll have to add this line to your appengine-web.xml file: sessions-enabledtrue/sessions-enabled http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions On Tue, Nov 10, 2009 at 12:03 PM, IlyaE ilyaelk...@gmail.com wrote: I'm looking to track a user session if they have logged in using my own user manager, but i was having trouble passing my user object back to the session once the app was deployed. I will give this a shot but i wonder if this was because i was redirecting instead of forwarding. I was doing this in my servlet ListMyUser results = (ListMyUser) query.execute(email,password); if (results.size() == 0) { redirect = /index.html; } else { req.getSession().setAttribute(user, results.get(0)); } resp.sendRedirect(redirect); and this in my jsp % MyUser u = (MyUser) request.getSession().getAttribute(user); if (u != null) { } else { % User is null % } % So i was always getting null even though i was redirected properly. Can you explain On Nov 10, 1:36 pm, Ikai L (Google) ika...@google.com wrote: Ilya, Are you looking to persist objects for a lifetime of a session, or are you looking to minimize the logic you are using in your JSPs? As a general design principle, we recommend that you minimize usage of session scope. Variables bound to session scope are serialized and stored to distributed memory, and as a result, it will work best if you use it to pass around small, simple, immutable objects. If you're looking to pass a variable to a view, Java Servlets have a concept of page scope as well as session scope. You don't need to store a variable in session scope if you just want to dispatch the request to a JSP. For instance, you can define a Servlet that looks like this: public class MyServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String myVar = this is a string that will be passed to the JSP; request.setAttribute(myVar, myVar); RequestDispatcher dispatcher = request.getRequestDispatcher(/WEB-INF/my.jsp); dispatcher.forward(request, response); } } In my.jsp, you can now refer to this variable: %@ page isELIgnored=false % body h1${myVar}/h1 /body Ikai Lan Developer Programs Engineer, Google App Engine On Tue, Nov 10, 2009 at 2:39 PM, IlyaE ilyaelk...@gmail.com wrote: Well as i found out, session attributes don't always guarantee that they are sent back to the same JVM thus i keep getting null objects in my view. While i saw a similar discussion before the only examples i found were for Python. I'm looking for a simple java example that saves an object in the servlet and retrieves it in the jsp. On Nov 9, 5:44 pm, victor victoraco...@gmail.com wrote: What issue are you encountering? When you make changes to a session object state, make sure to explicitly call the session.setAttribute(you session ID, you modified session state object) again. i think there is an issue discussed about this before. On Nov 9, 10:58 am, IlyaE ilyaelk...@gmail.com wrote: Does anyone have a java session handleing example? It seems that saving objects in the session only works locally. -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: How to use picasa upload api on Google App Engine
Kishore, Here are the docs related to sending the data as binary: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#PostPhotos This is the raw protocol. Here are the steps you'll have to take: 1. Accept a file upload and buffer it in memory ( http://code.google.com/appengine/kb/java.html#fileforms) 2. Format the authorization headers and POST body as necessary 3. Open an HTTP connection using URLFetch: http://code.google.com/appengine/docs/java/urlfetch/overview.html (Note the limits) You'll need to do some research into the exact format for uploads to the Picasa API. I don't have any code samples for doing this, but it looks very similar to standard HTTP multipart form data with XML metadata. On Tue, Nov 10, 2009 at 8:36 PM, Kishore Jaladi kishorejal...@gmail.comwrote: Hi Ikai, Thanks for the response. The protocol section describes format of the post body. But the Java guide does not explain how to send binary image data other than teh approach of creating MediaFileSource with the java.io.File as refered at http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_java.html#UploadPhotos . And Java GAE does not support new File(/home/liz/puppies.jpg) snippet of this sample. Can you please give me a sample or refer to a doc that explains how the other approach (sending binary image data) works in jsp/java world? Thanks in advance - Kishore On Nov 10, 5:58 pm, Ikai L (Google) ika...@google.com wrote: You may want to look here: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_proto... If you are looking to upload photos that a user has uploaded, you will not be able to save the image in the file system. You'll have to buffer the data in memory and post to Picasa's API. On Sun, Nov 8, 2009 at 10:43 PM, Kishore Jaladi kishorejal...@gmail.com wrote: Hi, Is there a way to upload files on local file system to picasa on google app Engine? The google app engine cannot read local files. I tried to use GAEVFS (Virtual File system), but I could not figure out how to create MediaFileSource from FileObject. Any help please? - kjaladi -- Ikai Lan Developer Programs Engineer, Google App Engine -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: BlobKey and exceeding 1MB blobs in low-level API
Ah, that's leakage from an upcoming feature. Specifically the one labeled Service for storing and serving large files on our public roadmap: http://code.google.com/appengine/docs/roadmap.html This won't be available for a little while. If you only need 10MB files, in the mean time I suggest checking out Vince's GaeVFS project: http://code.google.com/p/gaevfs/ This project works around this limitation by breaking files up to 10MB into 1MB chunks for storage in the datastore and reassembles them for serving. On Wed, Nov 11, 2009 at 2:35 PM, Rob rob.nikan...@gmail.com wrote: Hi, The javadoc for the low level data API says that Blobs can't be bigger than 1MB. I'm trying to create a system where the user can upload images and other files, so I want to be able to exceed that. This page... http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DataTypeUtils.html says to use a BlobKey, but I don't see that class anywhere. Where is it? How do you use it? thanks, Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: why my app on GAE first access is so slow
So, 1-3 minute intervals seem to do the trick? Is this technique still working for you? On Nov 10, 8:24 pm, zhiw...@gmail.com zhiw...@gmail.com wrote: i think the gae cloud envrionment does not have the region concept. every app run on a virtual server , the cron job is used to make the virtual server active. if the virtual server is active, when access the app, there is no need to reinit such as spring listener etc, so delay time is short, that is so simple i think. On Nov 10, 7:30 am, James H james.hollier...@gmail.com wrote: How would a single cron task really help in an environment where multitudes of app servers are involved based on demand, geography, etc? So, how will the task that just ran help someone in U.S. and simultaneously help someone in Russia on the same app? I assume they are potentially running on different app servers. On Nov 10, 1:51 am, m seleron seler...@gmail.com wrote: Thank you for useful information. Though various situations are thought I think that a detailed analysis might be necessary to decrease the CPU TIME. thunks 2009/11/10 zhiw...@gmail.com zhiw...@gmail.com: now i set the schedule time to 3min, it seems work, every time i access my app, i can hardly feel slow. my cron job access a servlet that do nothing and just for active my app. set the schedule time to 1min is better i think,although it will take some cpu time. On Nov 9, 11:31 pm, m seleron seler...@gmail.com wrote: I'm sorry very much. It examined. ServletContextListener#contextDestoryed was not called. It was necessary to examine it accurately. Nichole. Thank you for advice. Does not the page access speed become early? When you access that I think access speed is open in since the second times always because by the thing that keeps being accessed with cron If the display speed is still slow, the cause might be different. thanks, On Nov 9, 11:30 pm, zhiw...@gmail.com zhiw...@gmail.com wrote: i set the time to 5min , but i can still find the contextInitialized info, seems gae's time-out is very short, now i test set it to 3min On Nov 9, 10:18 pm, Joseph Stano joseph.st...@gmail.com wrote: have you noticed if that solves the timeout issue? On Mon, Nov 9, 2009 at 5:04 AM, zhiw...@gmail.com zhiw...@gmail.com wrote: it seems only contextInitialized method can be executed, and contextDestroyed never be executed. so i can not get the time my app alive after it was actived. i have use cron job to access a servlet in my app every 10min to avoid app be inactive, if necessary i will turn the time to 5min or less On Nov 9, 11:40 am, zhiw...@gmail.com zhiw...@gmail.com wrote: thanks , i will try it On Nov 9, 10:18 am, philburk p...@softsynth.com wrote: The logging/query idea is probably the best workaround, but I don't have such a client to do this querying. If I did, I'd just host my app on it :) You could schedule a cron job in GAE that tickled your app. If it ran often enough it might keep it resident. http://code.google.com/appengine/docs/java/config/cron.html-Hidequoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Delete task queue
Ikai, I have updated_queues (queue.xml follows) but the queue is still there. ?xml version=1.0 encoding=UTF-8? queue-entries xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation=http://googleappengine.googlecode.com/ svn/trunk/java/docs/queue.xsd !-- queue nameipn-queue/name rate5/s/rate bucket-size5/bucket-size /queue-- /queue-entries On 10 lis, 23:58, Ikai L (Google) ika...@google.com wrote: Peter, Were you able to delete the task queue? One thing you can try is using the update_queue command line tool with your XML file: ./appengine-java-sdk/bin/appcfg.sh update_queues myapp/war This is described here:http://code.google.com/appengine/docs/java/config/queue.html This should take a few minutes to propagate. Ikai On Tue, Nov 10, 2009 at 8:24 AM, Peter Ondruska peter.ondru...@gmail.comwrote: Actually I am not sure, so I deleted the other version. But this queue still exists. I will wait one more day. Thanks On 9 lis, 23:41, victor victoraco...@gmail.com wrote: You might have a previous version of the app that still refers to the old queue. Delete those versions. On Nov 9, 7:29 am, Peter Ondruska peter.ondru...@gmail.com wrote: I have defined task queue using queue.xml but later decided not to use it. It still appears in queue list in app engine. How do I delete this task queue? Uploading queue.xml with empty queue-entries? Thanks, Peter -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: How many cache can I create using JCacheFactory
Jay, It's not necessary to create a Map of caches. The Cache object represents a single Memcache client talking to a distributed, in-memory store. There's no gain for creating separate cache client instances. On Tue, Nov 10, 2009 at 8:38 PM, jay jay...@gmail.com wrote: Hi friends, I want to use different cache save different sorts of Objects, so I create several caches in a HashMap. But when I debug my program, I realize only one cache in the lower layer... Is it true? private MapString, Cache caches = new HashMapString, Cache(); cacheFactory = CacheManager.getInstance ().getCacheFactory(); caches.put(Account.class.getSimpleName(), cacheFactory.createCache (Collections.emptyMap())); caches.put(AddressBook.class.getSimpleName(), cacheFactory.createCache(Collections.emptyMap())); -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: GAE Mail Problems
Hi I want to hear of a detailed content. Cannot the source for which Sernder is made be taught? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: why my app on GAE first access is so slow
i turn it to 1min, the cron job access a servlet that do nothing just for active the app. every 24h it only used 1% of the free cpu-time . now at least when i access my app, it was not slow like before. but sometime the app still be inactive, although the cron job active the app, when i access sush as mainpage, it still took sometime to load the servlet. gae doc wrote: load-on-start doesn't work , the servlet will be load on first accessed. i think use cron job to access mainpage is better. now i have not try ths. On Nov 12, 5:04 am, James H james.hollier...@gmail.com wrote: So, 1-3 minute intervals seem to do the trick? Is this technique still working for you? On Nov 10, 8:24 pm, zhiw...@gmail.com zhiw...@gmail.com wrote: i think the gae cloud envrionment does not have the region concept. every app run on a virtual server , the cron job is used to make the virtual server active. if the virtual server is active, when access the app, there is no need to reinit such as spring listener etc, so delay time is short, that is so simple i think. On Nov 10, 7:30 am, James H james.hollier...@gmail.com wrote: How would a single cron task really help in an environment where multitudes of app servers are involved based on demand, geography, etc? So, how will the task that just ran help someone in U.S. and simultaneously help someone in Russia on the same app? I assume they are potentially running on different app servers. On Nov 10, 1:51 am, m seleron seler...@gmail.com wrote: Thank you for useful information. Though various situations are thought I think that a detailed analysis might be necessary to decrease the CPU TIME. thunks 2009/11/10 zhiw...@gmail.com zhiw...@gmail.com: now i set the schedule time to 3min, it seems work, every time i access my app, i can hardly feel slow. my cron job access a servlet that do nothing and just for active my app. set the schedule time to 1min is better i think,although it will take some cpu time. On Nov 9, 11:31 pm, m seleron seler...@gmail.com wrote: I'm sorry very much. It examined. ServletContextListener#contextDestoryed was not called. It was necessary to examine it accurately. Nichole. Thank you for advice. Does not the page access speed become early? When you access that I think access speed is open in since the second times always because by the thing that keeps being accessed with cron If the display speed is still slow, the cause might be different. thanks, On Nov 9, 11:30 pm, zhiw...@gmail.com zhiw...@gmail.com wrote: i set the time to 5min , but i can still find the contextInitialized info, seems gae's time-out is very short, now i test set it to 3min On Nov 9, 10:18 pm, Joseph Stano joseph.st...@gmail.com wrote: have you noticed if that solves the timeout issue? On Mon, Nov 9, 2009 at 5:04 AM, zhiw...@gmail.com zhiw...@gmail.com wrote: it seems only contextInitialized method can be executed, and contextDestroyed never be executed. so i can not get the time my app alive after it was actived. i have use cron job to access a servlet in my app every 10min to avoid app be inactive, if necessary i will turn the time to 5min or less On Nov 9, 11:40 am, zhiw...@gmail.com zhiw...@gmail.com wrote: thanks , i will try it On Nov 9, 10:18 am, philburk p...@softsynth.com wrote: The logging/query idea is probably the best workaround, but I don't have such a client to do this querying. If I did, I'd just host my app on it :) You could schedule a cron job in GAE that tickled your app. If it ran often enough it might keep it resident. http://code.google.com/appengine/docs/java/config/cron.html-Hidequotedtext - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: why my app on GAE first access is so slow
i only test it in my country, i don't know whether it is still effective for request that from a foreign country. but to me it is enough On Nov 12, 10:30 am, zhiw...@gmail.com zhiw...@gmail.com wrote: i turn it to 1min, the cron job access a servlet that do nothing just for active the app. every 24h it only used 1% of the free cpu-time . now at least when i access my app, it was not slow like before. but sometime the app still be inactive, although the cron job active the app, when i access sush as mainpage, it still took sometime to load the servlet. gae doc wrote: load-on-start doesn't work , the servlet will be load on first accessed. i think use cron job to access mainpage is better. now i have not try ths. On Nov 12, 5:04 am, James H james.hollier...@gmail.com wrote: So, 1-3 minute intervals seem to do the trick? Is this technique still working for you? On Nov 10, 8:24 pm, zhiw...@gmail.com zhiw...@gmail.com wrote: i think the gae cloud envrionment does not have the region concept. every app run on a virtual server , the cron job is used to make the virtual server active. if the virtual server is active, when access the app, there is no need to reinit such as spring listener etc, so delay time is short, that is so simple i think. On Nov 10, 7:30 am, James H james.hollier...@gmail.com wrote: How would a single cron task really help in an environment where multitudes of app servers are involved based on demand, geography, etc? So, how will the task that just ran help someone in U.S. and simultaneously help someone in Russia on the same app? I assume they are potentially running on different app servers. On Nov 10, 1:51 am, m seleron seler...@gmail.com wrote: Thank you for useful information. Though various situations are thought I think that a detailed analysis might be necessary to decrease the CPU TIME. thunks 2009/11/10 zhiw...@gmail.com zhiw...@gmail.com: now i set the schedule time to 3min, it seems work, every time i access my app, i can hardly feel slow. my cron job access a servlet that do nothing and just for active my app. set the schedule time to 1min is better i think,although it will take some cpu time. On Nov 9, 11:31 pm, m seleron seler...@gmail.com wrote: I'm sorry very much. It examined. ServletContextListener#contextDestoryed was not called. It was necessary to examine it accurately. Nichole. Thank you for advice. Does not the page access speed become early? When you access that I think access speed is open in since the second times always because by the thing that keeps being accessed with cron If the display speed is still slow, the cause might be different. thanks, On Nov 9, 11:30 pm, zhiw...@gmail.com zhiw...@gmail.com wrote: i set the time to 5min , but i can still find the contextInitialized info, seems gae's time-out is very short, now i test set it to 3min On Nov 9, 10:18 pm, Joseph Stano joseph.st...@gmail.com wrote: have you noticed if that solves the timeout issue? On Mon, Nov 9, 2009 at 5:04 AM, zhiw...@gmail.com zhiw...@gmail.com wrote: it seems only contextInitialized method can be executed, and contextDestroyed never be executed. so i can not get the time my app alive after it was actived. i have use cron job to access a servlet in my app every 10min to avoid app be inactive, if necessary i will turn the time to 5min or less On Nov 9, 11:40 am, zhiw...@gmail.com zhiw...@gmail.com wrote: thanks , i will try it On Nov 9, 10:18 am, philburk p...@softsynth.com wrote: The logging/query idea is probably the best workaround, but I don't have such a client to do this querying. If I did, I'd just host my app on it :) You could schedule a cron job in GAE that tickled your app. If it ran often enough it might keep it resident. http://code.google.com/appengine/docs/java/config/cron.html-Hidequote...- - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] CPU Time metric is not being reset !!
CPU Time metric that exists in the Quota Details section, under the Requests is not being reset on a daily basis. Infact it has never been reset at all!! I have been observing it gradually increase for the past week. It keeps on increasing and finally i hit the max and the app wont work anymore throwing a 403 Over Quota error. Application: performancemirror.appspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] ClassCastException when calling remove on a one to many owned relationship
Here's the stacktrace I get when calling remove on a list containing child elements of a one to many owned relationship. java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String at org.datanucleus.store.appengine.DatastoreFKListStoreSpecialization.removeAt (DatastoreFKListStoreSpecialization.java:155) at org.datanucleus.store.mapped.scostore.FKListStore.removeAt (FKListStore.java:525) at org.datanucleus.store.mapped.scostore.AbstractListStore.remove (AbstractListStore.java:318) at org.datanucleus.sco.backed.List.remove(List.java:907) at usabletek.plyus.server.TestEntity.demonstrateProblem (TestEntity.java:31) I'm trying to figure out if I'm not allowed to use Longs as primary keys, or if this is a bug, or if I'm doing something else wrong with the relationship. Here's as minimal an example as I can come up with: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class TestEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent(mappedBy = parent) private ListTestChildEntity childEntities; public ListTestChildEntity getChildEntities() { return childEntities; } public static void demonstrateProblem(){ PersistenceManager pm = PMF.get().getPersistenceManager(); TestEntity te = new TestEntity(); pm.makePersistent(te); te.getChildEntities().add(new TestChildEntity(a)); te.getChildEntities().remove(0); pm.close(); } } @PersistenceCapable(identityType = IdentityType.APPLICATION) public class TestChildEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String encodedKey; @Persistent @Extension(vendorName = datanucleus, key = gae.pk-name, value = true) private String keyName; @Persistent private TestEntity parent; public TestChildEntity(String k){ this.keyName = k; } } -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.