Re: [appengine-java] Re: Google maps geocoder responds with 620 error since server maintenance
Hi culov. I believe this was largely addressed on Monday. Please let me know if you continue to see any other geocoding problems, and, if possible, include your Maps API key (you can send this to me privately if you prefer). - Jason On Sun, May 9, 2010 at 12:32 PM, culov cul...@gmail.com wrote: app engine servers still look to be blacklisted On May 7, 3:16 pm, culov cul...@gmail.com wrote: It happened on Feb. 19, after server maintenance, and it's happened again. I'm getting non-stop 620 errors whenever I try to geocode from an app engine server. I'd be very grateful if this could be fixed before the weekend! 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
[appengine-java] Chat Time transcript for May 5, 2010
The high-level summary and complete transcript of the May 5th edition of the IRC office hours is pasted below. Our next normally scheduled office hour session (May 19th) is CANCELLED because of conflicts with Google I/O -- if you happen to be coming to I/O, you can meet us in person and have a face-to-face session. :) IRC office hours will resume Wednesday, June 2, 7:00-8:00 p.m. PST in the #appengine channel. Note: On the first and third Wednesdays of every month, the App Engine team signs into the #appengine IRC channel on irc.freenode.net for an hour-long chat session. On the first Wednesday, we meet in the channel from 7:00-8:00 p.m. PST (evening hours). On the third Wednesday, we're available from 9:00-10:00 a.m. PST (morning hours). Please stop by! - Jason --SUMMARY--- - Q: When memcache set and delete operations are unavailable, does get return stale data? A: No. In read-only maintenance periods, memcache is disabled altogether. All gets return False, so stale data is not returned. [7:02-7:03] - Discussion on techniques for deleting large numbers of entities [7:05-7:20, 7:24] - Discussion on achieving many-to-many relationships using App Engine's datastore [7:06, 7:10, 7:14-7:15, 7:18] - Q: Why am I seeing a lot of warning logs saying Request was aborted after waiting too long to attempt to service your request? A: As of release 1.3.1, there is no longer an upper limit on the number of requests an app can service simultaneously -- the number of application instances now scales indefinitely with your load, but only if your average request latency is under 1,000 ms. If you see this warning, it usually indicates that your latency is too high; reducing your latency to 1,000 ms will make the error go away. Note: this does not affect tasks, which can run for up to 30s before being terminated, so move your heavier processing to the background using tasks. Also, take advantage of Appstats which can help with performance profiling. [7:15, 7:17, 7:20-7:21, 7:27] - Discussion on RDBMS support and the benefits and restrictions of a distributed datastore [7:24-7:30, 7:36-7:37, 7:39, 7:42-7:47] - Discussion on storing a large (5000+) list of items with arbitrary order using the datastore [7:33-7:35] - Discussion on customizing and/or adding decorators to SDK methods like get_or_insert, etc. [7:35-7:38] - Discussion on accessing SQLite database from 1.3.3 SDK using the App Engine Helper for Django utility [7:46-7:49, 7:52] - Discussion on implementing counters that will remain operational during a maintenance period when memcache and datastore writes are disabled [7:54-7:56, 7:58-7:59] --FULL TRANSCRIPT--- [7:00pm] apijason_google: Hi Everyone. It's the third Wednesday of April, which means time for another IRC office hour session. I'll be in here for the next 60 minutes to field your questions, and I'll try to pull at least one other person in here before too long. Welcome! (EDITOR'S NOTE: This chat took place on May 5th, not the third Wednesday of April as indicated here.) [7:02pm] mbw: I am curious about the behaviour of memcache when there are .set/.delete failures (which we saw today)... if you can't set or delete, does get still return data (potentially stale)? [7:02pm] mbw: I didn't get a chance to check on that myself today. [7:03pm] mbw: We found some bugs in our code today as a result of the issues. We obviously are missing some unit test coverage. [7:03pm] apijason_google: In read-only periods, you can't read from or write to memcache, so it shouldn't return stale data, AFAIK. [7:03pm] axiak: oh yey! [7:03pm] Relaed: apijason_google: why do I get Deleting a composite index failed: ApplicationError: 1 [7:04pm] mbw: apijason_google: that sounds great. Thanks. [7:04pm] apijason_google: mbw: It's noted in the maintenance page too: http://code.google.com/appengine/docs/java/howto/maintenance.html [7:04pm] apijason_google: Relaed: What's your app ID? [7:04pm] Relaed: apijason_google: clouyama [7:04pm] mbw: I wasn't sure if memcache was in read only mode or just having intermitent issues. [7:05pm] apijason_google: Relaed: I see that a couple of your indexes are in the error state. Have you tried vacuuming? [7:05pm] axiak: apijason_google: I'm having trouble with too much data. I have entities that essentially expire after a certain time, but it takes too much effort (cpu time, slowly iterating over each element) to delete them all. Is there a better way to do bulk delete? [7:05pm] Relaed: apijason_google: I did, and it failed saying why do I get Deleting a composite index failed: ApplicationError: 1 [7:05pm] Relaed: apijason_google: *without why do I get part [7:06pm] apijason_google: mbw: Yep, we were in a read-only period. Are you subscribed to our downtime-notify announcement list? It's not very noisy -- we just post when there are planned or unplanned downtimes -- so I
Re: [appengine-java] Trying to use Ehcache 2.0.1 with web module
Hi Sergio. I'll try to test this out soon. If you haven't already, you may want to post this in the Ehcache forums also since they can probably help you debug the issue faster: - Jason On Mon, May 3, 2010 at 1:54 AM, Sergio Lopes slo...@gmail.com wrote: Hi everybody Ehcach announced recently their AppEngine support. I'm using version 2.0.1 (latest stable release) with Ehcache Web Module. I'm using SimpleCachingHeadersPageCachingFilter to cache page results. When I run my application, I'm getting an AccessControlException because Ehcache Web is trying to do something nasty to the current Thread (of course, gae does not allow): java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThread) 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:166) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkAccess(DevAppServerFactory.java:203) at java.lang.Thread.checkAccess(Thread.java:1287) at java.lang.Thread.setName(Thread.java:1068) at net.sf.ehcache.constructs.web.filter.CachingFilter.buildPageInfo(CachingFilter.java: 240) at net.sf.ehcache.constructs.web.filter.CachingFilter.doFilter(CachingFilter.java: 185) at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86) Is there anyone here using Ehcache on GAE? And specifically, Ehcache Web Module? I read that ehcache filter implementation and it really seems to call things restricted by gae I followed the instructions found on Ehcache website: http://ehcache.org/documentation/googleappengine.html http://ehcache.org/documentation/web_caching.html Is Ehcache really GAE compatible? Tks Sérgio Lopes -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
[appengine-java] Chat Time transcript for April 21, 2010
The high-level summary and complete transcript of the April 7th edition of the IRC office hours is pasted below. Join us in two weeks, Wednesday, May 5th from 7:00-8:00 p.m. PST for the next installment. Note: On the first and third Wednesdays of every month, the App Engine team signs into the #appengine IRC channel on irc.freenode.net for an hour-long chat session. On the first Wednesday, we meet in the channel from 7:00-8:00 p.m. PST (evening hours), and on the third Wednesday, we're available from 9:00-10:00 a.m. PST (morning hours). Please stop by! - Jason --SUMMARY--- - There is a slight error in our webapp framework documentation -- if you're using templates, you should specify the path relative to the location of the controller, not the root directory. We'll address this docs bug shortly. [9:03, 9:05, 9:09] - Discussion on various forthcoming roadmap features (OpenID, OAuth, reserved instances) [9:05, 9:08, 9:11, 9:13, 9:18, 9:38] - Q: What is the best way to estimate the total number of entities for paging display (e.g. 1-10 of 400)? A: Try to avoid using count() queries if possible. You can use a keys-only query to retrieve the keys of all entities that match a specific criteria, and use that, but if you do this, you should cache this count to avoid re-querying in every request. You may also consider estimating or otherwise giving a rough number if the exact count isn't important, similar to Gmail (e.g. 1-20 of hundreds). [9:17, 9:19-9:32] - Discussion on cold startup times for Python and Java applications -- all applications are cycled out after a certain period of time when no requests come in. Startup times are generally better for Python apps since the Python runtime doesn't have to load a JVM and most Python frameworks are smaller than comparable Java frameworks. For now, the only way to ensure that your application remains warm is to have steady traffic (generally more than one request per minute) from actual users, not cron pingers. Reserved instances are on the roadmap which will enable you to pay to keep your application loaded in the absence of traffic. [9:29, 9:34-9:36, 9:38-9:41, 9:43, 9:49-10:04] - Discussion on backwards-traversing cursors [9:43-9:45] --FULL TRANSCRIPT--- [09:02am] apijason_google: Hi Everyone. Welcome to the second IRC office hour session of the month. I and a few others will be in the channel for the next hour to answer any App Engine questions if you've got any, so fire away. [09:03am] perlmonkey2: hmm, the GAE webapp docs say that for template paths, the current dir is the application root directory. but passing in templates/mytemplate.html which is under the MyApp directory isn't working. Is this a bug or am I not Doing It Right? [09:04am] perlmonkey2: oh, office hours. I'll shut up for real questions [09:05am] rsaccon: @apijason_google is there anything you can tell us about forthcoming OpenId / oAuth service, beyond what is on the roadmap ? [09:05am] apijason_google: perlmonkey2: It works for me. This is the template path I set in my own apps: path = os.path.join(os.path.dirname(__file__), 'templates', 'index.html') where templates is the name of the directory at the root level. [09:06am] ikai_google: Hi everybody! [09:06am] apijason_google: rsaccon: What specifically would you like to know? The answer is probably not, although I can assure you that it's coming along. [09:06am] apijason_google: Hi Ikai! [09:08am] prencher: apijason_google: can you tell us anything about the upcoming reserved instances? guessing not, but if so I'd like to know whether we're talking about N hot spares at all times (including while there's load), or a minimum number of instances [09:09am] ikai_google: prencher: We can't give many details right now about any upcoming features. [09:09am] perlmonkey2: hmm, outputted the path. Looks like the docs might be wrong as the path is from the controller not the root path of the application. So if my controllers are in MyApp/lib/controllers, that is the relative path. Not Myapp/ as the docs say. Or am I doing it wrong [09:10am] perlmonkey2: Nevermind me, these are webapp questions. Hate to burn any time on this when there are serious GAE questions. [09:11am] apijason_google: prencher: The details are still being worked out, so nothing I say here is canon. But, to my knowledge, the team has been discussing the second option -- minimum number of instances. Everything is subject to change until release, however. [09:11am] yodler12: How's the pagination blog post coming? Any good pagination libraries yet that you know of based on cursors? Any advice if I'm going to try to write one? [09:11am] ikai_google: perlmonkey2: No, it's totally fair game, though you're generally better asking this in the groups [09:11am] apijason_google: perlmonkey2: Thanks for the pointer. Can you file a docs bug in the issue tracker?
[appengine-java] Chat Time transcript for April 7, 2010
The high-level summary and complete transcript of the April 7th edition of the IRC office hours is pasted below. Please join us on the first and third Wednesday of every month in the #appengine channel on irc.freenode.net. On the first Wednesday, we meet in the channel from 7:00-8:00 p.m. PST (evening hours), and on the third Wednesday (e.g. TOMORROW, 4/21), we're available from 9:00-10:00 a.m. PST (morning hours). - Jason --SUMMARY--- - Discussion of existing App Engine-compatible OpenID libraries and forthcoming built-in support for OpenID and OAuth [7:03-7:09] - Remember, back up your code or use a secure version control system -- we cannot help you recover your code in the event of corruption or theft, so backup early and often. Also, see http://stackoverflow.com/questions/2479087/can-i-restore-my-source-code-that-has-been-uploaded-into. [7:11-7:16] - Q: Is it feasible to push every write to the task queue instead of making the user wait for the write to complete inside a handler? A: While this should work, there are two things to keep in mind: 1) the number of task insertions is currently limited to 1M per day -- if you make more than one million writes each day, this solution will fail. 2) Tasks don't necessarily run in the order they were inserted; e.g. if a task fails and has to be re-tried, it's possible that a newer task will be processed ahead of it. Thus, you'll want to version your entities so you don't mistakenly overwrite new data with old data. [7:18-7:19, 7:21, 7:58-7:59] - Discussion on IDE/editor preference [7:21, 7:23, 7:24] - Discussion on paging using cursors and the inherent challenges of paging backwards when entities are consistently being inserted [7:24-7:30] - Q: Should I be concerned if I see a red or cold caution sign in the Admin Console indicating that CPU usage for a particular handler is high? A: In general, no. These symbols are present to show you which handlers are using the most CPU and to help point out which handlers you should optimize, but the quotas page is the definitive source on resource usage. Keep in mind that enabling billing for your application automatically boosts a lot of your quotas, regardless of whether you actually exceed any of the billable quotas. [7:31-7:35] - Discussion on SSL support, ETAs on SSL for custom domains, and a potential SSL bug affecting non-default versions of an app. [7:39-7:40] - Q: Are sessions supported in Python? A: Sessions aren't supported directly by the webapp framework, but you can build your own implementation fairly easily using cookies and memcache/datastore. [7:49, 7:51-7:53] - Q: Are keys-only queries a good way to get a simple count on the number of entities matching a query? A: Depending on your queries, this may be the only effective method. In general, we prefer pre- computation when possible -- if you have a limited number of known queries, you can just increment a counter when a new entity is written or updated. For systems where the set of possible queries is large and/ or unknown, then performing a keys-only query is a reasonable solution. Be sure to cache the result so you don't have to continually execute this query for every request. Also, remember the datastore statistics API is available if you need a straight count of every entity in your datastore or of every entity of a particular kind. [7:50-7:52, 7:54-7:59, 8:03] --FULL TRANSCRIPT--- [7:00pm] apijason_google: Good evening (or morning as the case may be)! I and a few other App Engine engineers will be here for the next hour to answer your questions, so fire away. [7:01pm] chilts: sweet, didn't realise it was now [7:01pm] chilts: (not that I have a question) [7:02pm] apijason_google: Well, just in case you have one later. [7:03pm] chilts: apijason_google: any idea if Google are working on patching the python-openid library to make it Google Apps compatible (ie. does the host-meta discovery method)? [7:04pm] chilts: it would be good so Python people on AppEngine can start doing Marketplace apps more easily for _all_ Google Apps Enterprise customers [7:04pm] AreEmmKay: I saw a commit on AEOID about that [7:04pm] • chilts goes to check it out [7:05pm] AreEmmKay: http://github.com/Arachnid/aeoid Add preliminary support for Google Apps openid [7:05pm] chilts: I did see Nick's post about putting an /openid page on your site, but that would be much better [7:05pm] chilts: ah, March 13th [7:05pm] chilts: cool, thanks AreEmmKay [7:05pm] AreEmmKay: np [7:06pm] apijason_google: I'm not positive on the implementation details, but OpenID enhancements will be added in a future release. I don't know if you caught the Built-in support for OAuth OpenID item in our latest product roadmap. [7:06pm] chilts: saw that on the roadmap yeah [7:06pm] chilts: can't wait [7:06pm] molson: Trying to view a specific class in my datastore via the datastore
[appengine-java] Chat Time transcript for February 17, 2010
Last Wednesday, the App Engine team hosted the latest session of its bimonthly IRC office hours. A transcript of the session and a summary of the topics covered is provided below. The next session will take place next Wednesday, March 3rd from 7:00-8:00 p.m. PST in the #appengine channel on irc.freenode.net. - Jason --SUMMARY--- - Q: What are my options do move my data from my App Engine datastore in production to my PC? A: For now, you have to use the bulkloader utility that ships with the Python SDK, but you can use this with Java- based apps as well -- see http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java for details on setting up the appropriate handlers for a Java environment. [9:12-9:16] - Q: With the index row limit raised to 5,000, does this mean that I can build queries involving multiple list properties? A: Yes. You could do this before, technically, but you had to be more careful to avoid exploding indexes, which could be caused by querying large list properties. You still have to be concerned about this, but the larger limit does give you more flexibility. [9:19-9:22] - Discussion on using memcache to lock an entity for writing -- not recommended (memcache is designed as a cache first and foremost) but feasible. All the same, this should be avoided, especially since there are no guarantees made that memcache won't be cleared periodically, and you wouldn't want this locking metadata purged without warning. [9:32-9:40] - Discussion on mitigation strategies for contention -- in general, you only need to think about sharding or other mechanisms if you expect heavy contention (generally more than one write per second consistently) on a single entity or entity group. Otherwise, even if the occasional concurrent write request comes in, the system will automatically retry the write after any failures, so you don't need to alter your models to account for this. But for heavy contention, you can look at sharding, using the task queue API, or even dropping requests. [9:40-9:41, 9:43, 9:46-9:50] - Q: When MapReduce functionality is available, will it support global transactions? A: In general, global transactions are difficult to support in a distributed system. You can achieve a weak form of global transactions today with transactional tasks, which guarantee eventual consistency. [9:55-10:01] --FULL TRANSCRIPT--- [09:08am] nickjohnson: Welcome to the bi-weekly App Engine chat time! With us today are apijason_google and myself, with others to come. [09:09am] nickjohnson: If you're having trouble sending messages to the channel, please be patient, we're working on resolving that right now. [09:10am] apijason_google: Hi Everyone. [09:10am] lurkdev: hello [09:10am] cyonyx: hello [09:11am] cresloyd: hello [09:11am] webus: hello [09:11am] apijason_google: [09:12am] webus: how i can backup my data from GAE (BigTable) to my local PC ? [09:12am] nickjohnson: webus: Java, or Python? [09:13am] webus: java [09:15am] nickjohnson: For now, you need to use the Python bulkloader to load and dump data - see http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java for details on setting up a handler, and http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_and_Uploading_All_Data for details on dump and restore [09:15am] apijason_google: webus: I think the only way right now is to use the bulkloader tool that ships with the Python SDK. It should work with Java apps too, and we're working on a better Java solution. [09:15am] nickjohnson: ** If you're still having trouble sending to the channel, please send me a PM ** [09:15am] webus: thnx! [09:16am] cresloyd: there are third-party solutions to sync data between the datastore and external databases; I don't know if Googlers would want to recommend any of them, but you're welcome to try them of course [09:18am] ryan_google: hi! [09:19am] ryan_google: aha i can talk now [09:19am] nickjohnson: Hooray! [09:19am] nickjohnson: Anyone who was trying to talk, you can try again now. [09:19am] cyonyx: now that the 5000 index limit has been set for an entity, does that mean one can use more than one list property per model as long as they stay within the 5000? [09:20am] ryan_google: cyonyx: yes [09:20am] ryan_google: i assume you've read http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Big_Entities_and_Exploding_Indexes ? [09:22am] ryan_google: *crickets* [09:22am] cyonyx: i have read that thank you. the docs are great by the way. i was playing with some code and found that the 1000 limit was removed for a list, so I tried adding more than 5000 to that list and got an error [09:23am] ryan_google: hmm [09:23am] nickjohnson: cyonyx: The limit we removed was the 1000 result limit, and is unrelated to the max entries in a list. [09:24am] ryan_google:
[appengine-java] Chat Time transcript for February 3, 2010
The high-level summary and complete transcript of the February 3rd edition of the IRC office hours is pasted below. Please join us on the first and third Wednesday of every month in the #appengine channel on irc.freenode.net. On the first Wednesday, we meet in the channel from 7:00-8:00 p.m. PST (evening hours), and on the third Wednesday, we're available from 9:00-10:00 a.m. PST (morning hours). - Jason --SUMMARY--- - Most of the chat took place in another IRC channel because the usual channel was closed to unregistered users. As a result, the chat started later than usual. The next chats should take place in the regular channel: #appengine on irc.freenode.net. If you can't post, please register your nick by following the instructions at http://freenode.net/faq.shtml#registering. [7:12-7:15] - Discussion on datastore cursors, a premiere feature of the 1.3.1 release, which enable developers to work with result sets larger than 1,000. [7:16-7:22] - Q: As a developer of an app allowing users to upload content, what level of policing should I do to make sure the uploaded content does not violate App Engine's terms of service? A: You should not encourage or openly permit content in violation of the terms of service. This means that should you spot such content, you take care to remove it, and you also take care to do the same if a member of the App Engine team contacts you about any violations. For this type of violation, we will reach out to you first to give you an opportunity to remove the content before taking your application offline. [7:22-7:25, 7:27] - Q: Are there any plans to allow for larger URL fetch requests, up to 5+ MB? A: No plans at present, but please star this issue if you're interested: http://code.google.com/p/googleappengine/issues/detail?id=2735. It's possible that we could implement this feature similar to the way we increased the maximum image data size that could be operated on via the image service functions: by allowing blob keys to be passed rather than the raw data directly. Another idea is making the URL fetch service work with a callback, similar to blobstore. [7:25-7:29, 7:31-7:33, 7:39] - If multiple writes occur in a single transaction, they must be processed sequentially. This is because a transaction can only apply to entities in the same entity group, and an entity group cannot be updated while another update is taking place. Use entity groups only when necessary -- try to keep them as small as possible to maximize write throughput. [7:30-7:31, 7:33-7:34] - Follow-up on index inconsistency issues (issue 2481): we are taking this issue very seriously, and have devoted many hours so far tracking down the cause. For most apps that we have identified as being affected, we have manually corrected the problem indexes, but we're still working on the root cause. The team is making substantial progress and the timeline for a fix is weeks and not months. If you continue to see this problem, please add a comment to http://code.google.com/p/googleappengine/issues/detail?id=2481. [7:35, 7:38-7:40] - Discussion on google.appengine.tools.bulkloader.IncrementId implementation, whether it's hardened enough to prevent conflicts of auto-generated IDs, and whether a better implementation is coming. [7:42, 7:46] - Discussion on authentication using the Google Accounts service, how it's implemented and security mechanisms in place. [7:44-7:48] - Q: What are transactional tasks? A: Simply put, tasks that are added to queues when there is an active datastore transaction will be automatically enlisted in the datastore transaction so most of the time you won't actually need to get ahold of the active com.google.appengine.api.datastore.Transaction. [7:49, 7:53] - Discussion on pre-releases and need for a production sandbox where new back-ends can be released and tested without (potentially) breaking production apps. [7:54-7:55, 7:57] - Cool app which compares the performance of the different Java datastore APIs: http://gaejava.appspot.com/. The low-level API outperforms JDO/JPA, even though JDO and JPA are technically using the same underlying implementation as the low-level API, likely due to the ORM-layer overhead. [7:58-8:04, 8:10-8:11] - Poll: For developer-to-developer support, do you prefer Google Groups or Stack Overflow? [8:05-8:11] --FULL TRANSCRIPT--- [7:11pm] apijason_google: Ha ha. Anyway, we'll be here for the next 50 minutes at least. Ikai and I are here, Wesley is coming soon. Sorry for the technical difficulties. [7:12pm] _tmatsuo: perhaps you can register your nick on the net. [7:12pm] _tmatsuo: *on freenode.net [7:13pm] apijason_google: Yeah, after today's incident, we just might do that. [7:13pm] ikai_google: registered, no dice [7:13pm] ikai_google: I still can't post in the other forum [7:13pm] ikai_google: err channel [7:13pm] lambo4jos: hello everyone
[appengine-java] Chat Time transcript for January 20, 2010
Two Wednesday back, the App Engine team hosted the latest session of its bimonthly IRC office hours. A transcript of the session and a summary of the topics covered is provided below. The next session will take place this coming Wednesday, February 3rd from 7:00-8:00 p.m. PST in the #appengine channel on irc.freenode.net. - Jason --SUMMARY--- - Q: Should you split a single entity into two or more entities if one or more properties are updated frequently, e.g. per request? A: No, but if you expect to update a single entity or entity group more than once per second, you should consider sharding to avoid datastore contention (http://code.google.com/appengine/articles/scaling/ contention.html). You generally don't need to split entities, although you can do so to save bandwidth if your entities contain several large properties that only need to be accessed occasionally. [9:01-9:06] - Q: Does the 30-second request deadline applied during Blobstore uploads? A: No. In general, time spent by the user doesn't count towards your execution time limit. [9:07-9:08] - Discussion on the maximum length of task queue parameters. [9:10-9:12] - Discussion on bulkloader dump and restore, whether there are any plans to allow for clearing a single datastore kind only, and whether tasks or remote_api is the best mechanism for clearing the datastore [9:16-9:20, 9:24-9:25] - Q: How can one determine the string-encoded key of a given entity for another application, e.g. when updating foreign keys ahead of a bulk upload to another datastore? A: This could change going forward, but for now you can supply the '_app_id_namespace' argument to db.Key.from_path. Or instead of using string-encoded keys, you can use Key.to_xml which provides a transparent encoding. Bear in mind that App Engine currently doesn't allow for referencing entities in other applications, though this could change in the next release. [9:24-9:25, 9:27-9:28, 9:32, 9:35-9:36] - Discussion on whether, when building a master-detail relationship (e.g. orders and items), it's better to store all order information in a single entity or to use an individual entity for each item in the order. [9:27-9:35] - Q: If you're new to App Engine, which runtime should you start with? A: Pick the runtime language most familiar to you to minimize the amount of new learning that you have to do all at once -- even though many use standard APIs, App Engine's various services will take time to master, especially the datastore. [9:35-9:38] - Q: For list properties, is the name of the property stored for each item (e.g. N times for N items) even when its unindexed? A: Yes -- the datastore is schemaless, so a list foo=[bar,baz] is actually stored as two properties with the same name: foo=bar and foo=baz. Hence, each item in the list requires the name to be stored with it. See the article at http://code.google.com/appengine/articles/storage_breakdown.html which explains exactly what gets stored for all entity and index rows. [9:40-9:43, 9:52-9:56, 9:59-10:01] - Discussion of deferred.defer, its ability to schedule tasks to be executed during off-peak hours, and its relation to the core product. [9:41-9:46, 9:50] --FULL TRANSCRIPT--- [09:00am] nickjohnson: Welcome to the fortnightly App Engine developer chat! With me today are Jason and Ikai. [09:00am] nickjohnson: And Ryan [09:00am] ikai_google: Hi everybody! [09:00am] ryan_google: and me! (...something) [09:01am] dennis_tw: I have a question about entities that are changed often (eg: changed on every user action. Like modification time or view count). I'm thinking of separating them out into a separate entity so that that 'high frequency' entity is small and can be moved between the datastore and my app with little overhead. Is that a reasonable entity design? [09:01am] ikai_google: *crickets* [09:02am] nickjohnson: dennis_tw: Optimising to minimize the amount of unwanted data you're moving is a good idea. It doesn't have to relate specifically to how frequently it's updated, though. [09:02am] mcrady: any plans to support stretching of images? [09:02am] ikai_google: dennis_tw: In the past, even outside of App Engine, I've used a design where I do frequent writes to MemCache and flush. Of course, you run the risk of some data loss [09:03am] dennis_tw: cool [09:03am] dennis_tw: I'm also wondering if 'small entities' and 'medium sized entities' have pretty much the same overhead. At what point does it become irrelevant how small the entity is? is there a minimum transfer size? [09:03am] ikai_google: mcrady: Do you mean resizing to a larger image? [09:03am] ryan_google: +1 to ikai and nick's points. i'd also note that entity size, in bytes or number of properties or whatever, generally doesn't matter in these cases, but you definitely want to take chances to coalesce, shard, etc to avoid writing to a single entity (or group)
Re: [appengine-java] Re: A running app does not detect newly created files.
Thanks for the extra information re: your use of Narwhal. I don't have too much experience with it, but can you implement the Blobstore docs demo without Narwhal to see if it works for you as it does for me? This is the doc I used to implement my version: http://code.google.com/appengine/docs/java/blobstore/overview.html - Jason On Thu, Jan 14, 2010 at 9:53 AM, George Moschovitis george.moschovi...@gmail.com wrote: On Jan 14, 12:47 am, Jason (Google) apija...@google.com wrote: I implemented the sample Blobstore application provided in the documentation (two servlets, Upload.java and Serve.java -- Upload.java redirects to Serve.java which looks up the blob and renders it using blobstoreService.serve) but I'm not able to reproduce your error. I can see that, on the development server, the uploaded file is indeed stored in WEB-INF/appengine-generated, but there aren't any exceptions when trying to read this file regardless of whether the development server is still running. Out of curiosity, what platform are you running (Windows, Mac OS X, or Linux) and what are the permissions of the newly added file? This is what I see: -rw-r--r-- If your case is similar, you shouldn't have any issue I see this as well: -rw-r--r-- 1 root root40018 2010-01-14 19:49 fgMldUn0bca_tWegd6UK2Q but I still get the error where trying to view the file. However, if I restart the devserver and try to serve the file it works! It seems like the server is getting a snapshot of the filesystem and does not recognize new files? Btw I am running a Javascript (Rhino) application using narwhal (www.narwhaljs.org) Perhaps this is a problem with narwhal and not the devserver? regards, -g. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Doubt with detachability...
Thank you for the extra information. If you enable debug output for the ORM layer, you may see an explanation for why you don't need to detach your object again after retrieving it from memcache. Since it works for you without the second detachment, I recommend omitting the second detachCopy call and moving on. If you're still curious, check out the ORM debug output. Just change the DataNucleus lines in logging.properties to INFO instead of WARNING. - Jason On Wed, Jan 13, 2010 at 8:15 PM, Prashant Gupta nextprash...@gmail.comwrote: Yes, it works fine if I do not detach second time... 2010/1/14 Jason (Google) apija...@google.com Does your application work if you don't detach the entity a second time? For instance, are you able to update the entity, re-cache it, then retrieve it and pass it back into makePersistent without any errors? I was under the impression that passing an entity into makePersistent re-attaches the entity, but it's also possible that you don't need to explicitly detach it more than once. - Jason On Tue, Jan 12, 2010 at 7:15 AM, Prashant Gupta nextprash...@gmail.comwrote: Hi, Here is my doubt... Suppose I created a new Entity : Entity ety = new Entity(); Created a new persistent manager and made it persistent : pm.makePersisent(ety); Detached it and cached to memcache : cache.put(myentity, pm.detachCopy(ety)); pm.close(); now, in the same request or subsequent request, I need that entity again. So, I picked it from memcache : Entity ety = cache.get(myentity); Made some changes : ety.doSomeChange(); Opened a new persistent manager and persisted it : pm.makePersistent(ety); Now I want to update memcache also : cache.put(myentity, * pm.detachCopy(ety)*); // line 204 pm.close(); Is it required to detach entity second time? While trying to detach is second time I am getting following exception; javax.jdo.JDOUserException: Object of type xyz.Entity and identity ety was not detached correctly. Please consult the log for any possible information. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) at org.datanucleus.jdo.JDOPersistenceManager.jdoDetachCopy(JDOPersistenceManager.java:1110) at org.datanucleus.jdo.JDOPersistenceManager.detachCopy(JDOPersistenceManager.java:1134) at HelperClass.makePersistent(HelperClass.java:204) . I am not able to point out any other reason for this exception. Following is my Entity Class : @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Entity implements Serializable{ @SuppressWarnings(unused) @Persistent(primaryKey = true) private String ID; @Persistent private String Version; @Persistent private Boolean Enabled; @Persistent private Date TimeStamp; @Persistent private LinkedListKey Permissions; @SuppressWarnings(unused) @Persistent private ModuleType Type; // ModuleType is an Enum Type -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Problem running on datastore first time
No, there is no special initialization needed when running your application for the first time in production. As Ian mentioned, please check your log output -- this should indicate what the issue is. If you have any questions about, feel free to post it here along with a full stack trace. - Jason On Mon, Jan 11, 2010 at 7:17 AM, Fugitive Steak fugitivest...@gmail.comwrote: I am trying to create a simple top score keeping app where you first enter game you want to keep top score for and number of top scores to keep track of. This is done using the simple form on http://helloworldfromfs.appspot.com/ScoreBoards.jsp but then the simple score board object is trying to be persisted to the database it blows up with Error: Server Error The server encountered an error and could not complete your request. Funny part is that it runs fine in my Eclipse IDE. Is there something special you need to do when you run your datastore for the first time on google app engine? Or is there any difference between local dev environment and online one? Is there a place where you can see the log files for this problem? I am just learning so any help will be appreciated. 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] javax.annotation.Resource Spring 3.0.0.Release declarative DI on Google App Engine
Hi Ralf. We may be able to add support for this annotation in a forthcoming release. Please star the issue in your post if you want to be notified of any status changes. - Jason On Sat, Jan 2, 2010 at 3:27 AM, Ralf Sigmund ralf.sigm...@gmail.com wrote: Hi, i am a newbie to App Engine. So I tried to do some of my Spring 3.0.0.RELEASE demo stuff. When using my favourite JAX-RS Implementation (Apache CXF 2.3.0- SNAPSHOT) I ran into the following Problem: CXF uses @Resource Annotations for Declarative Dependency Injection. But javax.annotation.Resource is not on the Whitelist. Only javax.annotation.Generated javax.annotation.PostConstruct javax.annotation.PreDestroy can be found on http://code.google.com/intl/de-DE/appengine/docs/java/jrewhitelist.html . Consequentely I get the StackTrace: java.lang.NoClassDefFoundError: javax.annotation.Resource is a restricted class. Please see the Google App Engine developer's guide for more details. Well - I did not find a clear explanation what is wrong with @Resource and why it is excluded from the Whitelist. There is also an issue http://code.google.com/p/googleappengine/issues/detail?id=2564 on this topic. But without any comment. Maybe there is a simple explanation / workaround to this situation and some kind soul could respond? Best Regards Ralf -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Appengine::Login Error
This sounds like a transient error. Please let me know if you are still seeing this error consistently and provide the Google account that you are using to sign in to appengine.google.com, and I will look into it further. - Jason On Sun, Jan 3, 2010 at 4:17 AM, sathish12345678 sathishp...@gmail.comwrote: Hi, I just would like to notify an error message which I got while navigating from login page of appengine. Error Message: 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. Here is the url of my navigation for debugging. URL of login page: https://www.google.com/accounts/ServiceLogin?service=ahcontinue=https://appengine.google.com/_ah/login%3Fcontinue%3Dhttps://appengine.google.com/ltmpl=aesig=c24697718eec1be75b7ab8f8a0c02416 URL of error page: https://appengine.google.com/_ah/login?continue=https://appengine.google.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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Doubt with detachability...
Does your application work if you don't detach the entity a second time? For instance, are you able to update the entity, re-cache it, then retrieve it and pass it back into makePersistent without any errors? I was under the impression that passing an entity into makePersistent re-attaches the entity, but it's also possible that you don't need to explicitly detach it more than once. - Jason On Tue, Jan 12, 2010 at 7:15 AM, Prashant Gupta nextprash...@gmail.comwrote: Hi, Here is my doubt... Suppose I created a new Entity : Entity ety = new Entity(); Created a new persistent manager and made it persistent : pm.makePersisent(ety); Detached it and cached to memcache : cache.put(myentity, pm.detachCopy(ety)); pm.close(); now, in the same request or subsequent request, I need that entity again. So, I picked it from memcache : Entity ety = cache.get(myentity); Made some changes : ety.doSomeChange(); Opened a new persistent manager and persisted it : pm.makePersistent(ety); Now I want to update memcache also : cache.put(myentity, * pm.detachCopy(ety)*); // line 204 pm.close(); Is it required to detach entity second time? While trying to detach is second time I am getting following exception; javax.jdo.JDOUserException: Object of type xyz.Entity and identity ety was not detached correctly. Please consult the log for any possible information. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375) at org.datanucleus.jdo.JDOPersistenceManager.jdoDetachCopy(JDOPersistenceManager.java:1110) at org.datanucleus.jdo.JDOPersistenceManager.detachCopy(JDOPersistenceManager.java:1134) at HelperClass.makePersistent(HelperClass.java:204) . I am not able to point out any other reason for this exception. Following is my Entity Class : @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Entity implements Serializable{ @SuppressWarnings(unused) @Persistent(primaryKey = true) private String ID; @Persistent private String Version; @Persistent private Boolean Enabled; @Persistent private Date TimeStamp; @Persistent private LinkedListKey Permissions; @SuppressWarnings(unused) @Persistent private ModuleType Type; // ModuleType is an Enum Type -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Communication between multiple applications
That particular term is in place to prevent misuse of our hosting environment, specifically developers that attempt to deploy the same application to multiple IDs and use a gateway application to choose between these applications randomly to distribute the load evenly. Unfortunately, the term does exclude more legitimate reasons to use multiple application IDs like your use case, although we can grant exceptions on a case-by-case basis. Out of curiosity, how are you implementing the polling? If you use a single application and just set up a cron job to run every minute, that shouldn't affect the performance of the more interactive aspect of your application. - Jason On Tue, Jan 12, 2010 at 9:16 AM, A1programmer derrick.simp...@gmail.comwrote: I know that section 4.4 of the agreement says: 4.4. You may not develop multiple Applications to simulate or act as a single Application or otherwise access the Service in a manner intended to avoid incurring fees. What if you want multiple applications which act as different portions of a larger application for performance reasons? How is it determined by Google that your motive is to avoid incurring fees of quota use. Or, am I reading the terms of use wrong? I would like to build a client application which relies on polling for a configuration via HTTP which does not effect the performance of the primary portion of the application, which lets user set configurations at any arbitrary time. One reason being, only one simultaneous HTTP request is allowed at a given time for your application. I don't care about the quota, because I won't go over it in a single application, even with the polling, and I would gladly purchase more HTTP requests allowances, I just want the end user experience to perform well. 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Version Not Ready Error
It looks like you got this working. The app is serving for me and I see several successful requests logged. Please let me know if you have any more questions. - Jason On Tue, Jan 12, 2010 at 12:30 AM, rkvsraman rkvsra...@gmail.com wrote: Hello, I started with my first Java App thru Eclipse and tried to deploy it. The Eclipse could not complete the deployment and reported Version not ready The server shows that there exists a deployed version. But when I try to access it, it throws a 500 error. The URL is http://termslator.appspot.com Please help. -RKVS Raman -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] GAE
Datastore entities can be at most 1 MB, although entities can contain references to other entities allowing you to split large files, store them in multiple entities, and then resolve these when the application is requested, keeping in mind that the maximum request size is currently 10 MB. Several utilities are available which abstract this away, creating a virtual file system on top of App Engine's datastore. And as Roberto pointed out, the new Blobstore service allows you to upload files up to 50 MB each which you can then serve back to apps. - Jason On Tue, Jan 12, 2010 at 3:34 AM, amit rathod rat...@gmail.com wrote: GAE has a limitation of allowing applications to store not more than 10MB of a single large file on it’s server. This may not be a problem for some of the web applications. This is a serious issue for many web applications which assume sufficiently large underlying storage, -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Re: Blobstore - delete record from apps console
Hi YONG. I'm seeing this too on my end. I see a more descriptive error message, however -- the Admin Console is basically reporting that billing isn't enabled for the application when it really is, and hence doesn't process the delete request. Please star this external issue and you'll be notified of updates. http://code.google.com/p/googleappengine/issues/detail?id=2622 - Jason On Tue, Jan 12, 2010 at 7:39 PM, YONG yongkia...@gmail.com wrote: What application ID are you using, and what kind of error do you see when you try to delete the blob? my app ID is yong8128. When I try to delete it from Admin Console, Blob Viewer, I got the Server Error A server error has occurred. Return to Applications screen » I had uploaded a few blob fileif delete using Blobstore API is OK. But when delete using Admin Console, Blob Viewer, got the above error. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Building Scalable Complex App
It's been awhile since I've seen this video, so I'll have to go back to re-watch it in order to answer your question completely, but I'd be interested in seeing what you've sketched out so far and happy to give you my feedback on it. - Jason On Tue, Jan 12, 2010 at 3:52 PM, Duong BaTien duong.bat...@gmail.comwrote: Hi Jason, the author Brett Slatkin and others: 1) For the list property, the video shows simple example of standard 1:n Message Receivers in python and Java. It then demonstrates a very efficient technique of Message and MessageIndex with the query of MessageIndex in python (NO Java from then on). I look at both the low level datastore with Query.setKeyOnly() and the query select id from to get the results of ListKey, then go through the loop to get the receivers. I may miss something, since the python code looks so clean. But once you are in any environment, it is very expensive to switch. This technique has major impact in data modeling. 2) Again for the set intersection, the python code looks so clean. I roughly sketch what need to be done on the Java side with either low level of datastore or with JDO. It is still not elegant as the shown codes. The demos are also in python. Again, the technique of merge join will have very significant impact on data modeling that GAE may surpass other platforms. Haven't put enough time in it yet, I wonder if any one has worked out the demos in Java and suggested best practices in data modeling for a complex large application. The job Brett Slatkin sets out to do has not completed without the Java codes since GAE now supports Java. Thanks Duong BaTien DBGROUPS and BudhNet On Tue, 2010-01-12 at 14:13 -0800, Jason (Google) wrote: Can you be more specific about what you're trying to accomplish so we don't have to search through the video to find what you're looking for? Or, at least provide a timeline reference that we can refer to in the video. :) Thanks, - Jason On Mon, Jan 11, 2010 at 7:29 AM, Duong BaTien duong.bat...@gmail.com wrote: Hi: Is there any blog and/or note to apply list properties and merge-join in python as in the following talk and demos http://code.google.com/events/io/2009/sessions/BuildingScalableComplexApps.htmlusing Java and JDO? Thanks Duong BaTien DBGROUPS and BudhNet -- 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.comappengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Re: Blobstore - delete record from apps console
What application ID are you using, and what kind of error do you see when you try to delete the blob? Can you clarify how you were able to delete the blob from mediastore apps but not the apps console (which I assume refers to the Admin Console for your app)? If you weren't successful in deleting the blob from the Admin Console, how were you able to delete it from your app? Thanks, - Jason On Mon, Jan 11, 2010 at 11:20 PM, YONG yongkia...@gmail.com wrote: Can anyone from Google App Engine team provide an answer for this? -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Using GWT RPC for Browser client on GAE - and RESTful to access data from Android/iPhone
Hi ChrisDane. Certainly, there's nothing stopping you from deploying a RemoteServiceServlet and HttpServlet to the same application if I'm understanding you correctly. You can define a wide range of servlets to handle incoming HTTP requests from your mobile app and wire them to the appropriate URLs manually using web.xml. You can also use a framework for this purpose. I believe other developers have had success with Restlet -- links available in http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine . - Jason On Mon, Jan 11, 2010 at 5:30 PM, ChrisDane gregersen@gmail.com wrote: Hi there, Having a browser client and a phone client(running native app) on the same data: Having GWT RPC returning Ajax data from GAE seems like the perfect match for a browser client - but I would not use GWT RPS from the iPhone or Android? So, would it be good coding having both a RemoteServiceServlet and a HttpServlet running in the same App spot. HttpServlet serving the Phones and RemoteServiceServlet serving GWT RPC? Then how to use RESTful on the HttpServlet? Any directions/links or samples? Thanks in advance Regards ChrisDane -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] why memcache doesn't saves @NonPersistent child object of a detached parent?
Hi Prashant. This doesn't appear to have anything to do with memcache. Your complaint is that @NotPersistent-annotated fields are reassigned to null when the object is detached. I'm not familiar enough with the JDO specification to say whether this is expected, but I've filed a bug and Max will verify whether this same behavior exists in the standard DataNucleus plugin. If so, then he will close this bug as working as intended. Here's my bug report: http://code.google.com/p/datanucleus-appengine/issues/detail?id=189 - Jason On Tue, Jan 12, 2010 at 2:10 PM, Jason Cooper jasonacoo...@google.comwrote: Hi Prashant. This doesn't appear to have anything to do with memcache. Your complaint is that @NotPersistent-annotated fields are reassigned to null when the object is detached. I'm not familiar enough with the JDO specification to say whether this is expected, but I've filed a bug and Max will verify whether this same behavior exists in the standard DataNucleus plugin. If so, then he will close this bug as working as intended. Here's my bug report: http://code.google.com/p/datanucleus-appengine/issues/detail?id=189 - Jason On Mon, Jan 11, 2010 at 4:56 AM, Prashant Gupta nextprash...@gmail.comwrote: Hi, I found a weird behaviour (testing in dev mode). Suppose I have an entity with a NonPersistent child, say *child*. I want to cache parent to memcache for fast access also I want child to be cached with parent. Since *child* is NonPersistent, so, after fetching (and detaching) parent from datastore I am assigning *child* an instance (parent.*child* = new Child()) then saving it to memcache. But next time when I fetched parent from memcache, *child* is again null. Why? I noticed that this happens only if I detach parent, if I don't, *child* survives. It doesn't matter weather I detach before or after assignment, *child* dies. Is it an expected behaviour of an detached object or a bug? -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Building Scalable Complex App
Can you be more specific about what you're trying to accomplish so we don't have to search through the video to find what you're looking for? Or, at least provide a timeline reference that we can refer to in the video. :) Thanks, - Jason On Mon, Jan 11, 2010 at 7:29 AM, Duong BaTien duong.bat...@gmail.comwrote: Hi: Is there any blog and/or note to apply list properties and merge-join in python as in the following talk and demos http://code.google.com/events/io/2009/sessions/BuildingScalableComplexApps.htmlusing Java and JDO? Thanks Duong BaTien DBGROUPS and BudhNet -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] hello when i used Google App Engine for Java I get this question
1) I wasn't able to reproduce this in either the development or production environments. I created a very simple PersistenceCapable JDO object, persisted 10 of them, then queried for these changing the values of setRange as I did so, using 0, then 2, then up to 9, and every time, the query returned the expected results. This points to an error in your code. Can you print the full stack trace/error text? 2) It looks like the DataNucleus plugin is running on your GWT classes, which could trigger this error since GWT classes cannot be enhanced and don't have the necessary JDO/JPA annotations. How is your application configured? Specifically, are you putting all of your GWT classes in a special package (e.g. xxx.yyy.zzz.client) and your App Engine/JDO classes in another package (e.g. xxx.yyy.zzz.server) as in the example apps? - Jason On Mon, Jan 11, 2010 at 5:23 AM, fige257 fige...@hotmail.com wrote: hello: 1)when I use javax.jdo.Query.setRange(long fromIncl, long toExcl) ,get this question, maybe is an error! e.g I have 40 record in my jdo. when fromIncl is start 0, the result of query is right but when fromIncl is start other number, like 2 the result is error. is not start 2 to number toExcl I think is wrong. 2)other question is about eclipse plugin when I compile my class use google GWT get error like attachment, and can not enhanced my class mail me. best regard my English is suck,if something wrong in it, currecting me now -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Re: Beginner question: one to many relationship
If you're using JDO, then just as Juan said, you can fetch the author's books when you fetch the author entities themselves. Just make sure to specify that the books field is in the default fetch group: @Persistent(defaultFetchGroup = true) private ListBook books; //... public ListBook getBooks() { return books; } - Jason On Mon, Jan 11, 2010 at 12:53 PM, Juan j...@irungaray.com.ar wrote: Are you using JDO/JPA? or querying thru GQL? in the first case, make sure you eager fetch de book collection when retrieving the object form DB. second case... just follow Bert´s suggestion On Jan 10, 7:40 pm, fhucho fhu...@gmail.com wrote: Hi, sorry for beginner question. I have authors and books in the database. Every author has list of books in a one to many owned relationship. I know the author's name, how can I retrieve the author and his books from database? I know how to get the author but not his books (Author.books). -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
Re: [appengine-java] Youtube api issues - too many recent calls only on GAE
First, what is your application ID? Second, how do you guarantee that you only make the call once per hour? Do you have it set up as a cron job or are you just making the call once a memcache value expires or are you using another mechanism? What kind of call are you making to the YouTube API and what is the specific YouTube quota that you are hitting? Lastly, are you using the YouTube API directly or are you using the Google Data client library for Java? - Jason On Mon, Jan 11, 2010 at 6:18 PM, Kishore Jaladi kishorejal...@gmail.comwrote: Hi, We have a small YoutubeAPI mashup App hosted on Google App engine. From last friday; we have been getting yt:quota - too_many_recent_calls error from youtube even though we call once in an hour. We suspected Google App engine; and hosted our war to some hosting provider it was Rock Solid we are NOT getting those youtube quota limit errors (too_many_recent_calls). Unable to understand why we are getting that error only when we host on Google App engine . Are there any problems with Google App engine from the last few days? Any help would be greatly appreciated Thanks, -Kishore -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
[appengine-java] New issue tracker template for production issues
Hi Everyone. Just a note that Googler replies may be slower over the next couple of weeks as we take a short pause to welcome the new year. During this break, we will be piloting a new issue tracker template for speedier resolution of production issues. In the rare event that your app experiences an urgent production-related issue that requires App Engine team assistance, such as a stuck index, quota denials, or other serving issues that aren't recorded in the error logs, please head to the issue tracker, click the New issue link, and choose Production issue from the list of available templates. http://code.google.com/p/googleappengine/issues/entry?template=Production%20issue Note that this is not for general bugs -- you should continue using the Python defect or Java defect templates for these -- and we will be closing issues that are not production related with the expectation that you will report your issue in the discussion groups or file a new bug. We're piloting this so we can more quickly help applications that require the App Engine team's direct attention, so please try to file your issues appropriately. Have a happy (and safe!) holiday, and we'll check in again soon. -- 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=en.
[appengine-java] Chat Time transcript for December 16, 2009
This past Wednesday, the App Engine team hosted the latest session of its bimonthly IRC office hours. A transcript of the session and a summary of the topics covered is provided below. The next session will take place on Wednesday, January 6th from 7:00-8:00 p.m. PST in the #appengine channel on irc.freenode.net. - Jason --SUMMARY--- - Q: What kind of data redundancy do uploaded files and stored data have and is this redundancy counted towards the Stored Data quota? A: We use GFS for data storage, which has its own redundancy, and we also replicate to multiple datacenters and take backups. The cost of all of this replication is included in the per-gigabyte cost, so you are only charged for one copy of your data plus the indexes needed to query it. [9:02-9:03] - Discussion on feature request (http://code.google.com/p/ googleappengine/issues/detail?id=2377) to add more detail to the App Engine status page and/or create a per-app status page to check whether specific apps are being impacted by a particular issue since not all apps are affected by all issues. Note: we do post planned and unplanned downtime to the downtime-notify mailing list, so please subscribe to http://groups.google.com/group/google-appengine-downtime-notify to receive reminders about planned maintenance and status updates in the event of system issues. [9:04-9:10, 9:16] - Discussion on planned maintenances in general -- every 30-60 days, App Engine enters read-only mode where apps continue serving but the datastore can only be read, not written to. We're working on reducing the occurrences of these planned maintenances as well as the time it takes to complete each one, and will have a calendar set up soon so developers can keep up to date with the maintenance schedule. [9:34-9:39] - Q: Can one achieve better peformance by writing entities in different entity groups outside of a transaction over writing multiple entitites in the same entity group inside of a transaction? A: Yes! App Engine supports batch (parallel) writes for entities in distinct entity groups. Updates to multiple entities in the same entity group, regardless of whether you use transactions, forces the entities to be written serially which takes more time. In order to achieve the best performance, keep your entity groups as small as possible and only use transactions if you absolutely need atomic writes to two or more entities. [9:09-9:11, 9:13-9:15] - Q: Can you map subdomains to versions? A: You can do this right now -- when you deploy a new version, you can access it by hitting version_string.latest.app_id.appspot.com, even if it's not the default version. As of release 1.2.4, App Engine supports wildcard subdomains, which work without any explicit configuration. To determine which subdomain is being used, inspect the 'Host' request header -- see http://googleappengine.blogspot.com/2009/08/new-features-in-124.html. [9:11, 9:14, 9:16, 9:18] - Discussion on feature request to allow app deployment to domains other than appspot.com because of the crowded namespace. Note: App Engine already allows you to deploy your application to any Google Apps domain, so if you don't plan to host directly on appspot.com, a recognizable app ID isn't as important. You can always prefix your own username/alias to any app ID you choose to reduce the possibility that the app ID is taken. [9:16-9:17, 9:21] - Q: Is there any way to query for not null without using an inequality? A: not equal to or != is implemented as two inequality filters, so the answer is no. One workaround is using a calculated property instead -- at write time, determine if a certain property contains a value of interest. If so, store True in a boolean property, False otherwise, then use an equality filter on this boolean property. Or just filter the results in memory. Since empty property values (displayed as missing in the datastore viewer) are not indexed, you can just leave a particular property without a value so when you issue a query that filters on that property, entities with missing values don't get returned as results. You can't currently query on whether a field is empty yet, although you can query on whether a certain property value is null since null is an actual value. [9:19-9:26] - Q: Are there any plans to increase the size of a result set from 1,000? A: No, but datastore cursors, which are on the public roadmap, should make it easier to page through larger result sets. A cursor is an object that points to a particular point in the result set of a query which can be serialized and reconstituted so that you can pick up from where you left off in a query -- essentially, it's an object that helps you page through your result set, even if there are more than 1,000 results. [9:26-9:29] - Q: Are there any limits to the number of blobs you can store using the new Blobstore service? A: No, but space needed for blobs are counted against your storage
Re: [appengine-java] com.google.appengine.api.datastore.DatastoreNeedIndexException
If you're deploying a new version that relies on indexes that haven't been built yet, you should be able to deploy this to a non-default version. This way, the indexes get built eventually but your application won't be serving index errors in the meantime. Then, when the indexes are built, make this new version the default to introduce your new functionality. - Jason On Wed, Dec 16, 2009 at 12:11 AM, Dmitry Anipko dmitry.ani...@gmail.comwrote: Jason, thanks for the info, this solved the problem. I've noticed however that the index building can take some time after the application has been deployed - is there any way to control that / prevent the new version of the application from being used if the indices are not ready yet? (Otherwise the app is guaranteed to produce errors if customers start using it when the indices are not yet fully ready) On Tue, Dec 15, 2009 at 4:16 PM, Jason (Google) apija...@google.com wrote: Hi Dmitry. What's your app ID? Indexes are auto-generated by the SDK when you run a query locally that requires a custom index. If you don't run a particular query locally and it uses multiple sort orders or otherwise requires a custom index, then the index won't be generated in datastore-indexes-auto.xml and you'll see an exception in production. You can see which indexes are created and serving for your app by clicking Datastore Indexes in your app's Admin Console. For now, I suggest adding the index definitions contained in your exception to your datastore-indexes.xml file, re-deploying your app, waiting for the indexes to build, and seeing if that fixes your problem. - Jason On Sun, Dec 13, 2009 at 10:00 PM, Dmitry Anipko dmitry.ani...@gmail.com wrote: Hello, our application recently started producing exceptions like: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found.. datastore-index kind=SketchCommandStore ancestor=false source=manual property name=sketchId direction=asc/ property name=orderId direction=asc/ /datastore-index or Server error 1: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found.. datastore-index kind=SketchCommentThread ancestor=true source=manual property name=lastUpdateTimestamp direction=desc/ /datastore-index for different tables in the data store. Our app doesn't use explicit index configuration / don't have datastore-indexes.xml . On the local development server the auto generated xml for these two tables looks like: !-- Indices written at Sun, 13 Dec 2009 23:01:11 UTC -- datastore-indexes !-- Used 1 time in query history -- datastore-index kind=SketchCommentThread ancestor=true source=auto property name=lastUpdateTimestamp direction=desc/ /datastore-index !-- Used 2 times in query history -- datastore-index kind=SketchCommandStore ancestor=false source=auto property name=sketchId direction=asc/ property name=epochDate direction=desc/ /datastore-index /datastore-indexes I wonder if anybody faced similar issues / can shed some light on how to deal with that? Thank you, Dmitry -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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
Re: [appengine-java] com.google.appengine.api.datastore.DatastoreNeedIndexException
Hi Dmitry. What's your app ID? Indexes are auto-generated by the SDK when you run a query locally that requires a custom index. If you don't run a particular query locally and it uses multiple sort orders or otherwise requires a custom index, then the index won't be generated in datastore-indexes-auto.xml and you'll see an exception in production. You can see which indexes are created and serving for your app by clicking Datastore Indexes in your app's Admin Console. For now, I suggest adding the index definitions contained in your exception to your datastore-indexes.xml file, re-deploying your app, waiting for the indexes to build, and seeing if that fixes your problem. - Jason On Sun, Dec 13, 2009 at 10:00 PM, Dmitry Anipko dmitry.ani...@gmail.comwrote: Hello, our application recently started producing exceptions like: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found.. datastore-index kind=SketchCommandStore ancestor=false source=manual property name=sketchId direction=asc/ property name=orderId direction=asc/ /datastore-index or Server error 1: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found.. datastore-index kind=SketchCommentThread ancestor=true source=manual property name=lastUpdateTimestamp direction=desc/ /datastore-index for different tables in the data store. Our app doesn't use explicit index configuration / don't have datastore-indexes.xml . On the local development server the auto generated xml for these two tables looks like: !-- Indices written at Sun, 13 Dec 2009 23:01:11 UTC -- datastore-indexes !-- Used 1 time in query history -- datastore-index kind=SketchCommentThread ancestor=true source=auto property name=lastUpdateTimestamp direction=desc/ /datastore-index !-- Used 2 times in query history -- datastore-index kind=SketchCommandStore ancestor=false source=auto property name=sketchId direction=asc/ property name=epochDate direction=desc/ /datastore-index /datastore-indexes I wonder if anybody faced similar issues / can shed some light on how to deal with that? Thank you, Dmitry -- 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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=en.
[appengine-java] Chat Time transcript for November 4, 2009
This past Wednesday, the App Engine team hosted the latest session of its bimonthly IRC office hours. A transcript of the session and a summary of the topics covered is provided below. The next session will take place on Wednesday, November 18th from 9:00-10:00 a.m. PST in the #appengine channel on irc.freenode.net. Note that this will be the first morning Chat Time session to occur after daylight time in the U.S. ends, which means that it will be taking place one hour earlier than usual in countries or states that don't observe daylight savings time. Please be aware of this time difference so you don't inadvertently miss the session. - Jason --SUMMARY--- - Q: Does Google have any intention of contributing changes to Django that make it easier to use with App Engine, particularly the datastore bits? A: Our intent is to make it as easy as possible to get up and running with any framework (assuming that the framework is compatible with App Engine's sandbox restrictions). Some frameworks will work better out-of-the-box than others, particularly those with more general database abstractions that don't assume the use of a relational database. For Django in particular, while we don't plan to augment the framework directly, we don't discourage the various third- party libraries which aim to make App Engine integration easier, including Django AE Utils and app-engine-patch. [7:05, 7:07, 7:10-7:17, 7:19] - Q: Is there any status update on issue 1695 (high rate of DeadlineExceededErrors on instance startup)? A: We're constantly working on improving instance startup time for both runtimes. If you see these errors consistently in Python, try removing any unnecessary imports or move the import statements closer to the lines of code where they're needed -- this prevents the imports from loading all at once. Additional optimization techniques are described in http://code.google.com/appengine/docs/python/runtime.html#App_Caching. [7:19, 7:22-7:25] - Q: Has the cause of the daily early-morning latency spikes for Python applications been determined? A: More than likely, this was a temporary situation (the latest thread in the corresponding discussion group thread (http://groups.google.com/group/google-appengine-python/ browse_thread/thread/f30e43516030bb09) is from early last week), but if you continue to see these recurring spike, please post specific details including application ID, request information, and snippets from your request logs. [7:31-7:33, 7:36-7:39, 7:44-7:45] - Q: When can we expect the next SDK and what features will it have? A: We're shooting for a November release and it will tentatively have datastore cursor support (both runtimes), better support for JDO/JPA inheritance (Java runtime), etc. although the features are still subject to change. [7:32, 7:37, 7:46, 7:49-7:50, 7:52] - Q: Why does the Dashboard show a higher amount of storage space used than the datastore statistics page? A: Indexes are not accounted for (yet) on the datastore statistics page, so if you have a large number of unindexed properties and entities, the bulk of your storage can be consumed by indexes. [7:39-7:46, 7:48-7:50, 7:52-7:55] - Q: When building applications for multiple clients, is it reasonable to partition kinds by client and use datastore statistics to determine how much space each client is using individually? A: There are problems with this approach. For example, if any of your kinds require custom indexes (indexes defined in index.yaml or datastore- indexes.xml), you will have to re-deploy your application for every client since indexes can't be built programatically. A better solution may be to deploy a new application per client, but you have to complete a form in order to do so without violating App Engine's terms of service: http://code.google.com/support/bin/request.py?contact_type=AppEngineMultiInstanceExceptionRequest. [7:56, 7:58-8:03] --FULL TRANSCRIPT--- [7:00pm] Jason_Google: Hi Everyone. I'm kicking off today's Chat Time session. I'll be in the channel for the next hour to answer any App Engine questions, so shoot! [7:02pm] Jason_Google: Any questions? [7:05pm] salsakran: Jason_Google: in the recent django 1.2 voting for app engine support it was brought up that there was approval for one googler to help with app-engine-patch part time. what's google's take on the various python frameworks running on GAE? Will you guys be extending webapp at all, or help integrate say django more closely? [7:07pm] Jason_Google: webapp will be augmented from time to time as new App Engine features are introduced, e.g. the webapp.xmpp_handlers that was added with XMPP, but I think the general approach is to make it as easy as possible to get up and running with any preferred framework, which on the Python side, is usually Django. [7:08pm] AreEmmKay: are there going to be more libraries supported with the
[appengine-java] Re: GAE status / availalbility problems?
As always, I need your application ID in order to help troubleshoot app-specific issues. Please provide that and any stack traces or other error messages you see in your application's logs. - Jason On Fri, Nov 6, 2009 at 9:47 PM, Dmitry Anipko dmitry.ani...@gmail.comwrote: After some more experimentation, it looks like there is something in the data store that is surfaced by our application: if I clean up the store for the application completely, using the web interface, then for the first ~100 request it works fine, but after some time, it starts producing those errors I wrote before - it can't query objects by index (and that problem persists until I clean the store again). The second observation - although I don't know if it is related or not - is when the store for my app is in such state, and I try to view objects through the web interface, the web interfaces crashes with the error 500: Server Error A server error has occurred. Return to Applications screen » GAE folks, can someone please take a look - this is a blocking issue for my team, and I don't know how to proceed here without your help. Everything works just fine when I run it on a local development server. Thank you. On Nov 6, 11:05 am, Diana Cruise diana.l.cru...@gmail.com wrote: I see NO reply from GAE here regarding such a critical issue!!! Is your app still down, what is the status of your app? How are we supposed to put an application in production with GAE if such a problem can occur with NO response for 3 days? Is there another channel to raise such high-priority issues to get proper helpdesk response? On Nov 4, 1:58 am, Dmitry Anipko dmitry.ani...@gmail.com wrote: It is 11:56 Pacific 11/3/2009, are there any known issues withGAE right now? My application that has been working for a couple of months now today started producing failures for some queries from the data store (basically an object which has just been stored cannot be retrieved after that by key), and after some time started producing even htmlhead meta http-equiv=content-type content=text/html;charset=utf-8 title500 Server Error/title /head body text=#00 bgcolor=#ff h1Error: Server Error/h1 h2The server encountered an error and could not complete your request.pIf the problem persists, please A HREF=http:// code.google.com/appengine/support/report/A your problem and mention this error message and the query that caused it./h2 h2/h2 /body/html The same application executes just fine in the localGAEdevelopment environment. Can folks fromGAEcomment if there is any maintenance going on right now or how could I get more details on what causing the failures (again the same code worked for quite some time now, so I think it is unlikely the code is the issue here). Thanks for your help.- 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: does usage of buffered writer in servlet make sense
If you're calling print or println many times in your servlet, then it makes sense, although the resource savings you net may not be significant. In general, it's acceptable to use the default PrintWriter. - Jason On Mon, Nov 2, 2009 at 7:18 AM, Raphael André Bauer raphael.andre.ba...@gmail.com wrote: hey, i am wondering if it makes sense to wrap the printwriter of a servlet into a bufferedwriter. depending on the underlaying implementation that can make sense imho, but i am not sure about the google app engine... any recommendations? thanks! raphael --~--~-~--~~~---~--~~ 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: PDF Generator Library
Great news, Eugene! Can you please submit it to the open source projects page by following the instructions at the bottom of http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects ? - Jason On Sun, Nov 1, 2009 at 8:55 PM, edragoev drag...@gmail.com wrote: Hello Jason, I took Francois tweaks and also added support for PNG files that doesn't depend on the AWT classes. We have new GAE compatible Open Source version now: http://pdfjet.com/os/download.html Best Regards, Eugene P.S. The PNG decoder I wrote currently supports Truecolor PNG files with Bit Depth 8 and paletted PNG files with Bit Depth 4 and 8. Currently there is no support for grayscale images. If there is interest we may add support for more types of PNG files and possibly GIF support. On Oct 7, 4:14 pm, Jason (Google) apija...@google.com wrote: Hi mably. Can you describe the tweaks you need to make in more detail? I'd like to add this to the Will it play in App Engine page. Thanks, - Jason On Tue, Oct 6, 2009 at 6:44 AM, mably fm2...@mably.com wrote: The PDFJet library seems to works fine on GAE after a few tweaks to replace files by streams. It's a quite low-level library but should be ok for simple tasks. http://www.pdfjet.com/os/edition.html On 28 sep, 19:09, Jason (Google) apija...@google.com wrote: You're correct. As far as I know, no one has been able to use JasperReports within App Engine because of the reliance on iText which in turn requires several AWT classes that aren't currently on the JRE class white list. - Jason On Thu, Sep 24, 2009 at 10:12 AM, mably fm2...@mably.com wrote: Are you sure that JasperReports works fine on GAE ? I thought it was using iText which doesn't seem to run on GAE (it needs an unsupported patch). Mian Rashid a écrit : Use can use Jasper Report and there is also designer tool available for that is IReport. On Sep 23, 6:57 pm, mably fm2...@mably.com wrote: Does anybody know of a java PDF generator library working with Google App Engine ? Even a low-level one. Any help would be greatly appreciated. Thanx in advance. Francois Bordeaux, FRANCE --~--~-~--~~~---~--~~ 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 using Federated Login (OpenID + OAuth)
Hi Pradheep. The library that you are using is attempting to spawn a new thread which is not permitted by App Engine's sandbox. You will have to either disable multithreading via configuration, if the library exposes this, or use another library. The Google Accounts API that is referenced in the paragraph that you quoted from our documentation is referring to the Google Accounts service that App Engine exposes: http://code.google.com/appengine/docs/java/users/ This App Engine API only returns the user's nickname and email address, however, so you'll need to use a different mechanism if other profile information is necessary. - Jason On Sun, Nov 1, 2009 at 8:24 PM, Pradheep A R pradheep@gmail.com wrote: Hello everyone, I am sure i am asking something that some one here knows the answer. I am trying to implement the OpenID client to authenticate my users in the Google App Engine website and then use Google Accounts API to access their profile (All i want is to show their profile pics, show their contacts when they want to notify some information to their friends when they use my websitewww.letsvoteonline.com) I am using OpenID for Java library for this purpose. The problem here is i am getting the following exception. java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:151) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkAccess(DevAppServerFactory.java:176) at java.lang.ThreadGroup.checkAccess(Unknown Source) at java.lang.Thread.init(Unknown Source) at java.lang.Thread.(Unknown Source) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ReferenceQueueThread.(MultiThreadedHttpConnectionManager.java:1039) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.storeRefer enceToConnection (MultiThreadedHttpConnectionManager.java:164) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.access $900(MultiThreadedHttpConnectionManager.java:64) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ConnectionPool.createConnection (MultiThreadedHttpConnectionManager.java:750) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConne ction (MultiThreadedHttpConnectionManager.java:469) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnect ionWithTimeout (MultiThreadedHttpConnectionManager.java:394) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:152) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:324) at org.openid4java.util.HttpCache.head(HttpCache.java:296) at org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsLocation (YadisResolver.java:360) at org.openid4java.discovery.yadis.YadisResolver.discover (YadisResolver.java:229) at org.openid4java.discovery.yadis.YadisResolver.discover (YadisResolver.java:221) at org.openid4java.discovery.yadis.YadisResolver.discover (YadisResolver.java:179) at org.openid4java.discovery.Discovery.discover (Discovery.java:134) at org.openid4java.discovery.Discovery.discover (Discovery.java:114) at org.openid4java.consumer.ConsumerManager.discover (ConsumerManager.java:527) at letsvote.webapps.Letsvote_test1Servlet.authRequest (Letsvote_test1Servlet.java:170) at letsvote.webapps.Letsvote_test1Servlet.doGet (Letsvote_test1Servlet.java:93) 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)
[appengine-java] Re: error 500 from server when starting the guestbook demo app
It looks like your system may not have Java configured correctly or otherwise can't invoke the javac compiler needed to compile your application. java.io.IOException: Cannot run program javac.exe: CreateProcess error=2 You may want to search the web for similar error messages, which might help you determine the source of the issue. Are you using the Eclipse plugin or the command line to start your app? - Jason On Mon, Nov 2, 2009 at 11:18 AM, Tomas tomasep...@gmail.com wrote: Hi I'm Tomas - a newbe. I get error 500 from server when trying a demo application to according to instructions: http://code.google.com/appengine/docs/java/gettingstarted/installing.html Response from localserver:8080 look here: http://docs.google.com/Doc?docid=0Afhb3u6SCF24ZGN2cjN2cTNfM2ZwODkyN2Yyhl=en what' wrong? --~--~-~--~~~---~--~~ 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 Refactoring / Adaptable Design
Unfortunately, the solution I proposed does not allow for adding additional filters when querying for all Campaigns with FundingOganization ABC. If this is a requirement, you'll have to consider several options -- either doing the filtering in memory, which is reasonable if you only expect a handful of matched Campaigns, or including the criterion field in the table so you can query on it directly, which may muddle your schema. Since App Engine's datastore doesn't support joins, most data models won't be completely normalized, which probably feels strange if you're coming from the RDBMS mindset. But storage is cheap and you can usually ignore the added redundancy if the data fields in question are not expected to change often. - Jason On Mon, Nov 2, 2009 at 3:27 PM, Hans gcbo...@gmail.com wrote: thanks Jason - I'll need to think more about how this would work in my case. It sounds like I'll be able to query that new kind (return all the Campaign keys for a FundingOrganization of ABC) to get a collection of keys. But then if I wanted to extract only the entities from that result that meet certain criteria (Campaign.Duration 30) , I'll need to do that outside of the query language. I'm sure my questions reflect a newness to OOD. I do appreciate your response. Hans On Nov 2, 3:27 pm, Jason (Google) apija...@google.com wrote: Hi Hans. Aside from the article on modeling entity relationships and the JDO ... It sounds like you want to add a new kind (as opposed to a new property for an existing kind) and establish a relationship with this new kind (FundingOrganization) and an existing kind (Campaign). For many-to-many relationships such as this, one approach you can take is similar to what you might do for an RDBMS schema: introduce a new table (kind) to model the relationship between FundingOrganization and Campaign entities. This third kind would have only two properties, one storing a FundingOrganization Key and the other a Campaign Key, then you can use it to query for all FundingOrganization entities associated with a given Campaign and vice versa. This approach doesn't require you to modify your Campaign kind at all, so you don't necessarily need to make it aware of the FundingOrganization kind, which was one of your requirements. Let me know if this answers your question or if you have any other questions. - Jason On Thu, Oct 29, 2009 at 1:55 PM, Hans gcbo...@gmail.com wrote: Hoping someone might help me with a somewhat OT question. I developed an object model for a GAE/J application that worked fairly ... Can someone point this rookie to intro material/URLs for building and refactoring designs that lend themselves to these type of changes? I'm looking for info on adaptable design, especially when you're using a datastore and not using a RDBMS, junction tables, etc. thanks, Hans --~--~-~--~~~---~--~~ 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: Error while uploading app to GAE
Did your path always include the one \ delimiter with all of the other separators being /? - Jason On Mon, Nov 2, 2009 at 7:45 PM, Vik vik@gmail.com wrote: Hie Today all of a sudden when i tried to deploy my app to GAE throws errors: An internal error occurred during: Deploying SakshumWebProduction to Google. Received IOException parsing the input stream for D:/eclipse/vskumar/workspace/SakshumWebProduction/war\WEB-INF/web.xml The contents of web.xml are just fine. here it is: ?xml version=1.0 encoding=utf-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/javaee; version=2.5 servlet servlet-namesakshumweb/servlet-name servlet-classvik.sakshum.sakshumweb.SakshumWebServlet/servlet-class /servlet servlet-mapping servlet-namesakshumweb/servlet-name url-pattern/sakshumweb/ui/page/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list /web-app Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.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] Re: Object not persisted JDO
Hi Julio. How are you verifying that the entity is not persisted? Are you querying for it or verifying using the data viewer? If you're not using the data viewer, please try this first -- http://localhost:8080/_ah/admin(substitute your port number for 8080). If you don't see your entities in the data viewer, can you post your source for the PersistenceCapable objects and the code you're using to persist them? - Jason On Mon, Nov 2, 2009 at 6:31 AM, Julio Faerman jfaer...@gmail.com wrote: Hi, I am trying to persist an object using JDO, but the object is not beeing persisted to the datastore. Can anyone please help me understand why? Here is what i can see in the logs from the moment i .makePersistent() to the point EM is closed: [DataNucleus.Persistence] - Making object persistent : br.com.ximp.vike.server.model.games.ww.ac...@1392743 [DataNucleus.Cache] - Object br.com.ximp.vike.server.model.games.ww.ac...@1392743 (id=org.datanucleus.identity.identityrefere...@6506f0) added to Level 1 cache (loadedFlags=[YYY]) [DataNucleus.Transaction] - Outstanding nontx update being committed to datastore [DataNucleus.Transaction] - Transaction created [DataNucleus Transaction, ID=Xid= --~--~-~--~~~---~--~~ 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: managing root / parent objects
The overhead of having to fetch the inner object is negligible since you're using a direct fetch by key. You can set a @NotPersistent property of the intended type and modify your DAO methods to fetch both objects (User and FavoriteFood) and set the @NotPersistent property of the User to this fetched object. It's a few extra lines but you get the convenience of being able to access the inner object directly without polluting your datastore with cloned objects. - Jason On Sat, Oct 31, 2009 at 4:21 PM, Rusty Wright rwright.li...@gmail.comwrote: Yes, that's the point. My thinking is that (correct me if I'm wrong) if I store the object's key, when I fetch the outer containing object that has its key, I'll need to use the key to fetch the object. By cloning it, I don't need to do that, I just fetch the outer object and the inner object will get fetched along with it (assuming it's in the default fetch group). Whenever I want the outer object I'll also want its inner objects. If I store the key in the outer object, when I fetch the outer object it seems to me that I'll then need to fetch the contained object. And I'll have two fields on the outer object; using my FavoriteFood example, I'll need a field favoriteFoodKey, type Key, which is persisted, and a favoriteFood, type FavoriteFood, which is transient, and not persisted. Then my jsp would use the getter for the favoriteFood field. This is why I'm asking; it seems a bit complicated. Perhaps there's a simpler way that I could use. In my case, there isn't a lot of data so the duplication of objects isn't a big issue. John Patterson wrote: Why are you cloning instead of setting the original object? JDO will store the clone as a separate entity in the datastore. 2009/11/1 Rusty Wright rwright.li...@gmail.com mailto:rwright.li...@gmail.com I'm trying to figure out the best way to manage root objects that are used with different objects. For a semi concrete example, suppose you have a web page with a drop down list of Favorite Foods, and a User object may have a reference to a FavoriteFood, and other objects will have references to FavoriteFood objects as well. It seems to me that if individual FavoriteFood objects don't change, but the list (table) of FavoriteFood objects can grow, you could make them Cloneable and use the clone, making it a child, for example: FavoriteFood fav = favoriteFoodDao.findByStringId(stringId); user.addFavoriteFood(fav.clone()); Google's examples usually (always?) store the subordinate object's Key rather than a clone of the object. I can see problems with using clones; even though I'm sure they won't, they may change. Similarly, items may need to be deleted from the master FavoriteFood list/table. There may be other problems that I haven't thought of. Anyhow, I'm wondering if others have gone done this road or investigated it and can offer advise. 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: AccessControlException on DatastoreService.put() method
Do you see any other exceptions under WARNING or ERROR that provides more information? How long do you wait before the exception is thrown? If it's close to 30 seconds, you could be experiencing a timeout, and you can try scaling back the number of entities written (500 is the theoretical max but depending on the size of the entities and the responsiveness of the datastore, you may not be able to hit this count in every request). - Jason On Sat, Oct 31, 2009 at 8:30 AM, Pion onlee2...@gmail.com wrote: I got the AccessControlException on the following code snippet: public void add(ListString iriList, ListString nameList, ListString imageList) { // deleted for brevity try { datastore.put(eList); // The log below shows this line as at com.col.server.MDsIri.add(MDsIri.java:74) } catch (IllegalArgumentException exIA) { logger.severe(IllegalArgumentException when trying to datastore.put. Exception message: + exIA.getMessage()); } catch (ConcurrentModificationException exCM) { logger.severe(ConcurrentModificationException when trying to datastore.put. Exception message: + exCM.getMessage()); } catch (Exception ex) { logger.severe(Exception when trying to datastore.put. Exception message: + ex.getMessage()); // the log (last line) below says that the message is unknown } } // deleted for brevity } I follow the guideline that the eList has only 500 entities at most as mentioned on http://code.google.com/appengine/docs/java/datastore/overview.html#Quotas_and_Limits . Also, I don't call any thread or system threads as mentioned on http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox. I did not get the error below on my Development Server. I don't know how to interpret the error because the exception/error message is Unknown(last line of the log). I appreciate any help. Log from the Google Apple Engine Admin Console - Main - Logs 10-31 09:06AM 07.119 com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue $SystemLoader loadFinalizer: Not allowed to access system class loader. I 10-31 09:06AM 07.145 com.google.appengine.repackaged.com.google.common.base.internal.Finalizer getInheritableThreadLocalsField: Couldn't access Thread.inheritableThreadLocals. Reference finalizer threads will inherit thread local values. I 10-31 09:06AM 07.148 com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue init: Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created. java.lang.reflect.InvocationTargetException at com.google.appengine.runtime.Request.process-69e6389d93ef7f72 (Request.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:40) at com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.init (FinalizableReferenceQueue.java:124) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools $WeakInterningPool.clinit(InterningPools.java:104) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool (InterningPools.java:48) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.clinit (ProtocolSupport.java:55) at com.google.apphosting.api.DatastorePb$PutRequest.freeze (DatastorePb.java:8452) at com.google.apphosting.api.DatastorePb$PutRequest$1.init (DatastorePb.java:8367) at com.google.apphosting.api.DatastorePb$PutRequest.clinit (DatastorePb.java:8364) at com.google.appengine.api.datastore.DatastoreServiceImpl.put (DatastoreServiceImpl.java:155) at com.google.appengine.api.datastore.DatastoreServiceImpl.put (DatastoreServiceImpl.java:147) at com.col.server.MDsIri.add(MDsIri.java:74) // please see the code snippet above at com.col.server.tool.DsWriter.writeIri(DsWriter.java:73) at com.col.server.CAdmin.doIriWriteIri(CAdmin.java:165) at com.col.server.CAdmin.doGet(CAdmin.java:60) 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
[appengine-java] Re: Maximum data size of image sent to service is not 1Mb, but 512Kb?
Hi Esteban. Please file any discrepancies between the development and production environments as bugs in the public issue tracker: http://code.google.com/p/googleappengine/issues/list Can you attach or link to an image that I can use to reproduce the error? Thanks, - Jason On Sat, Oct 31, 2009 at 10:41 AM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi there: I am using the ImagesService as this page ( http://code.google.com/intl/en/appengine/docs/java/images/overview.html ) says, using exactly the code posted there, and found out that with images between 512Kb (aprox.) and 1Mb, a strange error occurs. Moreover, the exception thrown does not have the same text description (I asume this in particular has to do with the differences that still exist between development and production environment). Image: .png, 581Kb Development: Caused by: java.lang.IllegalArgumentException: Failed to read image at com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:65) (...) Production: Caused by: java.lang.IllegalArgumentException: Unknown at com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:65) (...) This error is different that the one that occurs when an 1Mb image is processed, which correctly says The request to API call images.Transform() was too large.. I tried with an .png/466Kb image, and it worked fine in both environments. I think we have two different issues here, the different error messages in dev/prod environments, and the apparently real restriction size, which seems to be 512Kb aprox. Has anyone had the same problem? What can google guys say about this? Thanks in advance, Esteban PD = the 581Kb png image was edited with mspaint to reach that size, would that have something to do with it? (I succesfully visualized in firefox browser, so think it's ok, but I mention it just in case) --~--~-~--~~~---~--~~ 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: PreparedQuery.countEntities() clarifications
I think you already arrived the recommended solution to the issue of counting entities. For reference, the reason that the production environment only returned at most 1,000 is an artifact of the query mechanism that App Engine uses which can only return up to 1,000 results per query. - Jason On Fri, Oct 30, 2009 at 9:07 AM, Pion onlee2...@gmail.com wrote: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/PreparedQuery.html#countEntities%28%29 shows int countEntities() Retrieves the number of Entities that currently match this Query. I have the following method: protected int count(String kind) { Query query = new Query(kind); PreparedQuery preparedQuery = datastore.prepare(query); return preparedQuery.countEntities(); } On my Development Server, it returns the total number of the entities which is over 40,000 entities. But when deploying it on GAE, it always returns 1,000 entities. Is this because of this limitation http://code.google.com/appengine/docs/java/datastore/overview.html#Quotas_and_Limits ? If so, what is the best way to find total number of entities I have? Please correct me if my assumption is incorrect. Thanks in advance for your help. --~--~-~--~~~---~--~~ 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: task queue limit 30 sec?
Hi Steve. Can you post the full stack trace of one of these exceptions? - Jason On Mon, Nov 2, 2009 at 4:30 AM, sproz stephane.spra...@gmail.comwrote: Meanwhile, could anyone let me know why I get these DeadlineExceededException ? Thanks, Steve www.sprosys.com On Oct 29, 9:55 pm, Jason (Google) apija...@google.com wrote: We'll get these reflected in the documentation very soon. - Jason On Wed, Oct 28, 2009 at 12:49 PM, Toby Reyelts to...@google.com wrote: The limits on tasks queues recently changed http://googleappengine.blogspot.com/2009/10/task-queue-quota-increase For example, the new total limit is 100K tasks/day for free apps and 1M default for billing enabled. On Wed, Oct 28, 2009 at 2:38 PM, Jason (Google) apija...@google.com wrote: All task queue quotas and limits are listed at http://code.google.com/appengine/docs/java/taskqueue/overview.html#Qu Note that you can currently insert up to 10,000 tasks per day, although billed applications may have a higher upper limit. - Jason On Tue, Oct 27, 2009 at 12:21 PM, James Cooper jamespcoo...@gmail.comwrote: Related question: Is there a limit to the number of pending tasks in a queue? Can you have a million items in there? thanks -- James On Oct 27, 12:07 pm, Jason (Google) apija...@google.com wrote: No, all individual tasks must complete in 30 seconds or less. For larger jobs, such as processing millions of entities, the recommended approach is to split these jobs and run them as multiple tasks. At the end of the current task, you can determine if more work needs to be accomplished and dynamically add new tasks to the queue until the job is completely finished. - Jason On Sun, Oct 25, 2009 at 1:59 PM, sproz stephane.spra...@gmail.com wrote: Is the limit duration of a task in a queue superior to 30 seconds? I receive a DeadlineExceededException all the time --~--~-~--~~~---~--~~ 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: A tiny framework for working with POJO's in GAE
I don't see a link, but if your framework is open source, feel free to submit it to the App Engine open source projects listing by following the instructions at http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects . - Jason On Sun, Nov 1, 2009 at 12:35 AM, Lars Borup Jensen lbor...@gmail.comwrote: Hi GAE users. I've written (well it's still in-progress) a tiny framework to make it easier to work with GAE/J and plain POJO's but not hiding the many traps of GAE (a transaction can only span a single entity-group and so forth). I've posted one of my simple JUnit testcases on my blog if anyone want to take a look: http://lborupj.blogspot.com/ Regards, Lars Borup Jensen --~--~-~--~~~---~--~~ 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: DeadlineExceededException while executing a server method.
Hi Sanjith. All App Engine requests must return within 30 seconds or this exception will be thrown. If you have a larger task, you can divide it into several parts and execute these in separate tasks, but each task must also return in 30 seconds or less. - Jason On Sat, Oct 31, 2009 at 11:12 AM, Sanjith Chungath csanj...@gmail.comwrote: in another word, is there a way to execute a server action through a normal server call or by tasks which can run more than 30 seconds? -Sanjith On Sat, Oct 31, 2009 at 12:40 AM, Sanjith Chungath csanj...@gmail.comwrote: Hi all, While executing a server method which talks to another system and get details from there, I get a DeadlineExceededException at the appengine. I don't have much control on the time taken by the other system. I just call a method from an interface of that system and wait for the response. What is the best practice in these situations? Below are the exceptions that I got at server. 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.sanchu.clicks.client.GreetingService.greetServer(java.lang.String)' threw an unexpected exception: com.google.apphosting.api.DeadlineExceededException: This request (e737f449255620d0) started at 2009/10/29 18:30:43.480 UTC and was still executing at 2009/10/29 18:31:12.207 UTC. at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 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) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238) 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 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:814) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc(Server.java:769) at com.google.net.rpc.impl.Server.processRequest(Server.java:351) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:436) at
[appengine-java] Re: Problems with JDO Query.setCandidates(Collection)
App Engine's DataNucleus plugin doesn't support the setCandidates method for querying a select group of entities -- all queries currently target the full datastore. You're welcome to file a feature request in the datanucleus-appengine issue tracker, but this isn't likely to be prioritized in the very near future. I recommend finding another acceptable solution for now. Depending on the typical size of your result sets, you can sort in memory, for example. http://code.google.com/p/datanucleus-appengine/ - Jason On Fri, Oct 30, 2009 at 10:06 AM, Zach znconr...@gmail.com wrote: So I am trying to do 2 sequential queries in app-engine to get around the problem of only being able to primary sort on the property that an inequality is done on. The problem is that setCandidates(Collection) doesnt actually appear to set the candidates to query against. Pseudo- code below. Query ageQuery = persistenceManager.newQuery(PersistentObject.class); ageQuery.setFilter(age ageMax); ageQuery.declareParameters(Integer ageMax); QueryResult unsorted = ageQuery.execute(25); Query sortQuery = persistenceManager.newQuery(PersistentObject.class); sortQuery.setOrdering(dateCreated desc); sortQuery.setCandidates(unsorted); QueryResult sorted = sortQuery.execute(); Also, one can verify that setCandidates doesn't work with something like below Query query= persistenceManager.newQuery(PersistentObject.class); query.setCandidates(new ArrayList()); QueryResult sorted = qujery.execute(); because sorted.size()!=0. Has anyone else ran into this problem? Am i doing something wrong? Thanks in advance for the help. --~--~-~--~~~---~--~~ 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: What defines a single transaction in JDO?
Can you try moving your query into the first transaction and report if this makes a difference? - Jason On Fri, Oct 30, 2009 at 7:10 PM, RoryD rory1doug...@gmail.com wrote: I'm aware of the restriction on operating on multiple entity groups in a single transaction, but I thought the following code would work (but it doesnt): Transaction tx = null; try { tx = pm.currentTransaction(); ClassA existing = getExistingByQuery(pm); if(existing != null) { // 1st transaction tx.begin(); existing.setStuff(yo); tx.commit(); if(existing.isDingBat()) { // 2nd transaction tx.begin(); ClassB other = new ClassB(); other.setStuff(wow); pm.makePersistent(other); // (***) tx.commit(); } } } catch (Exception e) { if(tx != null tx.isActive()) { tx.rollback(); } } However, I get an exception at the line marked (***): java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction. How do I get another transaction then? Do i need to create a new PersistenceManager for the second part? In this simplified example, I could forego the second transaction entirely, but that might not always be the case, so what's the general solution? --~--~-~--~~~---~--~~ 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: implementing GAE XMPP service as an external component to an existing XMPP server (e.g. ejabberd or OpenFire)
App Engine uses standard XMPP federation to send messages to other XMPP servers. - Jason On Wed, Oct 28, 2009 at 11:38 PM, asianCoolz second.co...@gmail.com wrote: may i know what integration technique that you folks use to implement external component to an existing XMPP server (e.g. ejabberd or OpenFire) . Is it through sending xmpp message to another u...@externaldomain directly or using mechanism like urlfetch? --~--~-~--~~~---~--~~ 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: RESTful- 503 Error
Can you print the full stack trace? Which class is not found? - Jason On Thu, Oct 29, 2009 at 1:12 AM, Shreyas Goel fenzo...@gmail.com wrote: I am trying to prepare an app using Restlets for GAE, however even after following instructions mentioned at http://wiki.restlet.org/docs_1.2/13-restlet/275-restlet/252-restlet.html downloading all the relevant files doing changes as mentioned in http://wiki.restlet.org/developers/172-restlet/251-restlet/version/10.pdf. I am using Eclipse for the development i have followed all the steps mentioned at http://wiki.restlet.org/developers/179-restlet/216-restlet.html. Even then i am getting errors: javax.servlet.UnavailableException: java.lang.ClassNotFoundException: --~--~-~--~~~---~--~~ 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: AppEngine, Crowd SingleSignOn, XFireFault access denied exception
Hi Stavros. App Engine's production sandbox does not permit applications or any frameworks/libraries used to spawn new processes or threads: http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox I'm not familiar with XFireFault so I can't offer any specific tips, but some libraries enable you to disable threading, so you may want to pose this question in their support channels. - Jason On Thu, Oct 29, 2009 at 6:52 AM, skounis skou...@gmail.com wrote: Hi all i try to use crowd as user authentication mechanism for app engine java applications. I have setup a Crowd instance and modify default GWT project (created by eclipe) to send username and password to this instance. To do that i use java libraries provided from Atlassian for Crowd. Those libraries do nothing more to handle SOAP request to (and from) crowd instance. Under eclipse everything works fine. I can successfully authorize the user and get users principal from Crowd. When i publish this GWT application to appengine, soap request to crowd instance is blocked. The error message is Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: access denied (java.lang.RuntimePermission modifyThreadGroup) Is something extra i have to configure to make this work? Let me notice that under eclipse everything works like a harm. Any idea? thank you in advance Stavros --~--~-~--~~~---~--~~ 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 Refactoring / Adaptable Design
Hi Hans. Aside from the article on modeling entity relationships and the JDO documentation, there aren't a lot of resources on http://code.google.com on this subject, which is something we'll try to address going forward. You may be able to find blog posts from other developers on this, but it's a generally hard topic to write about in the abstract since needs vary so much from app to app. I'm happy to help with specific questions you might have. It sounds like you want to add a new kind (as opposed to a new property for an existing kind) and establish a relationship with this new kind (FundingOrganization) and an existing kind (Campaign). For many-to-many relationships such as this, one approach you can take is similar to what you might do for an RDBMS schema: introduce a new table (kind) to model the relationship between FundingOrganization and Campaign entities. This third kind would have only two properties, one storing a FundingOrganization Key and the other a Campaign Key, then you can use it to query for all FundingOrganization entities associated with a given Campaign and vice versa. This approach doesn't require you to modify your Campaign kind at all, so you don't necessarily need to make it aware of the FundingOrganization kind, which was one of your requirements. Let me know if this answers your question or if you have any other questions. - Jason On Thu, Oct 29, 2009 at 1:55 PM, Hans gcbo...@gmail.com wrote: Hoping someone might help me with a somewhat OT question. I developed an object model for a GAE/J application that worked fairly well for awhile (and it was fun watching how easy it was to persist the instances to the datastore). But now I need to extend the model. Each Campaign instance I use needs to be related (many-to-many) with new FundingOrganization instances. I'm suspecting there may be other similar extensions I'll need to make to the model after the fact (additional categories associated with the Campaign). I can think of approaches to refactoring the application that include changing the Campaign class to know about FundingOrganization (http:// code.google.com/appengine/docs/java/datastore/ relationships.html#Unowned_Relationships), but I'd prefer to keep the entities pretty simple without adding a property for each new category that comes up. Can someone point this rookie to intro material/URLs for building and refactoring designs that lend themselves to these type of changes? I'm looking for info on adaptable design, especially when you're using a datastore and not using a RDBMS, junction tables, etc. thanks, Hans --~--~-~--~~~---~--~~ 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: read file
You should be able to read it if you put it in your war directory and configure it as a resource file. I believe the second step is done automatically -- all files are configured as both resource and static by default, though you can override it by following the instructions at http://code.google.com/appengine/docs/java/config/appconfig.html#Static_Files_and_Resource_Files . You should be able to read resource files using the same APIs that you use to read files from disk in other Java application environments. - Jason On Thu, Oct 29, 2009 at 2:21 PM, Andreas Blomqvist blomqvist.andr...@gmail.com wrote: stupid question, but anyway I want to include a myData.csv file and read it from my app. Where do I put it ? and what is the path to the file when I read it in the code? 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: upload error
Are you still seeing this error? What's your application ID? - Jason On Thu, Oct 29, 2009 at 3:30 PM, Andreas Blomqvist blomqvist.andr...@gmail.com wrote: getting SEVERE: Version still not ready to serve, aborting. when I try and deploy. Did server rollbacks. What could be wrong? --~--~-~--~~~---~--~~ 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: images over http
Just to clarify: Your URL Fetch request for a given image on your server fails after 6 seconds even though you've configured the deadline to be the maximum 10 seconds, and you've tried serving the image from another App Engine servlet as well and saw the same issue. Is this right? Can you send me the image URL that you are trying to fetch? - Jason On Fri, Oct 30, 2009 at 2:11 AM, nicanor.babula nicanor.bab...@gmail.comwrote: First of all, thanks for your answer. I think further information is needed for you to understand my problem. The server which encounters this problem, practically takes as input some template pseudo-code, that contains references to images (like html img src=img url/), and generates some output based on that. In order to generate the output data, it has to download (via java.net.HTTPConnection) the images from the various urls and transform them. The problem is that already the first attempt to download an image times out under 10 secs, although I did setConnectTimeout(1). On Oct 29, 9:51 pm, Jason (Google) apija...@google.com wrote: Is the server on which your JPEG is hosted especially slow? The server where the JPEGs are hosted is not slow. In fact, as I mentioned above, I tried serving the images with an google app engine servlet, but the error still remains. I supposed than, that the issue is not on the server that serves the images. Note that the default timeout limit for URL Fetch requests is 5 seconds. You can increase this up to 10 by passing 1 (ms) into setConnectTimeout(). Already did that, but the browser's ends after 6 seconds. Also keep in mind that your image will have to be smaller than 1 MB if you're planning to use it with the Images service or store it in the datastore. As I already mentioned, that is not a problem, as I tried retrieving the images from an application engine servlet. Besides, I am very aware about the limits specified in the docs. - Jason On Wed, Oct 28, 2009 at 8:37 AM, nicanor.babula nicanor.bab...@gmail.comwrote: Hello everyone, I have somewhere on the net a servlet that serves jpeg images. In order to verify that it works I made a html page with: img src=http://myurl/servlet?id=123; / and the image is displayed well. Now, I am trying to create an GAE image object from the data arriving from that servlet. How can I do? So far I tried this code*[1], with a lot of variations, and I keep getting timeouts and The API call urlfetch.Fetch() took too long to respond and was cancelled. error message in my application's logs. Locally, in the development server, it works. I also tried storing this images in the datastore and serving them directly from GAE. Example of image url:http://almaoffice0.appspot.com/GetImage?id=24001 Any ideas? *[1]: the code: ImagesService imagesService = ImagesServiceFactory.getImagesService(); try { URL url = new URL(stringUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(GET); connection.setReadTimeout(0); connection.setRequestProperty(ContentType, image/ jpeg); connection.setDoInput(true); if(connection.getResponseCode() == HttpURLConnection.HTTP_OK){ InputStream in = connection.getInputStream(); byte[] imgData = new byte[in.available()]; in.read(imgData); Image oldImg = ImagesServiceFactory.makeImage (imgData); Transform resize = ImagesServiceFactory.makeResize (oldImg.getWidth(), oldImg.getHeight()); // I do an useless transformation, in order to force the conversion to jpeg return imagesService.applyTransform(resize, oldImg, ImagesService.OutputEncoding.JPEG); } else { throw new Exception(cannot retrieve image @ + stringUrl); } --~--~-~--~~~---~--~~ 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 deploying app - Version not ready
Hi Jed. There was some deployment latency late last week, but this didn't last very long, and everything should be up and running smoothly. Please let me know if you continue to see this error and make sure to provide your application ID in future posts. - Jason On Thu, Oct 29, 2009 at 4:04 PM, JedIrv jed...@gmail.com wrote: Hello, I'm in my first days of experimenting with Google App Engine and am getting an error when I try to deploy using the eclipse plugin. My initial deploy went smoothly a couple of days ago, and several updates as well, but trying to redeploy now, I see the console output indicate some sort of connection issue develops: . . . Deploying new version. Will check again in 1 seconds. Will check again in 2 seconds. ...(falls back to waiting twice as long until it gets to 128)... Will check again in 128 seconds. Rolling back the update. javaj.lang.RuntimeException: Version not ready. the stack trace in the log has this: Unable to update: java.lang.RuntimeException: Version not ready. at com.google.appengine.tools.admin.AppVersionUpload.commit (AppVersionUpload.java:361) at com.google.appengine.tools.admin.AppVersionUpload.doUpload (AppVersionUpload.java:114) at com.google.appengine.tools.admin.AppAdminImpl.update (AppAdminImpl.java:56) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy (AppEngineBridgeImpl.java:271) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace (DeployProjectJob.java:148) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) yet, my admin console log page indicates the update went ok (or at least no problem is indicated). Checking the url reveals the update did not succeed. Any help would be greatly appreciated! Jed --~--~-~--~~~---~--~~ 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: first Wave Robot
You may want to post this in the Wave developers discussion group as well: http://groups.google.com/group/google-wave-api - Jason On Thu, Oct 29, 2009 at 11:39 AM, VTR vtrraviku...@gmail.com wrote: Hi , I just downloaded the eclipse IDE and was trying the first Wave Robot. But seem to be getting the messages twice everytime this robot is added in a wave vtrraviku...@appspot.com: I'm alive!I'm alive! 12:55 am vtrraviku...@appspot.com: Good Evening, everybody!!Good Evening, everybody!! Did anyone else see similar behaviour --~--~-~--~~~---~--~~ 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: RPC SerializationException if detachable=true
It looks like returning the list of detachable objects attempts to send a list of generic Object instances over the wire. The Object class doesn't implement Serializable so GWT will trigger an exception. Try doing something like the following and see if the error goes away: ListMySerializableClass myList = (ListMySerializableClass) pm.detachCopyAll(results); return myList; Also note that you cannot return a List of query results directly since the List class used to store the results doesn't implement Serializable either. To get around this, you can create a new ArrayList or other Serializable List, copy all of your result objects into it, and return this new list instead. - Jason On Fri, Oct 30, 2009 at 6:52 AM, Patrizio Munzi patrizio.mu...@eris4.comwrote: Hi all, a strange thing happens when I try to serialize via RPC a list of PersitentCapable objects after having called detachCopyAll(). If the PersistentCapable objects have the property detachable=true the serialization throw the following exception. Instead if the property detachable=true isn't set everything works fine. Do you have any idea what's the problem??? Regards -- SEVERE: [1256913851734000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type '[Ljava.lang.Object;' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:636) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:648) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:666) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$VectorWriter$8.write(ServerSerializationStreamWriter.java:247) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeArray(ServerSerializationStreamWriter.java:613) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:661) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573) at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:441) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:529) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) [...] -- --~--~-~--~~~---~--~~ 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
[appengine-java] Re: JDO Best Practices
Hi Julio. Can you clarify what you mean by this statement: If i change the code to the mail handler class, it works. As Andy says, creating a new PersistenceManager isn't very expensive, so I wouldn't store an instance in a static variable or worry about sharing an instance with other classes -- just create one when you need it and close it as soon as you're done. You should, on the other hand, make sure to only load one PersistenceManagerFactory. I see you're using a static variable, but you can also use a singleton: http://code.google.com/appengine/docs/java/datastore/usingjdo.html#Getting_a_PersistenceManager_Instance Please make sure you're closing your PersistenceManager after every datastore operation -- I notice that you have commented out a few of your close() calls in a few places. For what it's worth, this is what a typical method in my own DAO looks like: public void storeEvent(Event event) { PersistenceManager pm = PMF.get().getPersistenceManager(); try { pm.makePersistence(event); } finally { pm.close(); } } - Jason On Fri, Oct 30, 2009 at 4:36 PM, Julio Faerman jfaer...@gmail.com wrote: Here is what the log reads: 22:29:41,776 DEBUG [DataNucleus.Persistence] - Making object persistent : br.com.ximp.vike.server.model.games.ww.ac...@d4ddfd 22:32:02,701 DEBUG [DataNucleus.Persistence] - ObjectManager internalFlush() process started - 1 dirty objects 22:32:02,701 DEBUG [DataNucleus.Persistence] - ObjectManager internalFlush() process finished 22:32:02,702 DEBUG [DataNucleus.Persistence] - Disconnecting br.com.ximp.vike.server.model.games.ww.ac...@d4ddfd from StateManager [pc=br.com.ximp.vike.server.model.games.ww.ac...@d4ddfd, lifecycle=P_NEW] 22:32:02,703 DEBUG [DataNucleus.Persistence] - Object Manager org.datanucleus.objectmanageri...@1d4c2ba closed But the object (ac...@d4ddfd) is not persisted on PM close. On Oct 30, 5:10 pm, datanucleus andy_jeffer...@yahoo.com wrote: - No error is logged As I already said, the log would tell you what happens. Sure you may have to set things to DEBUG level, but then you're supposed to be debugging so thats taken as read. As DN docs state very clearly non-tx updates will only be persisted to the datastore by a subsequent update, or pm close. All changes do get to the datastore when you close the PM --~--~-~--~~~---~--~~ 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: ClassCastException after changing PK from Long to String
Hi Peter. Do you have any existing entities in the datastore that were stored before you made this change? If so, the exception is likely being thrown when one of these entities is retrieved. Since you've changed the primary key field, you may have to remove the original entity and re-add it. You can inspect the data in your production datastore by signing in to the Admin Console: http://appengine.google.com. - Jason On Fri, Oct 30, 2009 at 12:14 PM, pgoetz pgo...@pgoetz.de wrote: Hello Group! I hope you can help me with a ClassCastException in my web application. I refactored my entity classes (JDO) to use a String primary key instead of a Long. In my local environment everything works fine. But when I deploy the application to appspot.com, I get this exception: javax.servlet.ServletException: java.lang.ClassCastException: cannot assign instance of java.lang.Long to field de.pgoetz.jannalinda.jdo.User.id of type java.lang.String in instance of de.pgoetz.jannalinda.jdo.User at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:240) 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 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable (RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest (JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest (JavaRuntime.java:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5135) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5133) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:814) at com.google.tracing.LocalTraceSpanRunnable.run (LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan (LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc(Server.java:769) at com.google.net.rpc.impl.Server.processRequest(Server.java:351) at com.google.net.rpc.impl.ServerConnection.messageReceived (ServerConnection.java:437) at com.google.net.rpc.impl.RpcConnection.parseMessages (RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived (RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 436) at com.google.net.async.EventDispatcher.processNetworkEvents (EventDispatcher.java:762) at com.google.net.async.EventDispatcher.internalLoop (EventDispatcher.java:207) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown (RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run (JavaRuntime.java:396) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: cannot assign instance of java.lang.Long to field de.pgoetz.jannalinda.jdo.User.id of type java.lang.String in instance of de.pgoetz.jannalinda.jdo.User at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(Unknown Source) at java.io.ObjectStreamClass.setObjFieldValues(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at java.util.HashMap.readObject(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeReadObject(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at
[appengine-java] Re: How to upload File from Client to Server
You might also be interested in this project, which handles the splitting and persistence for you transparently: http://code.google.com/p/gaevfs/ - Jason On Thu, Oct 29, 2009 at 8:23 PM, le anh leanhduc1...@gmail.com wrote: Hi, everybody . I'm creating a web site by Google Appengine. In my web ,users can upload some files ( images , video ... ) to server . I use java language ,means this site is JSP pages . How can I do ?? How to write Code for uploading File from Client to Server ?? Someone help me ?? --~--~-~--~~~---~--~~ 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: Downloading and Uploading All Data for JAVA application...
This isn't available for Java just yet, but you can use the Python bulk loader tool with your Java deployed apps. You may have to deploy remote_api to a new version of your application using the Python SDK, but all versions share the same datastore, so you can still download the original data stored by your Java code, and similarly, any new entities you add this way can be accessed using your Java code as well. - Jason On Fri, Oct 30, 2009 at 11:33 AM, Sanjith Chungath csanj...@gmail.comwrote: Hi All, I found a topic Downloading and Uploading All Data under Python--Tools in google-appengine-docs-20090921'. I have java sdk downloaded and installed. So i dont have the file bulkloader.py with me. - Is similar feature/ tool available for java? - I can download the python SDK and use it, but is it possible to use it in a Java application? -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] Re: Data Store Indexes
Yes, that is the correct doc for the Java indexes. Regarding your GQL query, the name of the kind is not the full name of the class (including the package) but the simple name. So try using MDsIri instead of com.col.server. MDsIri. You should be able to see any entities you saved in the data viewer and the valid kind names are provided in the drop down. - Jason On Fri, Oct 30, 2009 at 12:05 PM, Pion onlee2...@gmail.com wrote: I found this http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Defining_Indexes_With_Configuration with the following example: ?xml version=1.0 encoding=utf-8? datastore-indexes xmlns=http://appengine.google.com/ns/datastore-indexes/1.0; autoGenerate=true datastore-index kind=Person ancestor=false property name=lastName direction=asc / property name=height direction=desc / /datastore-index /datastore-indexes But I still cannot solve my query error. On Oct 30, 9:34 am, Pion onlee2...@gmail.com wrote: I just deployedmy app to the GAE for the first time. I went to the Admin Console - DataStore - Indexes which says, You have not created indexes for this application. Some types of queries require an index to be built. You can manage your indexes in an index.yaml file. Learn more abouthttp:// code.google.com/appengine/kb/general.html#indexes . http://code.google.com/appengine/kb/general.html#indexeslinks tohttp:// code.google.com/appengine/docs/python/datastore/queriesandinde It seems to be Python specific. What's the corresponding one on Java? It seems to be on war\WEB-INF \appengine-generated\datastore-indexes.xml. Please correct me if I am wrong. My datastore-indexes.xml is empty. ?xml version=1.0 encoding=utf-8? datastore-indexes autoGenerate=true /datastore-indexes Also, I didi the following: o Go to the Admin Console - DataStore - Data Viewer. It displays my low-level datastore contents. o Click the Query (using GQL). It displays SELECT * FROM com.col.server.MDsIri automatically by default. o Click Run Query button o It says, Invalid GQL query string. I suspect because I do not have any indexes yet. What are the syntax to populate datastore-indexes.xml so I can do the above query. Thanks in advance for your help. --~--~-~--~~~---~--~~ 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 Unowned Relationship Issue
Ah, my apologies. I overlooked that he was using public field instead of a getter. - Jason On Fri, Oct 30, 2009 at 11:07 AM, datanucleus andy_jeffer...@yahoo.comwrote: I'm not sure if method: employeeCheck.computerKeys.isEmpty()) launches lazy loading. It should, but adding the annotation won't hurt. I don't see how it should. He's accessing a field directly. This has no way of being intercepted by JDO hence cannot load the field contents (no @PersistenceAware is evident). Accessing via a getter, makes sense. --~--~-~--~~~---~--~~ 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: Error upon deploying to Google AppEngine through Eclipse plugin
parameter must be non-empty at java.security.cert.PKIXParameters.setTrustAnchors(Unknown Source) at java.security.cert.PKIXParameters.init(Unknown Source) at java.security.cert.PKIXBuilderParameters.init(Unknown Source) ... 30 more com.google.appengine.tools.admin.AdminException: Unable to update app: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at com.google.appengine.tools.admin.AppAdminImpl.update (AppAdminImpl.java:62) at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute (AppCfg.java:521) at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:130) at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:58) at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:54) Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect (Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream (Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream (Unknown Source) at com.google.appengine.tools.admin.ServerConnection.connect (ServerConnection.java:333) at com.google.appengine.tools.admin.ServerConnection.getAuthToken (ServerConnection.java:250) at com.google.appengine.tools.admin.ServerConnection.authenticate (ServerConnection.java:218) at com.google.appengine.tools.admin.ServerConnection.send (ServerConnection.java:145) at com.google.appengine.tools.admin.ServerConnection.post (ServerConnection.java:81) at com.google.appengine.tools.admin.AppVersionUpload.send (AppVersionUpload.java:427) at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction (AppVersionUpload.java:241) at com.google.appengine.tools.admin.AppVersionUpload.doUpload (AppVersionUpload.java:98) at com.google.appengine.tools.admin.AppAdminImpl.update (AppAdminImpl.java:56) ... 4 more Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.validator.PKIXValidator.init(Unknown Source) at sun.security.validator.Validator.getInstance(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator (Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted (Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted (Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate (Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage (Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake (Unknown Source) ... 19 more Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at java.security.cert.PKIXParameters.setTrustAnchors(Unknown Source) at java.security.cert.PKIXParameters.init(Unknown Source) at java.security.cert.PKIXBuilderParameters.init(Unknown Source) ... 30 more On Oct 19, 7:05 pm, Jason (Google) apija...@google.com wrote: Can you confirm whether you see a similar error when you try to deploy using the command line utility? http://code.google.com/appengine/docs/java/tools/uploadinganapp.html#... - Jason On Thu, Oct 15, 2009 at 5:01 PM, bizkut mcgroga...@gmail.com wrote: Hey, I just got my Wave account, and am working on making some test Robots, so I went ahead and followed all the instructions, and have a test Robot made. I go to deploy through the panel button, enter my login information, and about halfway through, I come across this in the error logs: Unable to update: javax.net.ssl.SSLException
[appengine-java] Re: Not sure I'm using Memcache properly
Yes. - Jason On Thu, Oct 29, 2009 at 1:46 AM, leszek leszek.ptokar...@gmail.com wrote: You mean Google App Engine/J implementation of this ? http://code.google.com/intl/pl/appengine/docs/python/urlfetch/asynchronousrequests.html --~--~-~--~~~---~--~~ 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 Unowned Relationship Issue
It should, but adding the annotation won't hurt. - Jason On Thu, Oct 29, 2009 at 3:27 AM, leszek leszek.ptokar...@gmail.com wrote: You have now: employee.addComputer(computer); pm.close(); Replace with: employee.addComputer(computer); pm.makePersistent(employee); pm.close(); You update entity but don't persist it again. Also replace: @Persistent public SetLong computerKeys = new HashSetLong(); with: @Persistent(defaultFetchGroup = true) public SetLong computerKeys = new HashSetLong(); I'm not sure if method: employeeCheck.computerKeys.isEmpty()) launches lazy loading. --~--~-~--~~~---~--~~ 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: Persist HashMap with sdk1.2.2 ?
Can you post the code that you're using to re-persist the updated HashMap? - Jason On Thu, Oct 29, 2009 at 6:07 AM, barak barak.ya...@gmail.com wrote: Thanks, did that and the map is indeed serialized now. But now, the enitity is fetched, seems like the state is not always kept. For example, I would like to store some attribute from an HttpSession using the UserStats instance. Every time a user in a session press some button, a instance is fetched (using the session id as an identifier) and update a counter in the HashMap. The problem I faced is even that the object is found by the JDO, the counter updated and the object persisted again, next fetch does not return the instance with the updated counter. Can you help please debugging this? This is the data object: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class UserStats { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String id; @Persistent private Longtime; @Persistent( serialized =true ) private HashMapString, Integerqueries; public UserStats( String id, Long time ) { this.id = id; this.time = time; queries = new HashMapString, Integer(); } public Key getKey() { return key; } public String getId() { return id; } public void setId( String id ) { this.id = id; } public Long getTime() { return time; } public void setTime( Long time ) { this.time = time; } public HashMapString, Integer getQueries() { return queries; } public void setQueries( HashMapString, Integer queries ) { this.queries = queries; } } On Oct 29, 10:38 am, Patrizio Munzi patrizio.mu...@eris4.com wrote: HashMap isn't supported as a persistable type. The only way you've got to persist it is serialize it: http://gae-java-persistence.blogspot.com/2009/10/serialized-fields.html 1KViewDownload --~--~-~--~~~---~--~~ 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: ResponseTooLargeException (url fetch) can't be caught ???
Yes, this looks like a bug. Please file it in the issue tracker: http://code.google.com/p/googleappengine/issues/list In the meantime, you should be able to work around it like this: try { } catch (Exception e) { if (e.getClass().getName().equals(ResponseTooLargeException.class.getName())) { // ... } } - Jason On Thu, Oct 29, 2009 at 9:47 AM, Prashant antsh...@gmail.com wrote: Hi, i am fetching a set of urls using task queues, my whole url fetch code is between try-catch block but *com.google.appengine.api.urlfetch.ResponseTooLargeException *error is not getting caught by catch block, task fails every time logging this error in log. anyone facing similar error?? --~--~-~--~~~---~--~~ 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 David. This may be coming to Java eventually, but it hasn't been started yet. If you or anyone else is interested in contributing, let me know. - Jason On Wed, Oct 28, 2009 at 7:52 AM, David Chandler turboman...@gmail.comwrote: Re: http://code.google.com/appengine/articles/deferred.html Will this be coming to AppEngine for Java? David Chandler http://turbomanage.wordpress.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] Re: GAE with external openfire jabber server?
Are you trying to run Openfire on App Engine? - Jason On Wed, Oct 28, 2009 at 8:00 AM, asianCoolz second.co...@gmail.com wrote: how to use java GAE with external jabber server like openfire? any guide? --~--~-~--~~~---~--~~ 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: Simulating MapReduce with task queues
Hi James. I don't have any specific information for you, but if you don't get any other responses, you may build a small test system to see how it performs, and I'm interested in hearing your results. In the meantime, all relevant task queue limits are linked to below: http://code.google.com/appengine/docs/java/taskqueue/overview.html#Quotas_and_Limits Of interest, you can have up to 10 active queues (plus the default queue) with a total task invocation rate of 10 tasks per second across all queues. - Jason On Wed, Oct 28, 2009 at 8:36 AM, James Cooper jamespcoo...@gmail.comwrote: Hi there, I asked a similar question a couple of days ago, but I'll try different wording and see if it generates any interest. Has anyone successfully simulated MapReduce using task queues? If so, how much parallelism have you achieved in the GAE production environment? Are there tricks to convince GAE to increase parallelism for your app? I know Google has MapReduce on the roadmap, but it sounds like it's behind full text search on the schedule, so it may be a while before we see anything real. We may need to come up with an interim solution. I'm looking at solving a OLAP problem in GAE, and MapReduce seems to be the way to do that given the Datastore architecture. thoughts? -- James --~--~-~--~~~---~--~~ 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: images over http
Is the server on which your JPEG is hosted especially slow? Note that the default timeout limit for URL Fetch requests is 5 seconds. You can increase this up to 10 by passing 1 (ms) into setConnectTimeout(). Also keep in mind that your image will have to be smaller than 1 MB if you're planning to use it with the Images service or store it in the datastore. - Jason On Wed, Oct 28, 2009 at 8:37 AM, nicanor.babula nicanor.bab...@gmail.comwrote: Hello everyone, I have somewhere on the net a servlet that serves jpeg images. In order to verify that it works I made a html page with: img src=http://myurl/servlet?id=123; / and the image is displayed well. Now, I am trying to create an GAE image object from the data arriving from that servlet. How can I do? So far I tried this code*[1], with a lot of variations, and I keep getting timeouts and The API call urlfetch.Fetch() took too long to respond and was cancelled. error message in my application's logs. Locally, in the development server, it works. I also tried storing this images in the datastore and serving them directly from GAE. Example of image url: http://almaoffice0.appspot.com/GetImage?id=24001 Any ideas? *[1]: the code: ImagesService imagesService = ImagesServiceFactory.getImagesService(); try { URL url = new URL(stringUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(GET); connection.setReadTimeout(0); connection.setRequestProperty(ContentType, image/ jpeg); connection.setDoInput(true); if(connection.getResponseCode() == HttpURLConnection.HTTP_OK){ InputStream in = connection.getInputStream(); byte[] imgData = new byte[in.available()]; in.read(imgData); Image oldImg = ImagesServiceFactory.makeImage (imgData); Transform resize = ImagesServiceFactory.makeResize (oldImg.getWidth(), oldImg.getHeight()); // I do an useless transformation, in order to force the conversion to jpeg return imagesService.applyTransform(resize, oldImg, ImagesService.OutputEncoding.JPEG); } else { throw new Exception(cannot retrieve image @ + stringUrl); } --~--~-~--~~~---~--~~ 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: task queue limit 30 sec?
We'll get these reflected in the documentation very soon. - Jason On Wed, Oct 28, 2009 at 12:49 PM, Toby Reyelts to...@google.com wrote: The limits on tasks queues recently changedhttp://googleappengine.blogspot.com/2009/10/task-queue-quota-increases.html. For example, the new total limit is 100K tasks/day for free apps and 1M default for billing enabled. On Wed, Oct 28, 2009 at 2:38 PM, Jason (Google) apija...@google.comwrote: All task queue quotas and limits are listed at http://code.google.com/appengine/docs/java/taskqueue/overview.html#Quotas_and_Limits. Note that you can currently insert up to 10,000 tasks per day, although billed applications may have a higher upper limit. - Jason On Tue, Oct 27, 2009 at 12:21 PM, James Cooper jamespcoo...@gmail.comwrote: Related question: Is there a limit to the number of pending tasks in a queue? Can you have a million items in there? thanks -- James On Oct 27, 12:07 pm, Jason (Google) apija...@google.com wrote: No, all individual tasks must complete in 30 seconds or less. For larger jobs, such as processing millions of entities, the recommended approach is to split these jobs and run them as multiple tasks. At the end of the current task, you can determine if more work needs to be accomplished and dynamically add new tasks to the queue until the job is completely finished. - Jason On Sun, Oct 25, 2009 at 1:59 PM, sproz stephane.spra...@gmail.com wrote: Is the limit duration of a task in a queue superior to 30 seconds? I receive a DeadlineExceededException all the time --~--~-~--~~~---~--~~ 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 multi-dimensional array support
You can use something like this: @Persistent(serialized = true) private Integer[][][] myArray; You won't be able to query on it, but it does work. - Jason On Wed, Oct 28, 2009 at 12:37 PM, king kingalpha...@gmail.com wrote: Hi there, does GAE JDO support something like: @Persistent private int [][][] 3d_grid; --~--~-~--~~~---~--~~ 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: Simulating MapReduce with task queues
Never mind, looks like you already did. :) - Jason On Thu, Oct 29, 2009 at 1:42 PM, Jason (Google) apija...@google.com wrote: Hi James. I don't have any specific information for you, but if you don't get any other responses, you may build a small test system to see how it performs, and I'm interested in hearing your results. In the meantime, all relevant task queue limits are linked to below: http://code.google.com/appengine/docs/java/taskqueue/overview.html#Quotas_and_Limits Of interest, you can have up to 10 active queues (plus the default queue) with a total task invocation rate of 10 tasks per second across all queues. - Jason On Wed, Oct 28, 2009 at 8:36 AM, James Cooper jamespcoo...@gmail.comwrote: Hi there, I asked a similar question a couple of days ago, but I'll try different wording and see if it generates any interest. Has anyone successfully simulated MapReduce using task queues? If so, how much parallelism have you achieved in the GAE production environment? Are there tricks to convince GAE to increase parallelism for your app? I know Google has MapReduce on the roadmap, but it sounds like it's behind full text search on the schedule, so it may be a while before we see anything real. We may need to come up with an interim solution. I'm looking at solving a OLAP problem in GAE, and MapReduce seems to be the way to do that given the Datastore architecture. thoughts? -- James --~--~-~--~~~---~--~~ 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: task queue limit 30 sec?
All task queue quotas and limits are listed at http://code.google.com/appengine/docs/java/taskqueue/overview.html#Quotas_and_Limits. Note that you can currently insert up to 10,000 tasks per day, although billed applications may have a higher upper limit. - Jason On Tue, Oct 27, 2009 at 12:21 PM, James Cooper jamespcoo...@gmail.comwrote: Related question: Is there a limit to the number of pending tasks in a queue? Can you have a million items in there? thanks -- James On Oct 27, 12:07 pm, Jason (Google) apija...@google.com wrote: No, all individual tasks must complete in 30 seconds or less. For larger jobs, such as processing millions of entities, the recommended approach is to split these jobs and run them as multiple tasks. At the end of the current task, you can determine if more work needs to be accomplished and dynamically add new tasks to the queue until the job is completely finished. - Jason On Sun, Oct 25, 2009 at 1:59 PM, sproz stephane.spra...@gmail.com wrote: Is the limit duration of a task in a queue superior to 30 seconds? I receive a DeadlineExceededException all the time --~--~-~--~~~---~--~~ 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: using contains(Key) in JDO query
This approach may present other problems; for one thing, App Engine's index generation is not dynamic, so you will have to manually build index entries (or let the development server generate them for you during testing) for each combination of potential query inputs. Once the indexes are built, you will have to do more work at query time since having a boolean for each combination of inputs isn't realistic. In general, App Engine works best with well-defined queries though depending on the number of inputs and possible combinations, it's likely that you could get something working with App Engine. OR isn't supported due to the way Bigtable, which App Engine's datastore is built on top of, works, and this isn't going to change soon. For more low-level details, check out the video from this I/O session: https://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore - Jason On Tue, Oct 27, 2009 at 3:50 PM, king kingalpha...@gmail.com wrote: Jason, thanks for the feedback. The issue with this boolean approach is that the queries are all dynamically generated, depending on the options selected in the search configurator. So there is no way to know at record write time what flags to set unless I work out thousands of possible boolean flags in advance (full permutation of all the ever expanding filter values available, such as in the schoolPreference ArrayList, we keep adding new schools, which can be an infinite set). Any other workaround is greatly welcome. Is the OR query operator on the roadmap for GAE? If so, what time frame would that be? On Oct 27, 2:41 pm, Jason (Google) apija...@google.com wrote: While App Engine's datastore does limit which queries you're able to execute, there are various workarounds, which, while not ideal from a development point of view, do ensure that query execution time is minimized so your app can achieve the best possible scalability. One common pattern is determining whether an entity meets the conditions of a certain query at write time, then setting a boolean flag on that entity. When you need to run the query, instead of managing multiple sub-queries and merging, you only need to filter on this boolean field. When new queries are added, you can run a task to re-process all existing entities and set their flags accordingly. This is quite different from executing your query on runtime, but should be much more efficient. - Jason On Mon, Oct 26, 2009 at 10:22 AM, king kingalpha...@gmail.com wrote: Hi there, can anyone from Google shines some light on the issue I posted last week? I just need to find out if it is a major limitation on google's part with no workaround so that I can move forward accordingly. Thanks a lot. On Oct 23, 11:01 am, king kingalpha...@gmail.com wrote: Thanks so much for the feedback. I actually tried to extend the Key CONTAINS concept to other fields but ran into a big wall right away. It would be great to get your 2 cents. Here is the root of my problem: I have a student object, it has a number of qualifying attributes, for example: int gpa: 1 = 0 to 2.0, 2 = 2.0 to 3.0, 3 = 3.0 to 4.0 int ageGroup: 1 = 0 to 17, 2 = 18 to 30, 3 = 30 to 65, 4 = 65+ ArrayList schoolPreference: [0] = 'MIT', [1] = 'Stanford', [2] = 'Harvard', [3] = 'Yale' Now, I need to create a query to find out all the students where (gpa = 2 or gpa = 3) AND (age group = 3 or age group = 4) AND (schoolPreference contains MIT or Yale, or both) As far as I know, GAE doesn't support OR operator in a query, so the only way I can get the query above to work is to have multiple sub- queries and do a manual join on all the datastore resultsets to artificially create a union. If so, big problem arises: Since I have so many OR sub-conditions, if every OR translates into a separate sub-query, literally speaking, I need to do a full permutation of all the conditions (full product of all the OR and AND conditions) in all my sub-queries to achieve my goal, which doesn't make any sense if I keep adding more value types (such as more schools being selected in the student preference criteria) into my attributes, not to mention adding more attributes to my student object. Is there any way to accomplish this query in GAE? Your help is greatly appreciated because this can be the deal breaker of whether my whole project can migrate to GAE or not. Thanks a lot in advance. On Oct 23, 1:51 am, Yasuo Higa higaya...@gmail.com wrote: Hi Andy, query.setFilter(key == :keyList); ListMaster list = (ListMaster) query.execute(keyList); I'd like to know if that works with GAE/J, because it is illegal JDOQL syntax and would be a bug. JDOQL is supposed to follow Java syntax, and you simply cannot do Key == ListKey and get success
[appengine-java] Re: Get jdoGetManagedFieldCount() exception when trying to init a persistent class
Up until recently, using abstract classes and persistent subclasses usually failed to work, but the latest preview release for the JDO/JPA layer includes support for inheritance. More information here: http://groups.google.com/group/google-appengine-java/browse_thread/thread/c4208f960d05d11a - Jason On Tue, Oct 27, 2009 at 11:16 AM, RSN romeo.sanc...@gmail.com wrote: Hi, I am new to AppEngine, and I am getting an exception when I try to initialize a persistent class. First, I have two questions: 1) Can we use abstract classes for persistent objects? My code looks very simple: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class StudentImpl extends StudentAbstract implements Student { @Persistent private String name; public StudentImpl(Key studentKey, String name){ super(studentKey); this.name = name; } .etc, etc } Notice that the primary Key is held in the abstract super class. Is this ok? @PersistenceCapable(identityType = IdentityType.APPLICATION) public abstract class StudentAbstract{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key objectKey; public StudentAbstract(Key objectId){ this.objectKey = objectId; } ..etc, etc } Is this design feasible? 2) If my declarations are correct, then Why do I get the following exception when I try to create an object. Caused by: java.lang.NoSuchMethodError: edu.isi.tie21.star.server.db.objects.STARDBObjectAbstract.jdoGetManagedFieldCount ()I at edu.isi.tie21.star.server.db.objects.StudentImpl.__jdoGetInheritedFieldCount (StudentImpl.java) at edu.isi.tie21.star.server.db.objects.StudentImpl.clinit (StudentImpl.java) at edu.isi.tie21.star.server.StudentServiceImpl.addStudent (StudentServiceImpl.java:150) The code that generates the error is: pm.makePersistent( new StudentImpl( KeyFactory.createKey( StudentImpl.class.getSimpleName(), s.getName()), s.getName())); I have searched the web, and it seems the error is related to the way the VM initializes objects with super classes (in my case I have an abstract class). The problem is that the VM is trying to access the abstract class with the jdoGetManagedFieldCount() method before it is created. is this really the problem? Is there a way around it? Thanks a lot, I appreciate any help on this issue. RSN --~--~-~--~~~---~--~~ 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: Grails/Java poor performance
Hi JT. We have seen that Grails-based applications can take up to 30 seconds to spin up on App Engine. We have back-end enhancements coming in the next few releases that should improve this considerably, but Grails itself is partly responsible for the long initialization time, which our back-end enhancements can't improve. - Jason On Mon, Oct 26, 2009 at 3:15 PM, Johnnie Walker tregon...@gmail.com wrote: Hi, I just deployed a very simple app onto App Engine using Grails (tregoning-app.appspot.com)... the problem is that it take 30 seconds for a very basic page to respond, is this normal behavior of a Grails apps running on GAE or are there some temporary issues going on at the moment (I couldn't see anything on Google App Engine Downtime Notify) Eventually I noticed that all Grails apps on GAE take roughly 30 seconds to load, even the sample/reference Pet Clinic app (http:// petclinic-grails.appspot.com/) 30 seconds is millenia in Internet time. Thanks JT. --~--~-~--~~~---~--~~ 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: Time zones implementation is broken in Java AppEngine
At the very least, the local and production environments should have identical behavior, and I agree that App Engine should not be returning GMT for well-established time zones. Please file a new issue in the tracker: http://code.google.com/p/googleappengine/issues/list - Jason On Sat, Oct 24, 2009 at 10:14 AM, Alexander Kolesnikov otry.it...@gmail.com wrote: I have just found that, while everything works fine locally, the real AppEngine returns GMT for most time zones. I wonder if this is going to be fixed. Below see the local output and then the one I am having after uploading the app. Thanks, Alex LOCAL: Asia/Aden3false0Arabia Standard Time Asia/Almaty6false0Alma-Ata Time Asia/Amman3true1Eastern European Time Asia/Anadyr12false1Anadyr Time Asia/Aqtau5false0Aqtau Time Asia/Aqtobe5false0Aqtobe Time Asia/Ashgabat5false0Turkmenistan Time Asia/Ashkhabad5false0Turkmenistan Time Asia/Baghdad3false0Arabia Standard Time Asia/Bahrain3false0Arabia Standard Time Asia/Baku5true1Azerbaijan Time Asia/Bangkok7false0Indochina Time ONLINE: Asia/Aden3false0Arabia Standard Time Asia/Almaty0false0Greenwich Mean Time Asia/Amman0false0Greenwich Mean Time Asia/Anadyr0false0Greenwich Mean Time Asia/Aqtau0false0Greenwich Mean Time Asia/Aqtobe0false0Greenwich Mean Time Asia/Ashgabat0false0Greenwich Mean Time Asia/Ashkhabad0false0Greenwich Mean Time Asia/Baghdad0false0Greenwich Mean Time Asia/Bahrain0false0Greenwich Mean Time Asia/Baku5true1Azerbaijan Time Asia/Bangkok0false0Greenwich Mean Time --~--~-~--~~~---~--~~ 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: Runtime Exceptions
See the Exception Summary at the bottom of the low-level API reference: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html We'll be coming out with an article soon which discusses this in more detail and includes examples of how to catch and handle such exceptions. - Jason On Fri, Oct 23, 2009 at 9:46 PM, Roy roy.smith@googlemail.com wrote: I read a lot about failures and timeouts from the datastore, but I can't find any documentation and of course the development environment doesn't simulate them. Has anybody compiled a list of the various error states and exceptions that we need to code for? --~--~-~--~~~---~--~~ 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: where I should put the Task Queue code?
You can use the Task Queue API from any servlet/handler. So define a new servlet, to be triggered by either an incoming request or a scheduled task, that then retrieves the default queue and adds new tasks to the queue. For example, if you have a servlet that gets triggered when a user submits a registration form, you can add code to that servlet to push a new task to the queue which, when executed, sends the user a confirmation email, etc. - Jason On Sun, Oct 25, 2009 at 4:11 PM, Vincent zhou.vi...@gmail.com wrote: It should be a stupid question but I really don't know how to do it ; ( My understanding is: just like the Scheduled Tasks With Cron. there is a separated fix- named xml file to define the target url and schedules. once you upload, the google app engine can automatically find it and run it. but how is the Task Queue? the queue.xml is is only a part of the answer. we need use the taskqueue to define the target the url and related parameters. just like below codes: === import com.google.appengine.api.labs.taskqueue.Queue; import com.google.appengine.api.labs.taskqueue.QueueFactory; import static com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.*; // ... Queue queue = QueueFactory.getDefaultQueue(); queue.add(url(/worker).param(key, key)) = but where to put these code? I guess it should be another separated .java file. but what's name and what's the structure of this file? it's much appreciated if somebody can share a full example of the task queue files. --~--~-~--~~~---~--~~ 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: Slowing down local datastore
At present, no, although this is something that should be possible once the SDK for Java is open source. - Jason On Sun, Oct 25, 2009 at 9:15 AM, WSouza willmso...@gmail.com wrote: Hello, Is it possible to slow down the local datastore? So it matches more the performance of the appengine? It would be awesome to add a short delay on each call to the datastore, so the local debugging/profiling feels more like the production environment. --~--~-~--~~~---~--~~ 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: Request Timeout quota and respons page
Hi Alexander. You should be able to catch a com.google.apphosting.DeadlineExceededException which is thrown when a request takes too long to process, and you should be able to do the small amount of processing necessary to display a custom error page. - Jason On Sun, Oct 25, 2009 at 6:14 AM, dominity domin...@gmail.com wrote: Hi, all. I know that each request to free web application that is deployed at App Engine server has quota for request execution time. Each time request executes more than 30 seconds, server responds with standard error page. Can I cusomize this page to show user cause of problem? Or should I handle execution time by myself and interrupt operation when 30 seconds limit is reached to make respons with web page that contains usefull information? Best regards, Alexander. --~--~-~--~~~---~--~~ 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: Retrieving the number of entities into the DS
You can also use the new datastore statistics API, which is probably faster although I haven't timed this myself: http://code.google.com/appengine/docs/java/datastore/stats.html - Jason On Mon, Oct 26, 2009 at 6:42 AM, Patrizio Munzi patrizio.mu...@eris4.comwrote: Hi all, what's the best way to know the number of entities of a specific kind saved into the DS? Of course I'd like to know the optimized way, without retrieving all the objects. 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: Apple Guice: A demo of App Engine, GWT, MVP, Guice, GIN
Hi Stuart. Follow the instructions at the end of the following page to list your project on the open source projects wiki page: http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects - Jason On Mon, Oct 26, 2009 at 9:22 AM, Stuart Moffatt stuartmoff...@gmail.comwrote: All, Apple Guice is a demo App Engine application using GWT with MVP (via gwt-dispath and gwt-presener), dependency injection (GIN on the client, Guice on the server), and a sharded counter to track the number of visitors. Demo is available at: http://appleguice.latest.emcode-dev.appspot.com/ Source is available at: http://appleguice.googlecode.com/ Stuart P.S. Pardon my cross-posting on: gwt, appengine for java, gwt-dispatch and gwt-presenter --~--~-~--~~~---~--~~ 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: using contains(Key) in JDO query
While App Engine's datastore does limit which queries you're able to execute, there are various workarounds, which, while not ideal from a development point of view, do ensure that query execution time is minimized so your app can achieve the best possible scalability. One common pattern is determining whether an entity meets the conditions of a certain query at write time, then setting a boolean flag on that entity. When you need to run the query, instead of managing multiple sub-queries and merging, you only need to filter on this boolean field. When new queries are added, you can run a task to re-process all existing entities and set their flags accordingly. This is quite different from executing your query on runtime, but should be much more efficient. - Jason On Mon, Oct 26, 2009 at 10:22 AM, king kingalpha...@gmail.com wrote: Hi there, can anyone from Google shines some light on the issue I posted last week? I just need to find out if it is a major limitation on google's part with no workaround so that I can move forward accordingly. Thanks a lot. On Oct 23, 11:01 am, king kingalpha...@gmail.com wrote: Thanks so much for the feedback. I actually tried to extend the Key CONTAINS concept to other fields but ran into a big wall right away. It would be great to get your 2 cents. Here is the root of my problem: I have a student object, it has a number of qualifying attributes, for example: int gpa: 1 = 0 to 2.0, 2 = 2.0 to 3.0, 3 = 3.0 to 4.0 int ageGroup: 1 = 0 to 17, 2 = 18 to 30, 3 = 30 to 65, 4 = 65+ ArrayList schoolPreference: [0] = 'MIT', [1] = 'Stanford', [2] = 'Harvard', [3] = 'Yale' Now, I need to create a query to find out all the students where (gpa = 2 or gpa = 3) AND (age group = 3 or age group = 4) AND (schoolPreference contains MIT or Yale, or both) As far as I know, GAE doesn't support OR operator in a query, so the only way I can get the query above to work is to have multiple sub- queries and do a manual join on all the datastore resultsets to artificially create a union. If so, big problem arises: Since I have so many OR sub-conditions, if every OR translates into a separate sub-query, literally speaking, I need to do a full permutation of all the conditions (full product of all the OR and AND conditions) in all my sub-queries to achieve my goal, which doesn't make any sense if I keep adding more value types (such as more schools being selected in the student preference criteria) into my attributes, not to mention adding more attributes to my student object. Is there any way to accomplish this query in GAE? Your help is greatly appreciated because this can be the deal breaker of whether my whole project can migrate to GAE or not. Thanks a lot in advance. On Oct 23, 1:51 am, Yasuo Higa higaya...@gmail.com wrote: Hi Andy, query.setFilter(key == :keyList); ListMaster list = (ListMaster) query.execute(keyList); I'd like to know if that works with GAE/J, because it is illegal JDOQL syntax and would be a bug. JDOQL is supposed to follow Java syntax, and you simply cannot do Key == ListKey and get success in Java. You are right, but unfortunately the above query works on GAE/J. I should have recommended the following query: ListKey keys = ...; ListObject ids = new ArrayListObject(); for (Key key : keys) { ids.add(pm.newObjectIdInstance(Master.class, key));} ListMaster list = (ListMaster) pm.getObjectsById(ids); Thanks, Yasuo Higa --~--~-~--~~~---~--~~ 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: Please correct entry for Vaadin
Corrected. - Jason On Mon, Oct 26, 2009 at 9:36 PM, Joonas lehti...@gmail.com wrote: Vaadin 6.1 currently has full Google App Engine compatibility --~--~-~--~~~---~--~~ 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: Custom subdomain map with app engine
Hi Marius. App Engine does not currently support naked domains. http://code.google.com/p/googleappengine/issues/detail?id=777 In the meantime, you can set up a script to redirect all myid.com requests to www.myid.com. - Jason On Fri, Oct 23, 2009 at 4:36 AM, marius marius.munte...@gmail.com wrote: Hi, I have a domain myid.com mapped to google apps and I managed to configure my Java appengine to be served from www.myid.com. I would also like to serve the same Java appengine from myid.com. How can this be accomplished? Is there a DNS record which would alias myid.com to www.myid.com? I would more than pleased to be able to configure a 301redirect from myid.com to www.myid.com but I am not sure how can I do this with myid.com being mapped to google apps. Please advise, Marius On Oct 14, 10:16 pm, Jason (Google) apija...@google.com wrote: Please try not to double post in the future: http://groups.google.com/group/google-appengine-java/browse_thread/th... Thanks, - Jason On Mon, Oct 12, 2009 at 10:33 AM, Haroon Idrees haroo...@gmail.com wrote: I want to map google app application on subdomain but gets error I create cname on domain site which details is below site.haroonidrees.com IN CNAME ghs.google.com 3600s (1h) and Server error is Sorry, you've reached a login page for a domain that isn't using Google Apps. Please check the web address and try again. I search in group and found have to register my sub-domain in below link http://www.google.com/a/cpanel/domain/new I register it ,but the process of verification found tricky, It need to add CName in domain sever with alias googled75ead2b4ef9e1d9 to poiting to google.com because of sub-domain I can add this is parent domian manager (May be wrong) and also add CNAME for desire sub domain which details available below DNS server handling your query: localhost DNS server's address: 127.0.0.1#53 Non-authoritative answer: site.haroonidrees.com canonical name = ghs.google.com. ghs.google.com canonical name = ghs.l.google.com. Name: ghs.l.google.com Address: 74.125.47.121 then try to add domain ,found that above error get fix but still my sub-domain is not working kindly guide me what I do Please help ,May be I am missing some thing please points out if I miss any thing Regards -- Regards Haroon Idrees Software Team Lead IBL Group cell:0321-2066747 msn:haroon.idr...@hotmail.com msn%3aharoon.idr...@hotmail.com msn%3aharoon.idr...@hotmail.com msn%253aharoon.idr...@hotmail.com http://www.linkedin.com/in/haroonob --~--~-~--~~~---~--~~ 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: Datastore retrieve error
Can you post the code you're using to persist the SyncConfiguration and Account objects? - Jason On Fri, Oct 23, 2009 at 8:09 AM, Gerd Saurer gerd.sau...@gmail.com wrote: I have a object mapped to the Datastore that looks like: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class SyncConfiguration { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private Account account1; @Persistent private Account account2; .. } @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Account { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String email; . } if i am now loading the object back from the store with final SyncConfiguration syncConfig = pm.getObjectById (SyncConfiguration.class, action.getSyncConfigId()); the fields account1 and account2 have the same instance. Do i have to configure something in a different way or is it a bug? --~--~-~--~~~---~--~~ 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: UserService.isUserAdmin() returns false for domain administrator of certain domains
isUserAdmin returns true only if the current signed-in user is an administrator of the application, not the domain. If you need to programmatically determine Google Apps domain administrators, see the Google Apps APIs: http://code.google.com/apis/apps/ - Jason On Fri, Oct 23, 2009 at 8:52 AM, dflorey daniel.flo...@gmail.com wrote: On some domains the UserService.isUserAdmin() is returning false for domain administrators. Which group/issue tracker is the right one to post this issue? --~--~-~--~~~---~--~~ 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: SDK does not upload files that start with .
Hi Vince. It may very well be intentional, but feel free to open a new bug report -- it will be closed if it's confirmed to be working as intended. http://code.google.com/p/googleappengine/issues/list - Jason On Fri, Oct 23, 2009 at 11:12 AM, Vince Bonfanti vbonfa...@gmail.comwrote: The SDK (1.2.5) does not upload file with names that start with . such as .h2.server.properties. I assume this is because such files are considered hidden on Linux/UNIX; but, I'm running on Windows, so this must be something in the SDK itself and not caused by the file system. Is this intentional, or should I open a bug report? Vince --~--~-~--~~~---~--~~ 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: creating Word and Excel docs
I'm not familiar with the quotas for Google's Documents List API or your planned access rate, so this is something you should confirm in the Documents List API discussion group, but generally speaking, this does seem like a reasonable strategy. http://groups.google.com/group/google-documents-list-api - Jason On Fri, Oct 23, 2009 at 11:57 AM, Houston startup coder stephenh...@gmail.com wrote: I accidentally posted this in the old general GAE group by mistake. : ( I need to allow my users to export into Word and Excel formats from my GAE app, and I know Apache POI is not supported. So, I'm trying to figure out how to avoid running a server elsewhere whose sole purpose is generating Word and Excel documents based on data in my GAE datastore. Google Docs seems like a good fit, so would it work to use the API to create documents there from my App Engine code and then export the created docs and pull them for storage in my App Engine datastore so that my users can download them whenever I want? Or do you foresee roadblocks to this, e.g. some sort of limit on the number of Google Docs my GAE app can create even if they're temporary files that are immediately deleted? --~--~-~--~~~---~--~~ 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: Error 500 - Loading data to memory during startup
We are working on enhancements that will hopefully reduce this initialization time for cold instances, which should be rolled out with the next couple of releases. There are several other threads on this, and we definitely recognize the importance and appreciate your patience. Regarding the first post, if your file is so large that it takes 80 seconds to load it into the development server, I suggest re-structuring your application to remove this dependency. Even with the planned enhancements, it's unlikely that you'll be able to load such the complete file into main memory without hitting the 30 second deadline or triggering an out-of-memory exception. - Jason On Fri, Oct 23, 2009 at 6:06 PM, trung tr...@phamcom.com wrote: Yeah, AppEngine drops your request after 30 seconds. My app takes 20 seconds to initialize in development, and half of the times it will finish loading within 30 seconds. Other times it goes pass 30 seconds and gets the same 500 error like yours. Google needs to make an exception for the initial cold boot timeout. On Oct 18, 1:57 pm, Joe Prasanna kumar joebi.m...@gmail.com wrote: Hi, I am working with my friend to build an app (hoogentia.appspot.com) which requires loading some learned model files to memory. I have a startup servlet that does this (loading model files to memory). Since it needs more mem, I run this app in dev mode with memory setting of -Xms1024m -Xmx2048m. I dont have any issues in development but when i deploy it to app engine and access my application, the startup servlet is invoked and it comes up with an Error 500. I am not getting any useful info from the logs. I am assuming the issue is with jvm settings for app engine in production. I looked at this thread ( http://groups.google.com/group/google-appengine-java/browse_thread/th...) and modified appcfg.sh to java -Xmx2000m -cp $SDK_LIB/appengine-tools-api.jar \ com.google.appengine.tools.admin.AppCfg $* After doing an update, I still get the 500 Error. In dev mode, it takes like 80 seconds for the model to get loaded in memory. Any thoughts / help / suggestions greatly appreciated, thanks Joe. --~--~-~--~~~---~--~~ 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: primary key portability
For very simple models (i.e. no relationships), you can use Long- and String-based primary keys to maintain portability, but if you do want to use relationships, at least one model will have to rely on the com.google.appengine.api.datastore.Key class. - Jason On Thu, Oct 22, 2009 at 6:52 PM, Rusty Wright rwright.li...@gmail.comwrote: With Google App Engine you are invariably required to use the class com.google.appengine.api.datastore.Key for your primary key. I would like to be able to compare the behaviour of of DataNucleus JDO between an RDBMS (e.g., HSQL) and Google's Big Table data store. But I can't see any nice way to do this without having to have duplicate model/domain objects, as well as duplicate DAOs, because of the primary key difference. Is anybody doing this, and if so, how are you handling it? --~--~-~--~~~---~--~~ 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] Chat Time transcript for October 21, 2009
This past Wednesday, the App Engine team hosted the latest session of its bimonthly IRC office hours. A transcript of the session and a summary of the topics covered is provided below. The next session will take place on Wednesday, November 4th from 7:00-8:00 p.m. PST in the #appengine channel on irc.freenode.net. Note that this will be the first Chat Time to occur after daylight time in the U.S. ends, which means that it will be taking place one hour earlier than usual in countries or states that don't observe daylight savings time. Please be aware of this time difference so you don't inadvertently miss the session. - Jason --SUMMARY--- - Q: Why am I seeing 0.1% rate of datastore operations time out and is anything being done to reduce this? A: A certain level of datastore timeouts is expected (generally between 0.1% and 0.2% of all datastore operations) but, we are actively working on ways to improve datastore reliability. If you are seeing a much higher rate, be sure to inspect your data model for write contention which often manifests as datastore timeouts. [9:02-9:07] - Q: What is the recommended approach to datastore capacity planning ahead of a large bulk upload? A: Entities are stored as protocol buffers (http://code.google.com/p/protobuf/) -- if you familiarize yourself with the protobuf specification, you can determine the space needed to store each entity, minus the datastore overhead, fairly easily. An article is coming out soon which explains how entities and indexes are stored in much more detail. [9:04-9:05] - Q: Can a high level of read operations result in datastore contention? A: Datastore contention is usually the result of too many attempted concurrent writes to the same datastore entity or entity group. Before implementing your data model, consider the expected read/ write access patterns and design your data model accordingly, sharding entities that you expect to update more than once per second (http:// code.google.com/appengine/articles/scaling/contention.html). While concurrent writes generally result in contention, concurrent reads generally result in better performance due to caching. [9:08-9:09, 9:11-9:13, 9:18] - Q: Are there any plans to support more file extensions for attachments to outgoing email, e.g. .doc, .docx, etc.? A: There are no immediate plans to support these extensions due to the prevalence of viruses contained in files of these types. In the meantime, you can include links to the files or share them via Google Docs. [9:14, 9:16, 9:19-9:20] - Q: What is the recommended approach to paging large data sets in App Engine? A: The offset approach is *not* recommended because it won't work for result sets larger than 1,000. Until datastore cursors are available, the recommended approaches are summarized in http://code.google.com/appengine/articles/paging.html. [9:21-9:23] - Q: How can one avoid exploding indexes when using list properties? A: In general, you should avoid referencing more than one list property in any query, especially if one or both list properties contain a large number of elements. Index rows have to be added for every permutation of values in the lists, which can result in index explosion. See the video at http://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore to learn more about why exploding indexes occur. [9:22, 9:26, 9:28-9:30, 9:32-9:33, 9:40] - Q: In Java, can one use sequence methods in JPA to get a sequence of datastore IDs? A: No, you have to use the low-level datastore API's allocateIds() method for now. [9:31, 9:33] - If you're looking to use Google Web Toolkit (GWT) and App Engine together, there are a number of combo samples available in http://code.google.com/p/googleappengine/source/browse/#svn/trunk/java/demos including gwtguestbook, sticky, and taskengine. [9:46, 9:48, 9:50-9:51] - Q: What is being done to address long initialization times for Java applications? A: We are definitely aware of the issue and are rolling out several back-end enhancements over the next few releases to try to minimize this startup time as much as possible. [9:52-9:53] --FULL TRANSCRIPT--- [09:01am] scudder_google: Hi all, welcome to another instlallment of our hour long chat time with people on the App Engine team [09:01am] johnvdenley: Is there any kind of formality to this session? or is it just a free for all? [09:01am] moraes: take what you can! [09:02am] moraes: meh. [09:02am] Jason_Google_: johnvdenley: It's basically a free-for-all. [09:02am] scudder_google: so far from Google we have nickjohnson, Jason_Google and a few others may join as we go [09:02am] scudder_google: yes, jump right in questions and comments welcome [09:02am] mbw: Is anything being done to reduce timeouts? I am seeing a lot more than .01% timeouts. We even use a low level catch and retry trick to try and reduce its effect. We saw
[appengine-java] Re: Java vs. Python X-AppEngine-Estimated-CPM-US-Dollars
Hi David. What is your application's ID? - Jason On Wed, Oct 21, 2009 at 3:46 PM, david.zverina david.zver...@gmail.comwrote: Keeping steady HTTP traffic does not work either. I have a script which 'http pings' my application every 30 seconds. Yet my app-engine instance experienced 70 spin downs yesterday alone! I am REALLY looking to this update - until then I'd highly recommend staying away from Spring! On Oct 21, 6:59 pm, Jason (Google) apija...@google.com wrote: Aside from keeping steady HTTP traffic to your site, I'm afraid not. But as I wrote in my last post, we're making updates over the next few releases to drive this startup time lower. - Jason On Tue, Oct 20, 2009 at 2:06 AM, Marcel Overdijk marceloverd...@gmail.comwrote: Is there any other way to keep an instance warm? Startup of instance just takes to much time to have an effective GAE/J application... On 19 okt, 22:58, Jason (Google) apija...@google.com wrote: To answer your question, no, having a cron job run every minute to keep an instance warm will not work. If all application instances have spun down, then a fresh HTTP request will require a new instance to be created, which will incur the startup costs. - Jason On Fri, Oct 16, 2009 at 6:45 AM, Toby tobias.ro...@sunnymail.mobi wrote: That is an interesting thread. I was asking myself the same question. My problem is, that I have some expensive initialization that is done when the webapp is initialized. I recognized that the very first request (after a longer time of idle) takes a lot of time. And as you say is expensive. I wonder if it would make sense to have a cron job that runs every minute to prevent this? On Oct 15, 10:52 pm, Timwillhack timwillh...@gmail.com wrote: I should probably point out that when I say 'Timed out' I really mean, clean start after waiting say 10 minutes to refresh a page, its not a 30 second endless while loop or anything, its actually just outputting one character from a string array. On Oct 15, 2:46 pm, Timwillhack timwillh...@gmail.com wrote: I was just curious if the initialization of the Java VM is actually charged a client? Here are some sample headers from Java vs. Python after letting the server timeout: VERY EXPENSIVE JAVA (timed out - guessing restarting VM): X-AppEngine-Estimated-CPM-US-Dollars: $0.149171 X-AppEngine-Resource-Usage: ms=4152 cpu_ms=6440 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.145377 X-AppEngine-Resource-Usage: ms=3890 cpu_ms=6276 api_cpu_ms=0 Cheap JAVA (quick refresh): X-AppEngine-Estimated-CPM-US-Dollars: $0.000168 X-AppEngine-Resource-Usage: ms=41 cpu_ms=3 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.000189 X-AppEngine-Resource-Usage: ms=19 cpu_ms=4 api_cpu_ms=0 CHEAP PYTHON FRESH START (waited about 10 mins before connecting): X-AppEngine-Estimated-CPM-US-Dollars: $0.002778 X-AppEngine-Resource-Usage: ms=103 cpu_ms=116 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.002778 X-AppEngine-Resource-Usage: ms=106 cpu_ms=116 api_cpu_ms=0 PYTHON RECONNECT QUICKLY: X-AppEngine-Estimated-CPM-US-Dollars: $0.000231 X-AppEngine-Resource-Usage: ms=7 cpu_ms=6 api_cpu_ms=0 Python is reporting very very very cheaper pricing per 1000. Is this the case or does google not really charge for the initialization for java? I sat here refreshing a page with a friend doing the same, out of the 40 or so requests about 4 were skyrocketed in price. This makes me very wary about making something that is hit excessively, since it seems like each instance is only taking 10 requests each per minute or whatver Yuck, are my numbers flawed or something? Or is Python just so much more efficient to use on 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: Spring MVC + Sitemesh problem
Yes, please try changing the log levels to .INFO or .FINEST -- it's possible that the log output that the frameworks are generating is just not getting surfaced because of the default logging level. After you deploy, you say that all you see is an empty site. Have you tried refreshing several times to see if your application eventually appears? This could point to a failed initialization and HardDeadlineExceeded error. Please post your application ID so we can determine this for certain. - Jason On Wed, Oct 21, 2009 at 11:20 AM, Abhinav Lele abhinav.l...@gmail.comwrote: Have you tried increasing the log levels ? -- Abhinav -Original Message- From: appenginetester jsand...@zerofeelistings.com Sent: 21 October 2009 23:46 To: Google App Engine for Java google-appengine-java@googlegroups.com Subject: [appengine-java] Re: Spring MVC + Sitemesh problem Thanks for this post, i thought i was going insane. I have deployed and redeployed dozens of times and see the same isssue -- empty site, no logs. Everything works fine in local eclipse environment. The deplyment to the app engine works with no errors. But when I access the application, there is an empty site and no logs on the server. On Oct 20, 5:35 am, Shponter shpon...@gmail.com wrote: Hi everybody! I'm using Spring MVC (3.0.0.RC1) with Sitemesh (2.4.2). Locally it works fine - generated jsp is decorated by sitemesh. When I deploy application on AppEngine I get empty site. There is also no exceptions or log messages... I don't have any ideas how to solve this... Cheers --~--~-~--~~~---~--~~ 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 Performance
Hi Diana. As others have stated, App Engine can write to multiple entity groups in parallel, so if each User entity is a root entity or is otherwise placed in a different entity group, then there shouldn't be any issues. Regarding performance, all apps should generally be able to handle up to 30 simultaneous dynamic requests assuming a 75ms processing time for each (average load), for a throughput of 400 qps or so: http://code.google.com/appengine/docs/java/runtime.html#Quotas_and_Limits If you want any other performance or cost-related numbers, let me know. For updates to the same entity or entity group, App Engine uses optimistic concurrency as opposed to locking. If an entity is already being updated, then the second request will fail and will automatically get retried on the server. After consistent failures, an exception will be thrown which you can catch to either handle gracefully. Datastore writes will fail from time to time, generally about 0.1 to 0.2 percent of the time, but the failure rate will be higher when there is contention, i.e. a high rate of simultaneous writes to the same entity/entity group. http://code.google.com/appengine/articles/scaling/contention.html - Jason On Thu, Oct 22, 2009 at 8:04 AM, Diana Cruise diana.l.cru...@gmail.comwrote: I'm glad to hear that the 1-10 requests/second is per User root entity...in my case this means that huge number of Users logged in around the world should expect sub-second response even if tens of thousands clicked the Update button at the same instance in time! The only problem is we do NOT hear from anyone outside of Google to confirm performance of large volume for specific applications and what the real costs are!!! Regarding deadlock, I hear GAE does NOT both with lock timeouts so as soon as a transaction trys to retrieve a record that is already locked, it will receive an error and have to retry. On Oct 19, 5:50 pm, Dr. Flufenstein michael.brink...@gmail.com wrote: Preface: Please note, I'm not speaking for google at all in this note and a lot of what I've written is speculation based on what I've read in various GAE docs as well as some meager knowledge of how relational DBs generally work. And yes, I know datastore isn't a relational DB, but I believe that their indexing implementation likely runs into many of the same problems you have with indexing relational data although that assumption could be completely wrong. From what I can tell, the update bottleneck you're referring to is for updating what you would often think of as a single record if you were persisting one instance of your User as a single denormalized record in a relational schema. I suspect this bottleneck is due to the datastore architecture and the way that data updates are accumulated (possibly grouped/keyed by PK) in a queue, which is probably read from like a cache if read requests come in before the data has been flushed into the actual storage medium and replicated to the other datacenters. So if each of your users were updating their own User records, I don't believe you'd experience that limitation which may be an artifact of how those in-memory queue/cache structures are managed/locked during updates (i.e. a new update for a record may be held until it's been flushed from the queue to the storage medium to prevent having to merge/reconcile records in the queue). If they were all updating a single shared record, then I think you'd hit this pretty quick. Let's say though that your users are updating separate records...as your data size grows, you will probably see your update throughput decrease as other factors become dominant, and I believe this will primarily be dependent on the number and composition of the indexes on your data as well as the number of entities persisted. To me, this is the much riskier unknown because your average index structure is harder to update piecewise in parallel because the index must allow you to order/search all of the records' indexed columns. In an RDBMS like SQL Server or Oracle, you'd see some level of index locking take place during each transaction (maybe one page of an index) to allow concurrent updates to different sections of an index before the updates are committed, the transaction is ended and the locks are released. In relational persistence systems, this gets slower as the indexes become larger and is usually overcome with a technique like partitioning which, if you aren't familiar with it, sort of gives you a top level of your index tree where the data is actually spread into n groups of tables/indexes depending on some value in each record, and you usually pick a partition key so that data volume in each partition is kind of naturally balanced because rebalancing across partitions is expensive. I'm not sure that any kind of similar mechanism has been exposed in the GAE datastore right now