[google-appengine] Datastore Enum Types No Longer Serialized
We are using GAE python standard environment (Python 2.7) and suddenly our app started experiencing issues when serializing a datastore enum property. Our code has been deployed and working for over 6 months and today it is failing. For example: class SomeType(messages.Enum): FIRST_TYPE = 1 SECOND_TYPE = 2 THIRD_TYPE = 3 class SomeEntity(polymodel.PolyModel): # Other fields not shown something = msgprop.EnumProperty(SomeType, repeated=true) def get_msg_data(self): msg_data = { 'something': json.dumps(self.something) } return msg_data The call to json.dumps above started failing in our instance today with an error like this: TypeError: SomeType(FIRST_TYPE, 1) is not JSON serializable Is anyone else seeing this? Note that using the same enum type within a message where we are not calling json.dumps directly works fine. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/07b1be86-920a-4ff5-8a78-2a4a840273efn%40googlegroups.com.
Re: [google-appengine] Re: Cloud Build Error when deploying GAE
Hi Pierre, Thank you for responding and asking for more details. Below is the full output from the 2nd run (project ID removed): Services to deploy: descriptor: [/Users/larrys/tmp/build/project/backend/app.yaml] source: [/Users/larrys/tmp/build/project/backend] target project: [XX] target service: [default] target version: [20200225t065208] target url: [https://XX.appspot.com] Configurations to update: descriptor: [/Users/larrys/tmp/build/project/backend/index.yaml] type:[datastore indexes] target project: [XX] descriptor: [/Users/larrys/tmp/build/project/backend/queue.yaml] type:[task queues] target project: [XX] Do you want to continue (Y/n)? y Beginning deployment of service [default]... ╔╗ ╠═ Uploading 1 file to Google Cloud Storage ═╣ ╚╝ File upload done. Updating service [default]...done. Setting traffic split for service [default]...done. Deployed service [default] to [https://XX.appspot.com] Updating config [index]...done. Updating config [queue]...done. Task queues have been updated. Visit the Cloud Platform Console Task Queues page to view your queues and cron jobs. Indexes are being rebuilt. This may take a moment. You can stream logs from the command line by running: $ gcloud app logs tail -s default To view your application in the web browser run: $ gcloud app browse --project=XX On Tue, Feb 25, 2020 at 12:41 PM 'Pierre-Yves (Google Cloud Support)' via Google App Engine wrote: > Hello Larry, > > Could you please provide the full console output after the re-try? This > may provide a hint as to which files were unsuccessfully downloaded in the > first try. > > On Tuesday, February 25, 2020 at 9:33:01 AM UTC-5, Larry Schiefer wrote: >> >> Our project uses GAE standard, auto-scaling, Python 2.7. We deploy using >> gcloud and haven't changed anything regarding the way we deploy. However, >> now we are starting to see these types of errors when we deploy: >> >> File upload done. >> Updating service [default]...failed. >> >> ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build >> 42869100-9940-4821-8d40-3c52bf2fa268 status: FAILURE. >> Build error details: Failed to download at least one file. Cannot >> continue. >> . >> Check the build log for errors: >> https://console.cloud.google.com/gcr/builds/42869100-9940-4821-8d40-3c52bf2fa268?project= >> >> If we re-deploy (same command, same code) it then succeeds. If we follow >> the link in the error message, it always shows "unable to find the >> resource" error. Does anyone know why this is happening all of the sudden? >> >> Gcloud details: >> Google Cloud SDK 260.0.0 >> app-engine-python 1.9.86 >> app-engine-python-extras 1.9.86 >> bq 2.0.47 >> cloud-datastore-emulator 2.1.0 >> core 2019.08.23 >> gcloud >> gsutil 4.42 >> >> Thanks, >> Larry >> >> -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-appengine+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/cb6a7625-18cb-4cb6-97eb-2f8b844a7ac4%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/cb6a7625-18cb-4cb6-97eb-2f8b844a7ac4%40googlegroups.com?utm_medium=email_source=footer> > . > -- Larry Schiefer M: 469-263-9388 email: larry.schie...@hiqes.com http://www.hiqes.com -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CAEOXmp%2Bn5nZHbCWCg9aT21a2Sqsk900wLrXPgg2p5r8AnKZ9eQ%40mail.gmail.com.
[google-appengine] Cloud Build Error when deploying GAE
Our project uses GAE standard, auto-scaling, Python 2.7. We deploy using gcloud and haven't changed anything regarding the way we deploy. However, now we are starting to see these types of errors when we deploy: File upload done. Updating service [default]...failed. ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 42869100-9940-4821-8d40-3c52bf2fa268 status: FAILURE. Build error details: Failed to download at least one file. Cannot continue. . Check the build log for errors: https://console.cloud.google.com/gcr/builds/42869100-9940-4821-8d40-3c52bf2fa268?project= If we re-deploy (same command, same code) it then succeeds. If we follow the link in the error message, it always shows "unable to find the resource" error. Does anyone know why this is happening all of the sudden? Gcloud details: Google Cloud SDK 260.0.0 app-engine-python 1.9.86 app-engine-python-extras 1.9.86 bq 2.0.47 cloud-datastore-emulator 2.1.0 core 2019.08.23 gcloud gsutil 4.42 Thanks, Larry -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CAEOXmpJiMCOkPW%2B2itQvWdvsXK4WOjRcqFgt9M-dUzczmH9R1w%40mail.gmail.com.
Re: [google-appengine] Can't I set a specific request timeout ? 24 hours for running an HTTP requets seems crazy.
App Engine's request handlers put a hard limit on how quickly the code must respond and if that is exceeded it internally throws an exception. This will result in a 500 error to the http caller and this can't be caught by your GAE code and it cannot be overridden. This is one of the tradeoffs when using a PaaS. If more control is desired/needed so your software is on a more general web server, you'll need to use something like Kubernetes or Compute Engine. Task queues / cron / cloud tasks can take substantially longer and are dependent on the type of GAE instance. In some cases the max time is 10 minutes, in other cases I believe it can go 24 hours. Regardless, if the work can be broken up in the task/cron so it detects when it is nearing some limit, it can save some info about where it was and re-schedule itself to run again. -Larry On Fri, Jan 31, 2020 at 7:59 AM Patrice B wrote: > Thank you for your time. I do understand that task queues and cron jobs > may need a longer timeout value. > > My question really is this : is there no way to configure an instance in > such a way that HTTP requests are killed on timeout after say 10 minutes ? > > And if there is no way to achieve this, as seems to be the case, then how > would you suggest to protect an instance against a request that would keep > running forever ?Should be start a timer and attempt to handle timeout > manually ? > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-appengine+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/cbc75d76-591f-4f58-bff3-42d6fe0b8b4c%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/cbc75d76-591f-4f58-bff3-42d6fe0b8b4c%40googlegroups.com?utm_medium=email_source=footer> > . > -- Larry Schiefer M: 469-263-9388 email: larry.schie...@hiqes.com http://www.hiqes.com -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CAEOXmpKtm2K57XvCs%2Bud8C6wb%3Dd_vtFg%3DbTjPD4zcBwQvL5nvw%40mail.gmail.com.
Re: [google-appengine] App Engine Admin Panel
Open https://console.cloud.google.com. Select your project. In the left nav, look for "IAM & admin" and click it. The default view should show you all users and server accounts which have access to the project. Near the top there is an "Add" button. Click it. Insert an email address for the new member and select the appropriate role. You'll need to determine what the role means for that developer. If you are comfortable with them having the ability to modify anything in the cloud project (not just AppEngine), set them as an Editor. If you want finer grain control (such as AppEngine only), you'll need to set the role appropriately. On Fri, Dec 6, 2019 at 7:16 AM Anita Jarman wrote: > I am a complete novice and trying to get my mobile application completed > via an app developer. > The team I'm using is stating that the admin panel is not opening. How can > I get this accessible for my developer? > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-appengine+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/03bb2b87-773f-4bad-9d8e-b33153ccf347%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/03bb2b87-773f-4bad-9d8e-b33153ccf347%40googlegroups.com?utm_medium=email_source=footer> > . > -- Larry Schiefer M: 469-263-9388 email: larry.schie...@hiqes.com http://www.hiqes.com -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CAEOXmpLDzhMF5DCJtSvqG28HfxYMDnUtksdme4sdA0NZ4jDoVg%40mail.gmail.com.
Re: [google-appengine] Re: Cannot generate endpoint discovery docs using endpointscfg
Yes, I was able to resolve the issue in our setup. We use pip to manage our python libraries local to the tree. We had to update the required version of the endpoints library in our requirements.txt file to point to the latest version, then use endpointcfg from that package rather than the one from the SDK. The instructions (while not obvious) were added in one of the comments back from the GAE team in the issue linked above: https://cloud.google.com/endpoints/docs/frameworks/python/gen_clients#generating_the_client_library_2 Good luck! On Monday, July 1, 2019 at 2:04:04 PM UTC-5, Jaskaran Singh wrote: > > Hi @Larry Schiefer > > did you find any solution for this? > > Please let me know i am facing this issue please. > > On Wednesday, May 8, 2019 at 6:41:42 PM UTC+5:30, Larry Schiefer wrote: >> >> Great, thank you! >> >> On Tue, May 7, 2019 at 6:04 PM 'Aref Amiri (Cloud Platform Support)' via >> Google App Engine wrote: >> >>> Hi Larry, >>> >>> We will look into the issue reported on Issue Tracker >>> <https://issuetracker.google.com/issues/131557153>, and further updates >>> communication will be shared on that page. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google App Engine" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to google-a...@googlegroups.com. >>> To post to this group, send email to google-a...@googlegroups.com. >>> Visit this group at https://groups.google.com/group/google-appengine. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/google-appengine/5a1613a6-fdc7-4b74-b8b7-05c315308d8f%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/google-appengine/5a1613a6-fdc7-4b74-b8b7-05c315308d8f%40googlegroups.com?utm_medium=email_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> -- >> >> Larry Schiefer >> M: 469-263-9388 >> email: larry@hiqes.com >> http://www.hiqes.com >> >> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/70d2ed94-adff-447e-89bf-47f6e06b2977%40googlegroups.com.
Re: [google-appengine] Re: Cannot generate endpoint discovery docs using endpointscfg
Great, thank you! On Tue, May 7, 2019 at 6:04 PM 'Aref Amiri (Cloud Platform Support)' via Google App Engine wrote: > Hi Larry, > > We will look into the issue reported on Issue Tracker > <https://issuetracker.google.com/issues/131557153>, and further updates > communication will be shared on that page. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-appengine+unsubscr...@googlegroups.com. > To post to this group, send email to google-appengine@googlegroups.com. > Visit this group at https://groups.google.com/group/google-appengine. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/5a1613a6-fdc7-4b74-b8b7-05c315308d8f%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/5a1613a6-fdc7-4b74-b8b7-05c315308d8f%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Larry Schiefer M: 469-263-9388 email: larry.schie...@hiqes.com http://www.hiqes.com -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CAEOXmp%2BhRy-eAci1n_5kq4pkTTYQdezQ1CY2xmoY_d4YShfpyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[google-appengine] Cannot generate endpoint discovery docs using endpointscfg
The endpointscfg.py utility is no longer working due to the backing Google webapis-discovery service not being available. This prevents the creation of endpoint discovery documents as well as client libraries. This has been logged in the issue tracker, but has not received any attention yet: https://issuetracker.google.com/issues/131557153 The utility will always fail with a traceback like this: Traceback (most recent call last): File "/Users/larrys/tools/google-cloud-sdk/platform/google_appengine/endpointscfg.py", line 133, in run_file(__file__, globals()) File "/Users/larrys/tools/google-cloud-sdk/platform/google_appengine/endpointscfg.py", line 129, in run_file execfile(_PATHS.script_file(script_name), globals_) File "/Users/larrys/tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py", line 561, in main(sys.argv) File "/Users/larrys/tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py", line 557, in main args.callback(args) File "/Users/larrys/tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py", line 426, in _GetClientLibCallback hostname=args.hostname, application_path=args.application) File "/Users/larrys/tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py", line 390, in _GetClientLib discovery_doc = _FetchDiscoveryDoc(config, 'rest') File "/Users/larrys/tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py", line 277, in _FetchDiscoveryDoc raise ServerRequestException(error) __main__.ServerRequestException: HTTP 404 (Not Found) error when communicating with URL: https://webapis-discovery.appspot.com/_ah/api/discovery/v1/apis/generate/rest. Response: 404 Not Found Error: Not Found -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/8a0373a5-711c-4e4a-b901-677a4e07fd42%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [google-appengine] Re: urlfetch DeadlineExceededError
We had a similar problem starting 10/31/2013. It had been working for 5 years and just stopped with an immediate SocketTimeoutException (java sdk) at URLFetchServiceImpl.java line142. Somehow we got it working. Here's how: Instead of using HttpURLConnection with the domain name we used the ip address, and it worked. Then we switched back to the domain name and it still worked. On Thursday, November 7, 2013 9:49:07 AM UTC-7, Pravanjan Niranjan wrote: Our application also experiencing same problem . https://groups.google.com/forum/#!topic/google-appengine-downtime-notify/aRJ9F1FJv2o On Thu, Nov 7, 2013 at 9:58 PM, Aerodyno sav...@gmail.com javascript:wrote: Yes, experiencing this problem right now, has a huge negative affect on our site as we depend on real-time url-fetched data, please keep us posted. On Thursday, November 7, 2013 11:10:58 AM UTC-5, Brandon Thomson wrote: It's messed up over here too, my mailbox is flooded with DEADLINE_EXCEEDED errors -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com javascript:. To post to this group, send email to google-a...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks, Pravanjan Dev *formcreator http://alpha.formcreator.a-cti.com/pages/logInForm.jsp* -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
[google-appengine] Redirect if login is under wrong domain.
I am trying to create a web app and I have it to where you are required to log in. When I change authentication to Google Apps Domain and put in the domain, if I am not logged into any account it sends me directly to a page with the following message: Error: Server ErrorThe server encountered an error and could not complete your request. If the problem persists, please reporthttp://code.google.com/appengine/community.html your problem and mention this error message and the query that caused it. How can I make it redirect to the Google sign in page and continue to redirect to the log in page if signed in under the wrong domain. My yaml file has the following but it still won't work. - url: .* script: main.app login: required auth_fail_action: redirect Thank you. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
[google-appengine] Protocol Buffers
is there any support in appengine for using protocol buffers for data transfer (eg. through RPCs). If not, what recommended practices do people have for minimizing latency between AppEngine and clients, when clients are spread across the globe? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/-7T-KWknCvEJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Angry Birds Login
For the past 24 hours or so, Login in Angry Birds Chrome has failed with this message: Error: Server ErrorThe server encountered an error and could not complete your request. If the problem persists, please reporthttp://code.google.com/appengine/community.html your problem and mention this error message and the query that caused it. URL: http://chrome.angrybirds.com/_ah/conflogin -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/KICNjD979SAJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Can't send attachment to Admin Email
Hi all, I have done a test by JavaMail as following. 1. send email with attachment to any email address= success and increase the quota of Recipients Emailed 2. .change the recipient to admins from step 1 = fail.Exception:java.lang.IllegalArgumentException: Bad Request: Admin message exceeds size limits 3. remove the attachment from step 2.= Success and increase the quota of admins emailed. *Could I conclude that Email to admins with attachments is forbidden?* I don't see any document about that. Larry於 2012年5月18日星期五UTC+8下午12時38分42秒寫道: Hi All, I fail to send email to *admins *of app. Here is my code MailService mailService = MailServiceFactory.getMailService(); Message message = new Message(); message.setSender(x...@gmail.com); message.setSubject(This is test); message.setHtmlBody(this is bcontent/b); Attachment attachment = new Attachment(test.pdf, blob.getBytes()); // blob size = 488k message.setAttachments(attachment); mailService.*sendToAdmins*(message); In the Logs of Administration Console, a warning: Bad Request: Admin message exceeds size limits here is the detail quota: MailMail API Calls [image: 0%] 0%0 of 7,000OkayRecipients Emailed [image: 0%] 0%0 of 100OkayAdmins Emailed [image: 0%] 0%0 of 5,000OkayMessage Body Data Sent [image: 0%] 0%0.00 of 0.06 GBytesOkayAttachments Sent [image: 0%] 0%*0.00 of 0.00 GBytes*OkayAttachment Data Sent [image: 0%] 0%0.00 of 0.10 GBytesOkay Is it problem of Attachments Sent? It should be 2,000 attachments. Anybody can help me? Thank. Larry於 2012年5月18日星期五UTC+8下午12時38分42秒寫道: Hi All, I fail to send email to *admins *of app. Here is my code MailService mailService = MailServiceFactory.getMailService(); Message message = new Message(); message.setSender(x...@gmail.com); message.setSubject(This is test); message.setHtmlBody(this is bcontent/b); Attachment attachment = new Attachment(test.pdf, blob.getBytes()); // blob size = 488k message.setAttachments(attachment); mailService.*sendToAdmins*(message); In the Logs of Administration Console, a warning: Bad Request: Admin message exceeds size limits here is the detail quota: MailMail API Calls [image: 0%] 0%0 of 7,000OkayRecipients Emailed [image: 0%] 0%0 of 100OkayAdmins Emailed [image: 0%] 0%0 of 5,000OkayMessage Body Data Sent [image: 0%] 0%0.00 of 0.06 GBytesOkayAttachments Sent [image: 0%] 0%*0.00 of 0.00 GBytes*OkayAttachment Data Sent [image: 0%] 0%0.00 of 0.10 GBytesOkay Is it problem of Attachments Sent? It should be 2,000 attachments. Anybody can help me? Thank. Larry於 2012年5月18日星期五UTC+8下午12時38分42秒寫道: Hi All, I fail to send email to *admins *of app. Here is my code MailService mailService = MailServiceFactory.getMailService(); Message message = new Message(); message.setSender(x...@gmail.com); message.setSubject(This is test); message.setHtmlBody(this is bcontent/b); Attachment attachment = new Attachment(test.pdf, blob.getBytes()); // blob size = 488k message.setAttachments(attachment); mailService.*sendToAdmins*(message); In the Logs of Administration Console, a warning: Bad Request: Admin message exceeds size limits here is the detail quota: MailMail API Calls [image: 0%] 0%0 of 7,000OkayRecipients Emailed [image: 0%] 0%0 of 100OkayAdmins Emailed [image: 0%] 0%0 of 5,000OkayMessage Body Data Sent [image: 0%] 0%0.00 of 0.06 GBytesOkayAttachments Sent [image: 0%] 0%*0.00 of 0.00 GBytes*OkayAttachment Data Sent [image: 0%] 0%0.00 of 0.10 GBytesOkay Is it problem of Attachments Sent? It should be 2,000 attachments. Anybody can help me? Thank. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/4ymVJZlNmc4J. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Can't send attachment to Admin Email
Hi Abdelkrim, I can send the email without the attachment. And the Admins Emailed quota increase. The sender is the owner of the application. PS I can send email with attachment by Javamail. It is only 100 Recipients only. abdelkrim boujraf於 2012年5月19日星期六UTC+8上午5時08分30秒寫道: Can you send a message without the attachment? Is the sender (email address) a developer or an owner of the application? Abdelkrim http://blog.i14y.net http://www.alt-f1.be Le vendredi 18 mai 2012 06:38:42 UTC+2, Larry a écrit : Hi All, I fail to send email to *admins *of app. Here is my code MailService mailService = MailServiceFactory.getMailService(); Message message = new Message(); message.setSender(x...@gmail.com); message.setSubject(This is test); message.setHtmlBody(this is bcontent/b); Attachment attachment = new Attachment(test.pdf, blob.getBytes()); // blob size = 488k message.setAttachments(attachment); mailService.*sendToAdmins*(message); In the Logs of Administration Console, a warning: Bad Request: Admin message exceeds size limits here is the detail quota: MailMail API Calls [image: 0%] 0%0 of 7,000OkayRecipients Emailed [image: 0%] 0%0 of 100OkayAdmins Emailed [image: 0%] 0%0 of 5,000OkayMessage Body Data Sent [image: 0%] 0%0.00 of 0.06 GBytesOkayAttachments Sent [image: 0%] 0%*0.00 of 0.00 GBytes*OkayAttachment Data Sent [image: 0%] 0%0.00 of 0.10 GBytesOkay Is it problem of Attachments Sent? It should be 2,000 attachments. Anybody can help me? Thank. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/Og87oQ3j3IQJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Can't send attachment to Admin Email
Hi All, I fail to send email to *admins *of app. Here is my code MailService mailService = MailServiceFactory.getMailService(); Message message = new Message(); message.setSender(x...@gmail.com); message.setSubject(This is test); message.setHtmlBody(this is bcontent/b); Attachment attachment = new Attachment(test.pdf, blob.getBytes()); // blob size = 488k message.setAttachments(attachment); mailService.*sendToAdmins*(message); In the Logs of Administration Console, a warning: Bad Request: Admin message exceeds size limits here is the detail quota: MailMail API Calls [image: 0%] 0%0 of 7,000OkayRecipients Emailed [image: 0%] 0%0 of 100OkayAdmins Emailed [image: 0%] 0%0 of 5,000OkayMessage Body Data Sent [image: 0%] 0%0.00 of 0.06 GBytesOkayAttachments Sent [image: 0%] 0%*0.00 of 0.00 GBytes*OkayAttachment Data Sent [image: 0%] 0%0.00 of 0.10 GBytesOkay Is it problem of Attachments Sent? It should be 2,000 attachments. Anybody can help me? Thank. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/_t1LgABITn0J. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: The Schedule Format of cron.xml
Hi Lan, Thank you. In option 1: Do you mean using *etaMillis of **TaskOptions *using to specify the execute time? This could be a solution. We can trigger a TaskInit by cron and create 48 tasks in queue(every 30 minutes) to avoid chain task. In option 2: This is my first thought about cron.xml . I just wish a simple syntax to support such requirement. If I change the schedule from 30 minutes to 2 minutes, the cron.xml will be 1800 entries. Ian Marshall於 2012年5月16日星期三UTC+8下午5時15分11秒寫道: Your syntax problem may lie within your schedule tag (mix of month and every, and unwanted final comma): schedule1,15, of month every 2 hours/schedule Your description tag and posting text do not match the every 2 hours in your schedule tag. Assuming that you want to run every 30 minutes... Option 1: try schedule1,15 of month 00:00/schedule and at the end of your scheduled task enqueue a task to execute 30 minutes later, if this would be within the same day. Option 2: try schedule1,15 of month 00:00/schedule schedule1,15 of month 00:30/schedule schedule1,15 of month 01:00/schedule schedule1,15 of month 01:30/schedule ... schedule1,15 of month 23:30/schedule This is more robust than chaining enqueued tasks kicked off by a scheduled task, but would be more cumbersome to code, since you will need a cron entry for each schedule. Is this any help? On May 15, 12:20 pm, Larry kuei...@gmail.com wrote: Hello All, Is it possible to execute my job as following: ?xml version=1.0 encoding=UTF-8? cronentries cron url/mytask/url descriptionExecute my task, every 30 minutes of first and15th of month /description schedule1,15, of month every 2 hours/schedule timezoneAmerica/New_York/timezone /cron /cronentries This syntax is wrong and fail to deploy to GAE. I tested another solution. Execute mytask every 30 minutes. Execute the real task only the date is 1 and 15. I check the dashboard. The Frontend Instance Hours increase dramatically. Any thoughts? Larry -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/sAl5cT5eeC4J. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] The Schedule Format of cron.xml
Hello All, Is it possible to execute my job as following: ?xml version=1.0 encoding=UTF-8? cronentries cron url/mytask/url descriptionExecute my task, every 30 minutes of first and15th of month /description schedule1,15, of month every 2 hours/schedule timezoneAmerica/New_York/timezone /cron /cronentries This syntax is wrong and fail to deploy to GAE. I tested another solution. Execute mytask every 30 minutes. Execute the real task only the date is 1 and 15. I check the dashboard. The Frontend Instance Hours increase dramatically. Any thoughts? Larry -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/YfhcwP0GmhYJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Are there any plans to increase the 150MB app size limit?
Hi Tom, I have deployed my app by delete all WEB-INF/deploy folder. When I check the content of appcfg49211759916596577999.tmp folder which show in Eclipse console, which contains all compiled GWT modules and static files. I found a _static_ folder inside it. This folder almost duplicate all GWT moudels and static files. Do I miss something or it is normal? Tom Phillips於 2011年9月14日星期三UTC+8下午9時03分05秒寫道: Are you deploying a .junit_symbolMaps folder (in your compiled GWT root)? If so, it's large, and can be safely deleted/excluded from the war before deploy. /Tom On Sep 14, 7:47 am, Daniel Florey daniel.flo...@gmail.com wrote: When using GWT the app can quickly exceed the 150MB app size limit. Are there any plans to increase this limit to let's say... unlimited? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/eNV8plAKFAEJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Mispelling in
Sometimes, it's enough to ask about it on this mailing list :-) Thank you very much for reporting this. Fixed! -Larry Hosken On Fri, Apr 6, 2012 at 2:20 PM, Brian Quinlan bquin...@google.com wrote: On Fri, Apr 6, 2012 at 8:52 PM, abdelkrim boujraf abdelkrim.bouj...@gmail.com wrote: how can we give a feedback to the team dealing with the website developers.google.com? You can file a bug at: http://code.google.com/p/googleappengine/issues Ideally with a label of Component-Docs Cheers, Brian what if we found mistakes like this one: ... its number value is the same as for the the previously created... URL: https://developers.google.com/appengine/docs/python/tools/localunittesting Best regards, Abdelkrim http://blog.i14y.net -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/tNzncdJdSXIJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: NDB tasklet decorator documentation
https://developers.google.com/appengine/docs/python/ndb/async On Wednesday, April 4, 2012 3:58:48 PM UTC-7, Dan wrote: Anyone know where the NDB tasklet documentation has gone? Guido's Google Doc was linked to on the NDB dev page but it seems to have disappeared and https://developers.google.com/appengine/docs/python/ndb/ doesn't show it anywhere. Best wishes, Dan -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/YVhGDmtObG8J. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: App Engine documentation moving to developers.google.com/appengine/
Hello again, App Engine Developers! Other languages will be following soon once we have thoroughly tested the initial move. Non-English documentation has been successfully migrated. If you were reading documentation at code.google.com/appengine/ , you should now be able to read it at developers.google.com/appengine/ regardless of language. We will begin redirecting requests for code.google.com/appengine to developers.google.com/appengine shortly. Larry Hosken, on behalf of the App Engine documentation team On Monday, March 19, 2012 12:38:12 PM UTC-7, Larry Hosken wrote: Hello App Engine Developers! The English-language App Engine documentation at http://code.google.com/appengine/ is moving to https://developers.google.com/appengine/. Other languages will be following soon once we have thoroughly tested the initial move. The content of the documentation is the same at each location and we will begin redirecting requests for code.google.com/appengine to developers.google.com/appengine shortly. If you are currently viewing the docs in a language other than English, code.google.com will continue to function normally. We hope you enjoy the new look and feel of the documentation. Happy Coding! Larry Hosken, on behalf of the App Engine documentation team -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/WoeuLiBix_oJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] App Engine documentation moving to developers.google.com/appengine/
Hello App Engine Developers! The English-language App Engine documentation at http://code.google.com/appengine/ is moving to https://developers.google.com/appengine/. Other languages will be following soon once we have thoroughly tested the initial move. The content of the documentation is the same at each location and we will begin redirecting requests for code.google.com/appengine to developers.google.com/appengine shortly. If you are currently viewing the docs in a language other than English, code.google.com will continue to function normally. We hope you enjoy the new look and feel of the documentation. Happy Coding! Larry Hosken, on behalf of the App Engine documentation team -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/jOQzG4RnO0gJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[appengine-java] Re: Moderation enabled
i ijust saw this postsorry, i just double posted a post i did last nightplease ignore one of them -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/LACRHxEz63UJ. 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] Increase Incoming Mail Size
Is there a way to increase the incoming mail size to over 10MB?? Ive a bunch of business customers using my app that need to send emails upto 30MB in size. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/o_tya5gd5qAJ. 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] Increase Incoming Mail Size Quota
is this possible? Ive a couple of customers who regularly send 10MB attachments. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/9FPRZaCQcL8J. 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] Set a header of text/cache-manifest when a .manifest file is downloaded.
Hi, I've been using the Google App Engine for Java to create a few interesting apps. I'd like to further develop one of these for the iPhone. It is possible to have the iPhone remember a web page to make it look like an App. To do this you need to specify a manifest file to tell the iPhone what to cache. The .manifest file must have a header specifying it is of type text/cache-manifest. Normally I'd simply edit the .htaccess file and add a AddType text/cache manifest .manifest to add the header when any .manifest file is downloaded. The question - how can I do this with the Google App Engine for Java? Thanks to anyone who can help. Larry -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/yF8aCSExh-YJ. 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/Compiling new Java class at run time
On Mar 7, 12:13 am, Rick Smith rick@gmail.com wrote: Hi all Can I create and compile a java class at run time on goolge appengine. Use case: I have given a UI to my application user that they can define their own business logic.Now what is going to be main challenge is that I need to make new deployment each time when some one need to modify its business logic. As an alternate I want to store source code in data base and compile it when required. Regards Rick As others have pointed out the file I/O issue precludes using a compiler The best I can suggest is using BCEL to construct classes at runtime... But I have never tried this with GAE so I do not know if BCEL is whitelist safe. -- 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/Compiling new Java class at run time
On Mar 8, 8:35 pm, Larry Cable larry.ca...@gmail.com wrote: On Mar 7, 12:13 am, Rick Smith rick@gmail.com wrote: Hi all Can I create and compile a java class at run time on goolge appengine. Use case: I have given a UI to my application user that they can define their own business logic.Now what is going to be main challenge is that I need to make new deployment each time when some one need to modify its business logic. As an alternate I want to store source code in data base and compile it when required. Regards Rick As others have pointed out the file I/O issue precludes using a compiler The best I can suggest is using BCEL to construct classes at runtime... But I have never tried this with GAE so I do not know if BCEL is whitelist safe. Just as a followup you need to take a look at the BCEL API to see if you can create in-memory class files ... Otherwise you will trip up over the File I/O issue again. -- 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.
NoClassDef ReadPolicy$Consistency? (was Re: [appengine-java] using an Objectify query filter with IN -- IllegalArgumentException)
I just upgraded - thanks for the amazingly quick turnaround on my bug btw!! Unfortunately, I'm now getting java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/ReadPolicy$Consistency at com.googlecode.objectify.ObjectifyOpts.init(ObjectifyOpts.java:25) at com.googlecode.objectify.ObjectifyFactory.begin(ObjectifyFactory.java:105) at com.googlecode.objectify.ObjectifyService.begin(ObjectifyService.java:29) I thought it might be because I was using a slightly older version of the AppEngine, so I updated that to 1.3.3, but still get the same result. Now my assumption is that there's something wrong with my configuration (I'm missing a jar I need?) but don't know which one. Can anyone tell me what jar com/google/appengine/api/datastore/ReadPolicy$Consistency is in? On Wed, Apr 21, 2010 at 11:10 PM, Jeff Schnitzer j...@infohazard.orgwrote: Fixed. Although you might prefer to issue a batch get() operation instead of the query. There might be a performance difference - I'm not sure. Jeff On Wed, Apr 21, 2010 at 6:46 PM, Jeff Schnitzer j...@infohazard.org wrote: Looks like you found a bug. I should be able to have a unit test and a fix checked in tonight. Sorry about that! Jeff On Wed, Apr 21, 2010 at 1:43 PM, Larry White ljw1...@gmail.com wrote: Hi, I'm trying to pass in a collection of Strings to be used in a filter using Objectify (which I LOVE, btw). I'm doing it like so: QuerySNote query = ofy.query(SNote.class).filter(id IN, results).limit(limit).offset(offset).order(-timestamp); where the results parameter is a non-empty ArrayListString. I'm getting the exception: 64951 [btpool0-4] ERROR com.deathrayresearch - java.lang.IllegalArgumentException: A collection of values is required. at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:153) at com.google.appengine.api.datastore.Query$FilterPredicate.init(Query.java:543) at com.google.appengine.api.datastore.Query.addFilter(Query.java:231) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:102) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:28) The id parameter contains Strings and I think an ArrayListString qualifies as a collection of values. Can anyone tell me what I'm doing wrong? thanks much Larry -- 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: NoClassDef ReadPolicy$Consistency? (was Re: [appengine-java] using an Objectify query filter with IN -- IllegalArgumentException)
Ok, So I can reliably recreate the issue. My app works fine with Objectify 2.02 and 2.1 but fails on the first DB read with 2.2. Any help would be appreciated. On Thu, Apr 22, 2010 at 12:36 PM, Jeff Schnitzer j...@infohazard.orgwrote: It's in appengine-api-1.0-sdk-1.3.2.jar (or presumably 1.3.3)... it's hard to imagine your project compiles without it! Jeff On Thu, Apr 22, 2010 at 5:31 AM, Larry White ljw1...@gmail.com wrote: I just upgraded - thanks for the amazingly quick turnaround on my bug btw!! Unfortunately, I'm now getting java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/ReadPolicy$Consistency at com.googlecode.objectify.ObjectifyOpts.init(ObjectifyOpts.java:25) at com.googlecode.objectify.ObjectifyFactory.begin(ObjectifyFactory.java:105) at com.googlecode.objectify.ObjectifyService.begin(ObjectifyService.java:29) I thought it might be because I was using a slightly older version of the AppEngine, so I updated that to 1.3.3, but still get the same result. Now my assumption is that there's something wrong with my configuration (I'm missing a jar I need?) but don't know which one. Can anyone tell me what jar com/google/appengine/api/datastore/ReadPolicy$Consistency is in? On Wed, Apr 21, 2010 at 11:10 PM, Jeff Schnitzer j...@infohazard.org wrote: Fixed. Although you might prefer to issue a batch get() operation instead of the query. There might be a performance difference - I'm not sure. Jeff On Wed, Apr 21, 2010 at 6:46 PM, Jeff Schnitzer j...@infohazard.org wrote: Looks like you found a bug. I should be able to have a unit test and a fix checked in tonight. Sorry about that! Jeff On Wed, Apr 21, 2010 at 1:43 PM, Larry White ljw1...@gmail.com wrote: Hi, I'm trying to pass in a collection of Strings to be used in a filter using Objectify (which I LOVE, btw). I'm doing it like so: QuerySNote query = ofy.query(SNote.class).filter(id IN, results).limit(limit).offset(offset).order(-timestamp); where the results parameter is a non-empty ArrayListString. I'm getting the exception: 64951 [btpool0-4] ERROR com.deathrayresearch - java.lang.IllegalArgumentException: A collection of values is required. at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:153) at com.google.appengine.api.datastore.Query$FilterPredicate.init(Query.java:543) at com.google.appengine.api.datastore.Query.addFilter(Query.java:231) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:102) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:28) The id parameter contains Strings and I think an ArrayListString qualifies as a collection of values. Can anyone tell me what I'm doing wrong? thanks much Larry -- 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.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
[appengine-java] Re: noob question: HTML rendering as escaped in HTML widget
doh. I was setting the HTML content with setText() instead of setHTML(). so, uh, nevermind. thanks On Thu, Apr 22, 2010 at 5:54 PM, Larry White ljw1...@gmail.com wrote: I have a text string created in the RichTextArea widget. When viewed in that widget it shows as HTML with all the expected formatting (bold,etc.) When viewed in my com.google.gwt.user.client.ui.HTML widget it renders as if escaped, with all the markup visible. I've checked in Firebug and it doesn't appear that there's anything interesting going on with stylesheets - just setting widths, alignment and size. I never added a gwt-HTML class to my stylesheets so the actual div representing the HTML widget shows as having no style set. Any thoughts, etc. much appreciated. thank you! -- 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] Re: Eclipse hangs at startup, Ubuntu
I believe this is a problem not in Eclipse but in Gtk ... On Mar 4, 4:15 am, Steven Jay Cohen steven.jay.co...@gmail.com wrote: I can confirm this same behavior on my GWT projects not AppEngine. It's sporadic and can be addressed exactly as described in this post. I am using Eclipse 3.5.2 64bit, Mac OSX 10.6.2, GPE, Subversive, and PDT plugins. Steven --www.stevenjaycohen.com On Mar 2, 11:17 am, Rajeev Dayal rda...@google.com wrote: That message corresponds to GPE's attempt to update your project's war/WEB-INF/lib folder on project classpath initialization, which occurs on Eclipse startup. Sometimes, problems can occur if there is some sort of lock being held on the files in that directory (such as by a version control plugin). Do you have any version control plugins installed in Eclipse? We've actually made some changes so that the update of war/WEB-INF/lib occurs on classpath change instead of classpath init. That should alleviate this sporadic issue. The fix will be available in a forthcoming version of GPE.On Mon, Mar 1, 2010 at 2:34 AM, Jeff Schnitzer j...@infohazard.org wrote: Did anyone ever resolve this in a consistent way? I recently upgraded from OSX 10.5 to 10.6, and now my Eclipse (Cocoa 64-bit, as I was using before) hangs on most startups. I see the Updating MyProje... - 1.3.1 in the bottom right corner and the entire window is locked up. Only way out is to Force Quit. It doesn't happen on every startup. I can often get it working after a few tries. This was a brand-new OS install on a new HD. I did, however, copy my eclipse directory over by hand, and the workspace was imported as part of my user data. Jeff On Jan 14, 12:49 am, pgoetz pgo...@pgoetz.de wrote: Hi group, I have a problem with the Google Eclipse Plugin. I am developing an application for the Google App Engine (Eclipse JEE Galileo, Google Plugin 1.2.0, Google App Engine SDK 1.3.0, OS Ubuntu 9.10). Yesterday I reinstalled the Google Plugin and Google App Engine SDK after I got the same problem with an older version of the SDK. Today I started Eclipse and after the workspace comes up, I see the message Updating myproject/...ne - 1.3.0 in the status bar of Eclipse. I suspect that it means Updating myproject/Google App Engine - 1.3.0. With this message my whole Eclipse freezes and I can only kill the process. Does anybody know why that happens? And how can I prevent the plugin from performing the update? I had the same problem yesterday with the old setup and the solution was to remove the folders for the plugin from Eclipse plugins and features directories and to reinstall the plugin. Then it worked yesterday and crashed this morning. Thank you very much for your help! Greetings, Peter -- 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%2B 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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Can pm.makePersistentAll() help me write 12,000 objects?
my experience with a relatively simple application via JDO makePersistentAll() was that I got DataStore Operation Timeout exceptions with batch sizes of approx 200-300 objects ... On Feb 24, 1:48 pm, Guillermo Schwarz guillermo.schw...@gmail.com wrote: I think we can safely assume that the programmer was trying to speed up things a little by writing 12 thousand objects in a single operation. Now if that gets to be faster or slower than writing each object separately, it is a matter of the internal implementation of the data store. I prefer to do no hacks, but OTOH it is better sometimes to be clear bout what you want (API wise). The point here is that the programmer wants to insert 15 thousand objects in a second, you seem to imply that is possible. While it's an interesting thought exercise to see if BigTable can do it through App Engine's interface (hint: it can, globally, easily). I rest my case ;-) Do we need to do anything to test that? Is there anything we could do to help? Cheers, Guillermo. On 24 feb, 18:06, Ikai L (Google) ika...@google.com wrote: Simple key-only writes can definitely do it, but there's a few places where you can introduce overhead: - serialization - network I/O - indexes My point wasn't necessarily that it wasn't possible. makePersistentAll does use a batch write, and there are definitely sites that can do 12,000+ writes a second (and well above that), but I don't know of any that will attempt to do that in a single request. While it's an interesting thought exercise to see if BigTable can do it through App Engine's interface (hint: it can, globally, easily), I can't think of a single use case for a site to need to do this all the time and with the sub-second requirement. I think it's reasonable to ask why this design exists and why the requirements exist and rethink one or the other. On Wed, Feb 24, 2010 at 12:35 PM, Guillermo Schwarz guillermo.schw...@gmail.com wrote: Ikai, Maybe you are right. Maybe not. I'm not an expert in datastore internals, but here is my point of view. This paper claims that Berkeley DB Java edition can insert about 15,000 records per second. http://www.oracle.com/database/docs/bdb-je-architecture-whitepaper.pdf The graphic is on page 22. The main reason they claim to be able to do that is that they don't need to actually sync the write to disk, they can queue the write, update in-memory data and write a log file. Writing the log file is for transactional purposes and it is the only write really needed.That is pretty fast. Cheers, Guillermo. On 24 feb, 16:51, Ikai L (Google) ika...@google.com wrote: I also remember hearing (and this is not verified so don't quote me on this or come after me if I'm wrong) from a friend of mine running KV stores in production that there were issues with certain distributed key/value stores that actually managed to slow down as a function of the number of objects in the store - and Tokyo Tyrant was on his list. A key property of scalable stores is that the opposite of this is true. 12,000 synchronous, serialized writes in a single sub-second request is pretty serious. I am not aware of a single website in the world that does this. On Wed, Feb 24, 2010 at 11:35 AM, Jeff Schnitzer j...@infohazard.org wrote: I think this is actually an interesting question, and brings up a discussion worth having: Is datastore performance reasonable? I don't want to make this a discussion of reliability, which is a separate issue. It just seems to me that the datastore is actually kinda pokey, taking seconds to write a few hundred entities. When people benchmark Tokyo Tyrant, I hear numbers thrown around like 22,000 writes/second sustained across 1M records: http://blog.hunch.se/2009/02/28-tokyo-cabinet You might argue that the theoretical scalability of BigTable's distributed store is higher... but we're talking about two full orders of magnitude difference. Will I ever near the 100-google-server equivalent load? Could I pay for it if I did? 100 CPUs (measured) running for 1 month is about $7,200. Actual CPU speed is at least twice the measured rate, so a single Tokyo Tyrant is theoretically equivalent to almost $15,000/month of appengine hosting. Ouch. Maybe this isn't an apples to apples comparison. Sure, there aren't extra indexes on those Tyrant entities... but to be honest, few of my entities have extra indexes. What other factors could change this analysis? Thoughts? BTW Tim, you may very well have quite a few indexes on your entities. In JDO, nearly all single fields are indexed by default. You must explicitly add an annotation to your fields to make them unindexed. With Objectify, you can declare your entity as
[appengine-java] Re: GAE Alternatives?
I have to concur with Corby on this ... I was initially attracted to the end-to-end solution that GAE offered integrated as it is with Eclipse. In practice I have found it very frustrating to develop on GAE because of: - the class white list and 3rd party framework usage (i.e Spring) - the truly frustrating metering exceptions that the Datastore and Servlet container throw, coding around those is painful... you have to invent your own transaction compensation... - the lack of any Java based bullk load facility for DS (I had to write my own) (which is when you trip up over the metering exceptions...) - the limitations of mapping BigTable under JPA/JDO - the paucity of debugging on the production server (the log WUI is woeful for this) We have reached the stage with our app where we will probably move it off GAE and onto EC2 where despite the additional work involved in dealing with AMI lifecycle vs .war we are more in control of the underlying environment (although I am sure there are a similar, but different, set of hiccups and hurdles awaiting us ...) - Larry On Feb 24, 10:17 am, Corby cep...@gmail.com wrote: On Feb 24, 10:39 am, A1programmer derrick.simp...@gmail.com wrote: Are there any good alternatives to Google App Engine out there? I am finding that I cannot rely on GAE for a production quality environment. I am very excited about the future of Google App Engine, but I am in the same boat, Derrick. I am working with a startup that tried to get up and running on Google App Engine, but we have since migrated to Spring Cloud Foundry, which runs on Amazon's EC2 architecture. It is a heavier-weight environment, and the monthly costs are higher, but the development costs are much, much cheaper, and we have far fewer unexpected Production problems. There's a huge attraction to the tiny resource requirement to maintain a WAR file deployment versus the large requirements of a EC2 style VM. I agree, but for me there is an even larger attraction to having predictable behavior in our Production environment, and we can't currently get that from GAE. Some people are happy with BigTable as a general persistence solution, but we are not. The whitelisted classloader makes every attempt to integrate with third-party libraries an adventure. And the nature of GAE's on-demand provisioning makes it difficult to guarantee the response times we want for our customers. The crushing blow to our morale is code that runs perfectly in our development environment, but breaks when deployed to GAE. I have a lot of faith in the Google team, and I can't wait to see what GAE looks like a year from now. But right now, I can only recommend it for the simplest of internal apps, nothing client-facing. -- 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] Re: Could not deploy my App in Google App Engine!
but it works locally ... I have recently started getting a similar error where upload/deploy fails while parsing datastore-indexes.xml claims there is an error with the .xsd in the toolkit .jar ... On Feb 11, 1:37 pm, Brian bwa...@gmail.com wrote: Wild guess, but a ' in a path can't help things On Feb 11, 8:32 am, Babgali babuvi...@gmail.com wrote: I am very new to GWT world! I am getting below exception when I am trying to deploy in Google App Engine. Error:- An internal error occurred during: Deploying Babu'sFirstGWTApp to Google. Received IOException parsing the input stream for C:/GWTWorkspace/ Babu'sFirstGWTApp/war\WEB-INF/web.xml However it's working locally! Can any one 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-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] Re: javax.annotation.Resource Spring 3.0.0.Release declarative DI on Google App Engine
Not sure if this helps or not but you cannot use the Spring context:annotation-config / markup in your GAE Spring applications ... This will of course work locally but because the CommonAnnotationBeanPostProcessor attempts to load javax.annotation.Resource (and fails) then no annotation processing will occur ... there are 2 workarounds to this: 1) use the init-method=... attribute of the bean ... / element or ... 2) directly load the appropriate annotation processing beans like so: bean class=org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor / bean class=org.springframework.context.annotation.ConfigurationClassPostProcessor / bean class=org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor property name=initAnnotationType value=javax.annotation.PostConstruct / property name=destroyAnnotationType value=javax.annotation.PreDestroy / /bean This avoids the attempt to load the @Resource class ... On Jan 22, 2:21 am, Vijay Bansal vijaybansal3...@gmail.com wrote: This is of some help to those who are trying for CXF-RS apps on GAEhttp://sinister2010.wordpress.com/2010/01/22/cxf-rs-on-google-app-eng... On Jan 14, 12:43 am, Jason (Google) apija...@google.com wrote: 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.- 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-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] Re: I get an InvocationTargetException the first time I query the datastore after a new JVM instance starts
thanks, then I guess something else is causing GAE VFS to fail ... bummer :( On Jan 25, 1:53 pm, Toby Reyelts to...@google.com wrote: Yeshttp://www.google.com/codesearch/p?hl=en#YXcrkXezIpQ/trunk/src/com/go... . On Mon, Jan 25, 2010 at 4:38 PM, Larry Cable larry.ca...@gmail.com wrote: are you saying that the exception is caught, logged and not (re)thrown such that application code is executed normally as opposed to being returned thru, via the thrown exception? On Jan 25, 12:41 pm, John Patterson jdpatter...@gmail.com wrote: It is logged at INFO level because It is normal - if not annoying - so just ignore it. On 26 Jan 2010, at 03:14, mianor wrote: I got the same exception with TaskQueue API. The code works fine on local dev with no exception but doesn't work when deployed on GAE. On Jan 21, 5:56 pm, Larry Cable larry.ca...@gmail.com wrote: interestingly enough I get essentially the same exception when calling into the TaskQueue API ... I 01-21 02:44PM 41.437 com .google .appengine.repackaged.com.google.common.base.FinalizableReference Queue $SystemLoader loadFinalizer: Not allowed to access system class loader. I 01-21 02:44PM 41.455 com .google .appengine.repackaged.com.google.common.base.internal.Finalizer getInheritableThreadLocalsField: Couldn't accessThread.inheritableThreadLocals.Referencefinalizerthreadswill inheritthreadlocal values. I 01-21 02:44PM 41.459 com .google .appengine.repackaged.com.google.common.base.FinalizableReference Queue init :Failedtostartreferencefinalizerthread .Referencecleanupwillonlyoccurwhennewreferencesarecreated. java.lang.reflect.InvocationTargetException at com.google.appengine.runtime.Request.process-6da5babfb78cdcdd (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:42) at com .google .appengine.repackaged.com.google.common.base.FinalizableReference Queue.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.cli nit (ProtocolSupport.java:55) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.init(TaskQueuePb.java:662) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest$1.init(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.clinit(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.QueueImpl.createAddRequest (QueueImpl.java:168) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:233) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:225) at com .newatlanta .appengine.datastore.CachingDatastoreService.queueWatchDogTas k (CachingDatastoreService.java:443) at com.newatlanta.appengine.datastore.CachingDatastoreService.clinit (CachingDatastoreService.java:139) at com.newatlanta.appengine.vfs.provider.GaeFileObject.clinit (GaeFileObject.java:61) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.createFile (GaeFileSystem.java:47) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:343) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:314) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.resolveFile (GaeFileSystem.java:55) at org .apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:86) at org .apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:66) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:692) at com .newatlanta.appengine.vfs.provider.GaeFileSystemManager.resolveFile (GaeFileSystemManager.java:125) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:648
[appengine-java] Re: deleting all entries in datastore
+1 especially for large tables On Jan 22, 10:47 am, Locke locke2...@gmail.com wrote: It would be good to have the ability to do this from within the GUI. Other database management tools have empty table options, so a delete all of this Kind feature would be appropriate. On Jan 22, 12:59 pm, John Patterson jdpatter...@gmail.com wrote: Here is the code I use to delete one kind at a time - it batches the keys into Lists of 100 to avoid datastore exceptions. Iterables is from Google collections. Query query = new Query(kind); query.setKeysOnly(); DatastoreService datastore = ... IterableEntity entityIterator = datastore.prepare(query).asIterable(); IterableKey keyIterator = Iterables.transform(entityIterator, new FunctionEntity, Key() { public Key apply(Entity arg0) { return arg0.getKey(); } }); IterableListKey partitioned = Iterables.partition(keyIterator, 100); for (ListKey sublist : partitioned) { datastore.delete(sublist); } On 22 Jan 2010, at 15:10, mete wrote: Suppose I have a class A and I have stored some instance of it in the datastore. Then I change it, but I keep the name. How I can delete all the previous data in the datastore, if I simply do a query and use deleteAll, it gives an error (I guess because I changed the name of some fields). Thank you. Mete -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en .- 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-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] Re: I get an InvocationTargetException the first time I query the datastore after a new JVM instance starts
I wish that were the case ... however GAE VFS does not function when hosted (but does locally) the only apparent difference is this exception ... On Jan 21, 8:18 pm, John Patterson jdpatter...@gmail.com wrote: These exceptions are a normal part of startup and logged at the INFO level for that reason. They are just slightly annoying but harmless so ignore them. On 22 Jan 2010, at 05:56, Larry Cable wrote: interestingly enough I get essentially the same exception when calling into the TaskQueue API ... I 01-21 02:44PM 41.437 com .google .appengine.repackaged.com.google.common.base.FinalizableReferenceQueue $SystemLoader loadFinalizer: Not allowed to access system class loader. I 01-21 02:44PM 41.455 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 01-21 02:44PM 41.459 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-6da5babfb78cdcdd (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:42) 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.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.init(TaskQueuePb.java:662) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest$1.init(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.clinit(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.QueueImpl.createAddRequest (QueueImpl.java:168) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:233) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:225) at com .newatlanta .appengine.datastore.CachingDatastoreService.queueWatchDogTask (CachingDatastoreService.java:443) at com.newatlanta.appengine.datastore.CachingDatastoreService.clinit (CachingDatastoreService.java:139) at com.newatlanta.appengine.vfs.provider.GaeFileObject.clinit (GaeFileObject.java:61) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.createFile (GaeFileSystem.java:47) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:343) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:314) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.resolveFile (GaeFileSystem.java:55) at org .apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:86) at org .apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:66) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:692) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.resolveFile (GaeFileSystemManager.java:125) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:648) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:604) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.init (GaeFileSystemManager.java:90) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.init (GaeFileSystemManager.java:73) at com.newatlanta.appengine.vfs.provider.GaeVFS.getManager (GaeVFS.java:74) at com.newatlanta.appengine.vfs.provider.GaeVFS.resolveFile (GaeVFS.java:171) at com.newatlanta.appengine.nio.file.GaePath.init(GaePath.java:102) at com.newatlanta.appengine.nio.file.GaeFileSystem.getPath (GaeFileSystem.java:54) at com.newatlanta.repackaged.java.nio.file.Paths.get(Paths.java:70) at com.newatlanta.appengine.servlet.GaeVfsServlet.init (GaeVfsServlet.java:139) at javax.servlet.GenericServlet.init(GenericServlet.java:215
[appengine-java] Re: I get an InvocationTargetException the first time I query the datastore after a new JVM instance starts
interestingly enough I get essentially the same exception when calling into the TaskQueue API ... I 01-21 02:44PM 41.437 com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue $SystemLoader loadFinalizer: Not allowed to access system class loader. I 01-21 02:44PM 41.455 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 01-21 02:44PM 41.459 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-6da5babfb78cdcdd (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:42) 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.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.init(TaskQueuePb.java:662) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest$1.init(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.TaskQueuePb $TaskQueueAddRequest.clinit(TaskQueuePb.java:1402) at com.google.appengine.api.labs.taskqueue.QueueImpl.createAddRequest (QueueImpl.java:168) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:233) at com.google.appengine.api.labs.taskqueue.QueueImpl.add (QueueImpl.java:225) at com.newatlanta.appengine.datastore.CachingDatastoreService.queueWatchDogTask (CachingDatastoreService.java:443) at com.newatlanta.appengine.datastore.CachingDatastoreService.clinit (CachingDatastoreService.java:139) at com.newatlanta.appengine.vfs.provider.GaeFileObject.clinit (GaeFileObject.java:61) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.createFile (GaeFileSystem.java:47) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:343) at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile (AbstractFileSystem.java:314) at com.newatlanta.appengine.vfs.provider.GaeFileSystem.resolveFile (GaeFileSystem.java:55) at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:86) at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:66) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:692) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.resolveFile (GaeFileSystemManager.java:125) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:648) at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:604) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.init (GaeFileSystemManager.java:90) at com.newatlanta.appengine.vfs.provider.GaeFileSystemManager.init (GaeFileSystemManager.java:73) at com.newatlanta.appengine.vfs.provider.GaeVFS.getManager (GaeVFS.java:74) at com.newatlanta.appengine.vfs.provider.GaeVFS.resolveFile (GaeVFS.java:171) at com.newatlanta.appengine.nio.file.GaePath.init(GaePath.java:102) at com.newatlanta.appengine.nio.file.GaeFileSystem.getPath (GaeFileSystem.java:54) at com.newatlanta.repackaged.java.nio.file.Paths.get(Paths.java:70) at com.newatlanta.appengine.servlet.GaeVfsServlet.init (GaeVfsServlet.java:139) at javax.servlet.GenericServlet.init(GenericServlet.java:215) at org.mortbay.jetty.servlet.ServletHolder.initServlet (ServletHolder.java:433) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java: 256) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize (ServletHandler.java:612) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext
[appengine-java] Re: 500 Server Error adding records to Datastore
take a look in the application logs (if you have the app deployed in GAE and you are not testing locally) you will see the exception that caused the problem ... My guess, based upon what you state in your post is that it is either a Datastore operation timeout (5 secs) or the processing quota timeout (30 secs) per request... On Dec 22, 10:41 am, antiac ant...@gmail.com wrote: Hi, I'am new in Google App Engine, I've in my servlet this code: PersistenceManager pm = PMF.get().getPersistenceManager(); try { addRecord(pm,1010,BANCO DI NAPOLI S.P.A.); ... other 900 record } finally { pm.close(); } public void addRecord(PersistenceManager pm, String abi, String banca) { Banche banche = new Banche(abi,banca); pm.makePersistent(banche); } but executing servlet appear after 30 seconds 500 Server Error page. Can u help me, Thanks -- Antoniohttp://www.blia.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-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] Re: What's the right way to use PersistenceManager?
I am not sure it/there is a right way, but in my application I am injecting (via Spring) a (singleton) PMF into my Controller(s) (which are singletons) and instantiating a PM for each (concurrent) query/request... On Dec 4, 11:30 pm, Fan Lin linfa...@gmail.com wrote: Hi, I'm new in JDO, so I think this problem may sounds stupid... I'm working on my application on App-engine, and feel really confused about how to use the PersistenceManager in my app... 1) At the very beginning I tried to maintain only one static pm instance in my app, but I found that when I try to update the entities in datastore, it does not write back, since I do not close the pm. 2) Then, I tried to get a new pm in every request, and after the request I close it. But I still store the pm as a static field in a DaoBase class. the code looks like: PersistenceManager pm = PFM.get().getPersistenceManager(); DaoBase.setPm(pm); do the request... DaoBase.getPm().close(); DaoBase.setPm(null); But when multiple requests come concurrently, things becomes messy and sometimes the DaoBase.getPm() will returns null during a request. 3) Use new pm each time when reading the datastore, then detach the object from pm, close the pm. Then during update time, use a new pm to update it. But the problem here is when there is some owned relationship between datastore entities, a detatched object will not fetch the data automatically, like: / class Address { } class Employee { private ListAddress addressList; public ListAddress getAddressList() { return addressList; }} /// the getAddressList() will always return null. So...What is the right way to use PersistenceManager? -- 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] Re: problems with SDK 1.2.8 and (local) task queues timing out...
Hi Max, after sleeping on it, it became apparent that as you describe the timeout is in fact in the client and not the execution of the (servlet) task itself ... On Dec 7, 10:54 am, Max Ross (Google) maxr+appeng...@google.com wrote: Local task execution is using the local UrlFetchService implementation with its default timeout: 5 seconds. So, if the url that your task hits takes more than 5 seconds to respond you'll see this exception. However, this exception is from the client of the task url, not the task execution itself. The client will timeout after 5 seconds but the task should still execute to completion - we don't interrupt it. Please let me know if that's not the case. so I concur with your assertion above ... Now, 5 seconds is clearly not enough time since the request limit for apps is 30 seconds. This is a bug, and it's already fixed. It should go out with the next SDK. In the meantime just try to ignore the timeouts. great thanks ... Since I am using GAE-VFS and tasks in order to upload, parse and persist data via JDO into the DataStore, I anticipate that the Servlet/Task will potentially exceed the per-request quota and throw ... I was planning on catching this and scheduling additional tasks until all the file processing is complete ... any thoughts on this ... do you see any problems in doing so? As for retries, this is a known limitation:http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta... We'll get this brought in line with production shortly. Thanks, and sorry for the trouble. no problem! ... Thanks for the response! Max On Sun, Dec 6, 2009 at 9:57 PM, Tristan sp00s...@gmail.com wrote: I've seen this as well. I've also noticed that if I purposefully make a task fail (by returning any HTTP status code outside of the range 200-299), it doesn't get added back to queue for retrying. This used to work in 1.2.6. -Tristan On Dec 6, 4:18 pm, Larry Cable larry.ca...@gmail.com wrote: I just updated from 1.2.6 to 1.2.8 and my application code has started failing locally. I am using task queue's in order to process uploaded files, this worked in 1.2.6 (although you had to manually fire the task queue from the _ah admin console) Now, it is failing under 1.2.8 (as it seems as though it is now automatically starting the queue) with the following exception: Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an unhandled Exception: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out. at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch (LocalURLFetchService.java:214) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:53) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:46) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) Dec 7, 2009 12:08:57 AM org.quartz.core.ErrorLogger schedulerError SEVERE: Job (default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.google.apphosting.api.ApiProxy $ApplicationException: ApplicationError: 5: http method POST against URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out.] at org.quartz.core.JobRunShell.run(JobRunShell.java:206) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) * Nested Exception (Underlying Cause) --- com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out. at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch (LocalURLFetchService.java:214) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:53) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:46) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) it implies that there is some form of timeout occuring ... since the app code has not changed and is not apparently getting invoked at all, I am somewhat at loss to know how to resolve this! Has anyone else seen these problems? -- 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
[appengine-java] Re: problems with SDK 1.2.8 and (local) task queues timing out...
sorry I should have been more precise, essentially I am concerned about blowing the 30sec per request processing/duration limit previously I was bulk uploading csv files and parsing them into POJOs then persisting them via JDO to pre-populate my app data ... I was encountering both the 5sec DS operation and 30sec processing quota exceptions with this model ... So, all I do initially is upload the CSV in Gae VFS ... then I schedule a task the task then batches lines from the file, parses, then pesists them ... if it gets an exception then it quickly (I hope) (repeatedly) reschedules another task to upload ... Thanks - Larry On Dec 7, 11:22 am, Max Ross (Google) maxr+appeng...@google.com wrote: Regarding the per-request quota Are you worried about the number of requests or the duration of those requests? On Mon, Dec 7, 2009 at 11:17 AM, Larry Cable larry.ca...@gmail.com wrote: Hi Max, after sleeping on it, it became apparent that as you describe the timeout is in fact in the client and not the execution of the (servlet) task itself ... On Dec 7, 10:54 am, Max Ross (Google) maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: Local task execution is using the local UrlFetchService implementation with its default timeout: 5 seconds. So, if the url that your task hits takes more than 5 seconds to respond you'll see this exception. However, this exception is from the client of the task url, not the task execution itself. The client will timeout after 5 seconds but the task should still execute to completion - we don't interrupt it. Please let me know if that's not the case. so I concur with your assertion above ... Now, 5 seconds is clearly not enough time since the request limit for apps is 30 seconds. This is a bug, and it's already fixed. It should go out with the next SDK. In the meantime just try to ignore the timeouts. great thanks ... Since I am using GAE-VFS and tasks in order to upload, parse and persist data via JDO into the DataStore, I anticipate that the Servlet/Task will potentially exceed the per-request quota and throw ... I was planning on catching this and scheduling additional tasks until all the file processing is complete ... any thoughts on this ... do you see any problems in doing so? As for retries, this is a known limitation: http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta... We'll get this brought in line with production shortly. Thanks, and sorry for the trouble. no problem! ... Thanks for the response! Max On Sun, Dec 6, 2009 at 9:57 PM, Tristan sp00s...@gmail.com wrote: I've seen this as well. I've also noticed that if I purposefully make a task fail (by returning any HTTP status code outside of the range 200-299), it doesn't get added back to queue for retrying. This used to work in 1.2.6. -Tristan On Dec 6, 4:18 pm, Larry Cable larry.ca...@gmail.com wrote: I just updated from 1.2.6 to 1.2.8 and my application code has started failing locally. I am using task queue's in order to process uploaded files, this worked in 1.2.6 (although you had to manually fire the task queue from the _ah admin console) Now, it is failing under 1.2.8 (as it seems as though it is now automatically starting the queue) with the following exception: Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an unhandled Exception: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out. at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch (LocalURLFetchService.java:214) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:53) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:46) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) Dec 7, 2009 12:08:57 AM org.quartz.core.ErrorLogger schedulerError SEVERE: Job (default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.google.apphosting.api.ApiProxy $ApplicationException: ApplicationError: 5: http method POST against URLhttp://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out.] at org.quartz.core.JobRunShell.run(JobRunShell.java:206) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) * Nested Exception (Underlying Cause
[appengine-java] problems with SDK 1.2.8 and (local) task queues timing out...
I just updated from 1.2.6 to 1.2.8 and my application code has started failing locally. I am using task queue's in order to process uploaded files, this worked in 1.2.6 (although you had to manually fire the task queue from the _ah admin console) Now, it is failing under 1.2.8 (as it seems as though it is now automatically starting the queue) with the following exception: Dec 7, 2009 12:08:57 AM org.quartz.core.JobRunShell run SEVERE: Job default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an unhandled Exception: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out. at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch (LocalURLFetchService.java:214) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:53) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:46) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) Dec 7, 2009 12:08:57 AM org.quartz.core.ErrorLogger schedulerError SEVERE: Job (default.a7f0abc6-ed81-4fa4-96f1-c09048a99883 threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.google.apphosting.api.ApiProxy $ApplicationException: ApplicationError: 5: http method POST against URL http://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out.] at org.quartz.core.JobRunShell.run(JobRunShell.java:206) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) * Nested Exception (Underlying Cause) --- com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://localhost:8080/admin/gae-tasks/upload/csv/irs/processor.task timed out. at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch (LocalURLFetchService.java:214) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:53) at com.google.appengine.api.labs.taskqueue.dev.UrlFetchJob.execute (UrlFetchJob.java:46) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:520) it implies that there is some form of timeout occuring ... since the app code has not changed and is not apparently getting invoked at all, I am somewhat at loss to know how to resolve this! Has anyone else seen these problems? -- 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] Re: Eclipse start server error after update to 1.2.6
In eclipse select Run Configurations... from the Run main menu ... in the dialog that pops up, you you see a G icon in the tree view on the left and a list of configurations under that, (at least one), select your personal favorite, click on the(x) arguements tab and add the appropriate config, on my system it's: -javaagent:C:\Program Files\eclipse\plugins \com.google.appengine.eclipse.sdkbundle_1.2.8.v200912040616\appengine- java-sdk-1.2.8\lib\agent\appengine-agent.jar On Dec 6, 3:21 pm, Tahir Akram tahirakra...@gmail.com wrote: Hi guys; I am getting the same issue as I just upgraded my sdk to 1.2.8. Where can I find the launch configurations for app engine. Please help. I am getting following exception while running the server. Unable to locate the App Engine agent. Please use dev_appserver, KickStart, or set the jvm flag: -javaagent:sdk_root/lib/agent/ appengine-agent.jar On Oct 20, 3:00 am, Kris Carle kbca...@gmail.com wrote: Hi Keith and Peter, This helped me, thanks. It would help others if the release notes of the eclipse pluginhttp://code.google.com/eclipse/mentionedthat upgrading would break existing projects. I was assuming that I had broken something until I remembered that I upgraded recently. In case it helps here is the VM argument I used. -javaagent:/Applications/eclipse/plugins/ com.google.appengine.eclipse.sdkbundle_1.2.6.v200910131704/appengine- java-sdk-1.2.6/lib/agent/appengine-agent.jar Thanks, -Kris On Oct 14, 2:13 pm, Keith Platfoot kplatf...@google.com wrote: Hi Peter, As the message indicates, the local development server in App Engine 1.2.6 now requires the use of a Java agent. If you're using the Google plugin, this is easy to correct. Open your existing launch configuration. You should see an error message at the top about the missing Java agent. Copy and paste the entire -javaagent argument from the error message into the VM Arguments field on the launch configuration's Arguments tab. The error should disappear, and you should then able to save and run the launch configuration successfully. Let me know if you run into any other problems, Keith On Tue, Oct 13, 2009 at 9:12 PM, Peter Liu tinyee...@gmail.com wrote: I update eclipse plugin and downloaded the new SDK, changed the project settings to use the new SDK, and get this error when starting the server. Switching back to 1.2.5 fixes the problem. Did I missed some steps? java.lang.RuntimeException: Unable to locate the App Engine agent. Please use dev_appserver, KickStart, or set the jvm flag: - javaagent:sdk_root/lib/agent/appengine-agent.jar at com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled (DevAppServerFactory.java:102) at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer (DevAppServerFactory.java:77) at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer (DevAppServerFactory.java:38) at com.google.appengine.tools.development.DevAppServerMain $StartAction.apply(DevAppServerMain.java:153) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs (Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.init (DevAppServerMain.java:113) at com.google.appengine.tools.development.DevAppServerMain.main (DevAppServerMain.java:89) Caused by: java.lang.NoClassDefFoundError: com/google/appengine/tools/ development/agent/AppEngineDevAgent at com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled (DevAppServerFactory.java:98) ... 6 more Caused by: java.lang.ClassNotFoundException: com.google.appengine.tools.development.agent.AppEngineDevAgent at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 7 more- 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-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] Re: Bug in JDO compiled/named query support
On Oct 27, 1:14 am, datanucleus andy_jeffer...@yahoo.com wrote: It's a typo in PM proxy. Fixed in DN SVN thx (in DN 2.0, since DN 1.1 is not developed now). Obviously you could just use a *normal* PM instead of a proxy PM. thanks Andy... while I have your attention ... :) actually I think this one belongs to Jason ... there is a bug in org.datanucleus.store.appengine.MetaDataValidator in the validatePrimaryKey() method that causes JDO classes with multiple primary keys (and supporting object id class) classes to fail validation on 1st access ... thre method throws an exception if there is more than one field in the class annotated as a primary key ... --~--~-~--~~~---~--~~ 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: Bug in JDO compiled/named query support
I am a little bit confused ... and rantincreasingly frustrated by the many limitations of GAE as a platform for developing serious applications .../rant Both JDO and the DN implementation support multiple primary keys when using IdentityType.APPLICATION and specifying an objectIdClass containing multiple (String) fields that maps onto the fields of the entity that are appropriately annotated ... This appears to work, with the exception (intentional pun:) that when validating the metadata the PK exception is thrown ... subsequent queries on the table appear to succeed ... while the url documentation could be read as the datastore only supports a single primary key field I personally don't see anywhere therein where it explicity states this ... On Oct 27, 10:49 am, Max Ross (Google) maxr+appeng...@google.com wrote: That is intentional, the App Engine datastore only supports a single primary key field so we enforce this restriction in the JDO/JPA implementation as well. The limitations are described in detail here:http://code.google.com/appengine/docs/java/datastore/creatinggettinga... On Tue, Oct 27, 2009 at 8:54 AM, Larry Cable larry.ca...@gmail.com wrote: On Oct 27, 1:14 am, datanucleus andy_jeffer...@yahoo.com wrote: It's a typo in PM proxy. Fixed in DN SVN thx (in DN 2.0, since DN 1.1 is not developed now). Obviously you could just use a *normal* PM instead of a proxy PM. thanks Andy... while I have your attention ... :) actually I think this one belongs to Jason ... there is a bug in org.datanucleus.store.appengine.MetaDataValidator in the validatePrimaryKey() method that causes JDO classes with multiple primary keys (and supporting object id class) classes to fail validation on 1st access ... thre method throws an exception if there is more than one field in the class annotated as a primary key ...- 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] Bug in JDO compiled/named query support
I think I have found a bug in the datanucleus JDO named query code (which I am happy to file a jira report on if others agree)... imagine the following: @Queries { value = { @Query(name=foo value=select from FOO...) } ) public class Foo { //... } at some point later in the code is uttered: Query q = pm.newNamedQuery(Foo.class, Foo); now this should cause the query named Foo in the annotations above to be found and prepared for later execution... such that: q.execute(...) would execute the named query ... except it doesn't ... it throws: org.datanucleus.query.expression.PrimaryExpressionIsVariableException ... this is because the code in org.datanucleus.jdo.JDOPersistenceManagerProxy reads: public Query newNamedQuery(Class cls, String filter) { return getPM().newQuery(cls, filter); } and should in fact read: return getPM().newNamedQuery(cls, name); The error results in the name of the query being set as a filter on an empty query, which is subsequently auto populates, and sets the name of the query as a filter ... hence the exception. --~--~-~--~~~---~--~~ 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 PrimaryKey class problems ... NPE in pre-comment key class is null
Hi Jason, I have looked into this somewhat, and I think there is a bug (or at least a naive assumption) in MetaDataValidator.validatePrimaryKey() around line: 331 private AbstractMemberMetaData validatePrimaryKey() { int[] pkPositions = acmd.getPKMemberPositions(); if (pkPositions == null) { throw new DatastoreMetaDataException(acmd, No primary key defined.); } if (pkPositions.length != 1) { throw new DatastoreMetaDataException(acmd, More than one primary key field.); } int pkPos = pkPositions[0]; AbstractMemberMetaData pkMemberMetaData = acmd.getMetaDataForManagedMemberAtAbsolutePosition(pkPos); Class? pkType = pkMemberMetaData.getType(); if (pkType.equals(Long.class)) { noParentAllowed = true; } else if (pkType.equals(String.class)) { if (!DatastoreManager.isEncodedPKField(acmd, pkPos)) { noParentAllowed = true; } else { // encoded string pk if (hasIdentityStrategy(IdentityStrategy.SEQUENCE, pkMemberMetaData)) { throw new DatastoreMetaDataException( acmd, pkMemberMetaData, IdentityStrategy SEQUENCE is not supported on encoded String primary keys.); } } } else if (pkType.equals(Key.class)) { if (hasIdentityStrategy(IdentityStrategy.SEQUENCE, pkMemberMetaData)) { throw new DatastoreMetaDataException( acmd, pkMemberMetaData, IdentityStrategy SEQUENCE is not supported on primary keys of type + Key.class.getName()); } } else { throw new DatastoreMetaDataException( acmd, pkMemberMetaData, Unsupported primary key type: + pkType.getName()); } return pkMemberMetaData; } this method assumes that there is a single PK field: if (pkPositions.length != 1) ... I think that what should really happen here is that each pk field should be validated/matched against the key objject id key class? let me know, I can file a bug, and perhaps even supply a fix ... On Oct 14, 2:53 pm, Jason (Google) apija...@google.com wrote: Can you go into more of what you're seeing? That definitely doesn't sound right. You have a kind which uses a String (or String-encoded key?) as its primary key, but you're not able to query for it? By runtime fails, does that mean you're seeing a stack trace? If so, can you share it? Is this fairly reproducible? How much time do you have to wait before it works and then stops working? - Jason On Wed, Oct 14, 2009 at 2:40 PM, Larry Cable larry.ca...@gmail.com wrote: Thanks Jason, I eventually discovered that by chance, that the PK class would work (mostly) with String types ... although I am now seeing even less explicable behavior where it appears that the runtime fails the 1st time I call it to query the PK class enabled entity but works subsequent times ... go figure! On Oct 14, 12:39 pm, Jason (Google) apija...@google.com wrote: App Engine's datastore, which is built on Bigtable, has a very particular format for keys -- the datastore is not a traditional RDBMS. As documented, Long, Key, and String are supported, and other objects will fail. http://code.google.com/appengine/docs/java/datastore/creatinggettinga... - Jason On Mon, Oct 12, 2009 at 10:06 PM, datanucleus andy_jeffer...@yahoo.com wrote: JDO allows you to have multiple PK fields, as does DataNucleus. GAE/J overrides this and prevents it.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: having problems with JDO query serialization to memcache...
cheers ... makes sense! On Oct 20, 2:05 pm, Jason (Google) apija...@google.com wrote: No. The StreamingQueryResult class, which is a List used by DataNucleus to store query results, does not implement Serializable which is required for all objects stored in memcache. But you can create another List, i.e. an ArrayList, copy the (serializable) results into it, and cache this. You'll also need to do this if you want to send query results over the wire to a GWT-based application, for example. - Jason On Mon, Oct 19, 2009 at 2:03 PM, Larry Cable larry.ca...@gmail.com wrote: quick question: should I be able to directly serialize (Cache.put (...)) results of JDO queries into Memcache? It appears not ... I have the following class(es): @PersistenceCapable(identityType=IdentityType.APPLICATION, objectIdClass=CityState.CityStateKey.class, cacheable=true, detachable=true) public class CityState implements Serializable { public static class CityStateKey implements Serializable { �...@notpersistent private static Pattern p = Pattern.compile(^(.*),\\s?([A-Za-z]{2}) $); public CityStateKey() { } public CityStateKey(String keyValue) { final Matcher m = p.matcher(keyValue.trim()); if (m.matches()) { city = m.group(1); state = State.valueOf((m.group(2))).name(); } else throw new IllegalArgumentException(keyValue); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ �...@override public int hashCode() { // elided ... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ �...@override public boolean equals(Object obj) { // elided... } public String toString() { return (city + Address.COMMASPACE + state); } public String state; public String city; } public CityState(final String city, final String state) { this.city = city.trim(); this.state = state; } �...@override public String getCity() { return city; } �...@override public String getState() { return state; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ �...@override public int hashCode() { // elided... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ �...@override public boolean equals(Object obj) { // elided... } �...@override public String toString() { return city + Address.COMMASPACE + state; } �...@persistent(primaryKey=true) public String state; // should be State GAE/JDO does not support... �...@persistent(primaryKey=true) public String city; } when I query select from CityState via JDO I get a StreamingQueryResult ... if I attempt to put that as a value into memcache I get the typical NotSerializableException indicating that an object in the graph is not serializable ... any thoughts/suggestions, clearly the (simple) app domain objects are (both) serializable as are the internal fields ... Thanks- 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: having problems with JDO query serialization to memcache...
excellent! On Oct 21, 11:20 am, datanucleus andy_jeffer...@yahoo.com wrote: Just to mention, JDO (and DataNucleus) supports a Level2 cache, and can use javax.cache (GAE/J memcached) and is a single PMF property to turn it on. That way you don't need to play around putting objects into the L2 cache and getting them out yourself, its done for you. --~--~-~--~~~---~--~~ 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] having problems with JDO query serialization to memcache...
quick question: should I be able to directly serialize (Cache.put (...)) results of JDO queries into Memcache? It appears not ... I have the following class(es): @PersistenceCapable(identityType=IdentityType.APPLICATION, objectIdClass=CityState.CityStateKey.class, cacheable=true, detachable=true) public class CityState implements Serializable { public static class CityStateKey implements Serializable { @NotPersistent private static Pattern p = Pattern.compile(^(.*),\\s?([A-Za-z]{2}) $); public CityStateKey() { } public CityStateKey(String keyValue) { final Matcher m = p.matcher(keyValue.trim()); if (m.matches()) { city = m.group(1); state = State.valueOf((m.group(2))).name(); } else throw new IllegalArgumentException(keyValue); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { // elided ... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { // elided... } public String toString() { return (city + Address.COMMASPACE + state); } public Stringstate; public Stringcity; } public CityState(final String city, final String state) { this.city = city.trim(); this.state = state; } @Override public String getCity() { return city; } @Override public String getState() { return state; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { // elided... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { // elided... } @Override public String toString() { return city + Address.COMMASPACE + state; } @Persistent(primaryKey=true) public String state; // should be State GAE/JDO does not support... @Persistent(primaryKey=true) public String city; } when I query select from CityState via JDO I get a StreamingQueryResult ... if I attempt to put that as a value into memcache I get the typical NotSerializableException indicating that an object in the graph is not serializable ... any thoughts/suggestions, clearly the (simple) app domain objects are (both) serializable as are the internal fields ... 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: Datastore Limits
read this thread ... you might want to batch the writes you should get around 200-300 objects per write (under the 5 sec timeout) and probably around 2k per request before hitting the 30sec request timeout (all depends on the complexity of your objects) On Sep 14, 5:54 am, Iain iain.robe...@gmail.com wrote: What do you mean by times out? Do you mean you hit the 30 second deadline? On Sep 14, 3:59 am, hg hgo...@gmail.com wrote: Hi, I am writing a script that is supposed to run quite a few inserts to the datastore - up to a couple of hundred. My script keeps timing out at 92. After I ran it a few times this evening, it wiped out my entire datastore! I did some research and came across the following error documentation: for the DatastoreTimeoutException DatastoreTimeoutException is thrown when a datastore operation times out. This can happen when you attempt to put, get, or delete too many entities or an entity with too many properties, or if the datastore is overloaded or having trouble. I was not getting this error, but it does seem to have some bearing on this case. What are the limit on entity 'putting' for a script? Any suggestions would be appreciated. Thanks!- 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: Get Multipart Data from the request
+1 On Sep 13, 6:18 am, Philippe Marschall philippe.marsch...@gmail.com wrote: On Jul 22, 7:41 pm, Jason (Google) apija...@google.com wrote: As indicated in the Will it play in App Engine page, you will not be able to use the traditional Apache Commons FileUpload API since it relies on java.io.File which is not a supported class. App Engine does not allow applications to write to the file system, so the DiskFileItem error thrown makes sense. You should be able to use the Streaming API or a custom solution like the one in this thread:http://groups.google.com/group/google-appengine-java/browse_thread/th... Streaming API works fine here. Cheers Philippe --~--~-~--~~~---~--~~ 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: Announcing JDO/JPA Snippets That Work
I'd also encourage you as part of this to focus on the mapping of JPA/JDO RDBMS like concepts onto the DS, as this I have found to be most problematic ... (or at least include pointers from the example back to the online docs) which is funny because I confess that you could write down all I know about RDBMS on the head of a pin ... Also I think coping strategies to deal with DS and GAE quotas would be helpful too! Thanks for doing this - Larry On Sep 14, 4:00 pm, Max Ross maxr+appeng...@google.com wrote: Greetings everyone! For those of you who don't know me, my name is Max Ross and I'm an engineer on the Google App Engine team who works on persistence stuff: the datastore, the low-level datastore api, and the JDO/JPA implementation. I'll be your host. GAE for Java has been available since early April, and since launch we've fixed a lot of bugs and added a lot of featureshttp://code.google.com/p/datanucleus-appengine/issues/list?can=1q=st...related to JDO and JPA. However, I read this group regularly and I see the persistence questions being asked, and it's clear to me that we're not giving you, our customers, enough guidance. JDO/JPA Snippets That Work is my attempt to provide that guidance. Each week I'm going to post a complete example demonstrating how to accomplish a specific persistence-related task. We don't play favorites here on the App Engine team so I'll construct the example in both JDO and JPA, and I'll try to cover a wide range of topics to keep everyone interested. My hope is that, over time, this will come to serve as a valuable resource to all App Engine Java developers whether you're new to JDO/JPA or not. The subject line of all these posts will begin with JDO/JPA Snippets That Work so you can recognize the new ones and find the old ones easily. I will not use the word 'simply' to describe anything. The first real post is already queued up so keep an eye out for it, and if you have feedback on the usefulness of these snippets, good or bad, please don't hesitate to let us know. Thanks! Max --~--~-~--~~~---~--~~ 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: Bulk update throws exception
nope you are right ... it's not useless ... apologies I *think* the problem is in mapping (conceptually) from a mental RDBMS model to a GAE DS model ... where entity group might be mistaken for table ... :) On Aug 26, 3:02 pm, Jason (Google) apija...@google.com wrote: Why do you indicate that the documentation is useless? The links I included above state this quite clearly: two entities will be in separate entity groups by default, even if they're the same kind. Entity groups DO NOT collect entities of the same kind. If you need transaction support, you'll need to explicitly set one entity as the parent of the other, which basically creates a hierarchy (tree) of entities -- this is an entity group. In JDO/JPA, you do this using owned relationships which is covered in my second link above. - Jason On Tue, Aug 25, 2009 at 2:33 PM, Larry Cable larry.ca...@gmail.com wrote: I have exactly the same problem, I instantiate a number of @Entity objects (all of the same type) persist them, and flush them in the context of the same transaction. Since they are all of the same type, and their are no relationships (although there is an @Embedded class/field) I would imagine that they are all modelled as being in the same entity group .. but apparently not. The documentation is basically useless at this point ... On Aug 15, 1:09 pm, Foreigner foreigne...@gmail.com wrote: While trying to do a bulk update on my entities using JPA I get the exception bellow. I understand that you can't do a bulk update on different entity groups in the same transaction but I guess I don't quite understand what an entity group is and how I go about making all entities part of the same group I want. Thanks for the help. fbr Illegal argument org.datanucleus.exceptions.NucleusUserException: Illegal argument at org.datanucleus.store.appengine.DatastoreExceptionTranslator.wrapIllegalArgumentException(DatastoreExceptionTranslator.java:42) at org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.put(RuntimeExceptionWrappingDatastoreService.java:106) at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:125) at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:94) at org.datanucleus.store.appengine.DatastorePersistenceHandler.updateObject(DatastorePersistenceHandler.java:398) at org.datanucleus.state.JDOStateManagerImpl.flush(JDOStateManagerImpl.java:4458) at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:2807) at org.datanucleus.ObjectManagerImpl.markDirty(ObjectManagerImpl.java:2617) at org.datanucleus.state.JDOStateManagerImpl.postWriteField(JDOStateManagerImpl.java:4241) at org.datanucleus.state.JDOStateManagerImpl.setObjectField(JDOStateManagerImpl.java:2287) at com.yicook.entities.TwitterDailyTip.jdoSetlastSet(TwitterDailyTip.java) at com.yicook.entities.TwitterDailyTip.setLastSet(TwitterDailyTip.java:36) at com.yicook.control.bco.TwitterStatusSetterBCO.resetTDT(TwitterStatusSetterBCO.java:60) at com.yicook.control.bco.TwitterStatusSetterBCO.execute(TwitterStatusSetterBCO.java:40) at com.yicook.control.ApplicationController.executeControllers(ApplicationController.java:61) at com.yicook.control.ApplicationController.dispatch(ApplicationController.java:41) at com.yicook.servlets.FrontController.doPost(FrontController.java:31) at com.yicook.servlets.FrontController.doGet(FrontController.java:25) 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 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle
[appengine-java] Re: JDO/JPA Snippets That Work - Creating a bidirectional, owned, one-to-many relationship
you might want to extend this example to use the ISBN as the book's PrimaryKey, which might be a natural choice for the entities id, ensuring uniqueness in the DS ... Thanks - larry On Sep 14, 4:07 pm, Max Ross maxr+appeng...@google.com wrote: Hello hello and welcome to the very first installment of JDO/JPA Snippets That Work! Creating A Bidrectional Owned One-To-Many Suppose you're building a book catalog application and you want to model books and chapters. Books contain chapters. A chapter cannot exist without a book, so if you delete a book you want its chapters automatically deleted along with it. You also want to each chapter to have a reference to the book that owns it. Sounds like a bidrectional, owned, one-to-many relationship is just the thing. First we'll set up our model objects and then we'll add some code to create a Book with 2 Chapters. JPA: @Entity public class Book { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Key id; private String title; @OneToMany(mappedBy = book, cascade = CascadeType.ALL) private ListChapter chapters = new ArrayListChapter(); // getters and setters } @Entity public class Chapter { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Key id; private String title; private int numPages; @ManyToOne(fetch = FetchType.LAZY) private Book book; // getters and setters } Now let's create a book with two chapters (we'll assume someone else is creating and closing an EntityManager named 'em' for us): Book b = new Book(); b.setTitle(JPA 4eva); Chapter c1 = new Chapter(); c1.setTitle(Intro); c1.setNumPages(10); b.getChapters().add(c1); Chapter c2 = new Chapter(); c2.setTitle(Configuration); c2.setNumPages(9); b.getChapters().add(c2); em.getTransaction().begin(); try { em.persist(b); em.getTransaction().commit();} finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); } } JDO: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Book { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String title; @Persistent(mappedBy = book) @Element(dependent = true) private ListChapter chapters = new ArrayListChapter(); // getters and setters } @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Chapter { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String title; private int numPages; @Persistent private Book book; // getters and setters } Now let's create a book with two chapters (we'll assume someone else is creating and closing a PersistenceManager named 'pm' for us): Book b = new Book(); b.setTitle(JDO 4eva); Chapter c1 = new Chapter(); c1.setTitle(Intro); c1.setNumPages(10); b.getChapters().add(c1); Chapter c2 = new Chapter(); c2.setTitle(Configuration); c2.setNumPages(9); b.getChapters().add(c2); pm.currentTransaction().begin(); try { pm.makePersistent(b); pm.currentTransaction().commit();} finally { if (pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } }- 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: Bulk writes to datastore
I am wondering about writing a Servlet that would form/multi-part upload large files and cache them in memcache then use the cron API to trickle persist them into the DS over time ... could maybe even get adventurous and put a filesystem-like API over the cache ... lemme know if anyone would be interested in this ... if there is enough interest I'll put something together and open source it. These timeouts in the DS and at the request while understandable are a total PITA coding around them complicates the application logic considerably ... honestly I am begining to wonder if EC2 with a tomcat and a MySQL or Derby DB in it might be a better way to go if you actually want to store reasonable amounts of data. I realize that this is an EA environment, but my feedback would be that if you are aiming to provide a scalable web app and datastore, there is little point in having either if the hosted application cannot store reasonable amounts of data in the 1st place. On Sep 12, 8:37 am, P64 primo...@gmail.com wrote: Exactly! I was hoping this update (http://code.google.com/p/datanucleus-appengine/issues/detail?id=7 ) would seriously improve bulk inserts. As it seems in practice you can now do roughly 2-3 times as many inserts in the same ammount of real and CPU time. However this is still poor compared to what we're used to with relational databases on a relatively poor hardware. At the moment I can do a batch input of up to 300 entities (with a couple of Integer and String properties) in a 30 second time window and it costs me around 18 seconds of CPU time. I have a roughly 1.5MB file which I have to download, parse it's 15.000 lines and insert them in database. I need no transactions in this case, all entities can be standalone, I don't mine the order in which they are written, could be parallel aswell as fas as I am concerned. As it seems now, I have to download this file, slice it in chunks of 300 lines, store each chunk in a database. Than I need to put 50 tasks in a queue, each taking 30 seconds to read a chunk from database, parse it in 300 seperate entities and store as such. Just database writes to do that would cost me well over 15 CPU minutes, not to mention the overhead caused by all the task spawning and so on. All that for an operation which litteraly takes seconds on my old box running relational DB, which I use for testing purposes. It's to complicated and it uses way to many resources to update 1000+ entities - and there are lots of applications that need to update data from different sources (XML, SQL dumps, ...) on a daily basis. On 12 sep., 02:30, Larry Cable larry.ca...@gmail.com wrote: So now, I am hitting Datastore timeouts and Request timeouts ... I really really think you guys need to add a mechanism that allows developers to simply do bulk uploads of data into their GAE applications (from Java thank you).- 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: Bulk writes to datastore
I tried doing a bulk load with the JDO makePersistentAll(..) call yesterday ... by default what I did was created a List of size 2048, filled it to capacity and then called makePersistentAll() ... I got an IllegalArgumentException out of that call stating that you could only persist at most 500 objects per call ... I was unable to retest this, because despite making a change to the capacity of the the List to 500 and re-deploying the redeployment did not seem to take effect ... will keep trying ... On Sep 4, 5:24 pm, Jason (Google) apija...@google.com wrote: Batch puts are supported, yes, and as of yesterday's release, calling makePersistentAll (JDO) and the equivalent JPA call will take advantage of this support (previously, you had to use the low-level API). Two quick notes: 1) All of the entities that you're persisting should be in separate entity groups since two entities in the same entity group can't be written to consecutively, and you will see datastore timeout exceptions if many simultaneous write requests come in for the same entity or entity group. 2) Batch puts do not operate in a transaction. This means that some writes may succeed but others may not, so if you need the ability to rollback, you'll need transactions. - Jason Let me know if you have any more questions on this. - Jason On Thu, Sep 3, 2009 at 7:24 PM, Nicholas Albion nalb...@gmail.com wrote: Is it possible to overcome the datastore's 10 writes/second limit by batching them? I've got a table containing just over one million records (in CSV format). Does a batched write (of around 1MB of data and, say 1000 records) count as one write, or 1000 writes?- 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: Bulk writes to datastore
So now, I am hitting Datastore timeouts and Request timeouts ... I really really think you guys need to add a mechanism that allows developers to simply do bulk uploads of data into their GAE applications (from Java thank you). :) On Sep 11, 9:06 am, Larry Cable larry.ca...@gmail.com wrote: I tried doing a bulk load with the JDO makePersistentAll(..) call yesterday ... by default what I did was created a List of size 2048, filled it to capacity and then called makePersistentAll() ... I got an IllegalArgumentException out of that call stating that you could only persist at most 500 objects per call ... I was unable to retest this, because despite making a change to the capacity of the the List to 500 and re-deploying the redeployment did not seem to take effect ... will keep trying ... On Sep 4, 5:24 pm, Jason (Google) apija...@google.com wrote: Batch puts are supported, yes, and as of yesterday's release, calling makePersistentAll (JDO) and the equivalent JPA call will take advantage of this support (previously, you had to use the low-level API). Two quick notes: 1) All of the entities that you're persisting should be in separate entity groups since two entities in the same entity group can't be written to consecutively, and you will see datastore timeout exceptions if many simultaneous write requests come in for the same entity or entity group. 2) Batch puts do not operate in a transaction. This means that some writes may succeed but others may not, so if you need the ability to rollback, you'll need transactions. - Jason Let me know if you have any more questions on this. - Jason On Thu, Sep 3, 2009 at 7:24 PM, Nicholas Albion nalb...@gmail.com wrote: Is it possible to overcome the datastore's 10 writes/second limit by batching them? I've got a table containing just over one million records (in CSV format). Does a batched write (of around 1MB of data and, say 1000 records) count as one write, or 1000 writes?- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: JPA support for enum's
public class Address { public static enum State { // define all 2 letter states here ... } // protected State state; // would'nt it be nice if this worked ... } public class Company { // ... @Embedded protected EINein; // IRS tax id @Embedded protected Address address; // ... } it fails stating that Address$State is an unsupported field type ... or if I play with annotations it claims it cannot find init()V which of course is true because there is no public constructor ... I think something else is going on with the Entity and it's embedded types since queries on the address such as select c from Charity where c.address.state='CA'' do not match anything and no index is auto generated locally ... On Sep 3, 12:07 am, leszek leszek.ptokar...@gmail.com wrote: It works for me, also without any annotation. Something like: Enum { Enum1, Enum }; class EnityClass { private Enum en; public Enum getEn() { return en; } public void setEn(Enum en) { this.en = en; } } EntityClass e = new EntityClass(); e. setEn(Enum.Enum1); em.persist(e); // after lauching localhost.../_ah/admin/ I can see this entity and proper 'en' value. Could you provide more details ? --~--~-~--~~~---~--~~ 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: JSTL x:out message NoClassDefFoundError: VariableStack
what was the full stack trace? you probably need to get xalan-j from the apache site I expect the JSTL XML tags are dependent on it for processing ... On Aug 28, 1:48 am, ant2legs ant2l...@gmail.com wrote: I put the following codes to my jsp: %...@taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % x:parse doc=${xmldoc} var=output / x:out select=$output/i18n/home/en / And I got an error message: java.lang.NoClassDefFoundError: org/apache/xpath/VariableStack I used another sample which I got from internet, and I got the same message. Do I need to download something? --~--~-~--~~~---~--~~ 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 @EmbeddedID and @Embedded with JPA ...
should'a RTFM'ed :) On Aug 27, 1:20 am, datanucleus andy_jeffer...@yahoo.com wrote: btw why does em.flush() throw an exception declaring that it requires a transaction and that there is none in context when the Persistence Provider is clearly configured for non-tx writes You mean according to the JPA spec 3.1.1, for flush() spec @throws TransactionRequiredException if there is no transaction /spec so it complies with the JPA TCK then. Don't call flush in a non-tx context. --Andy (DataNucleus) --~--~-~--~~~---~--~~ 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] JPA support for enum's
Has anyone managed to get an enum persisted via JPA? I can't I get an exception from the runtime, no such method init() V, which I take to mean that it cannot locate a public no-args constructor for the enum ... go figure ... :( --~--~-~--~~~---~--~~ 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: Bulk update throws exception
I have exactly the same problem, I instantiate a number of @Entity objects (all of the same type) persist them, and flush them in the context of the same transaction. Since they are all of the same type, and their are no relationships (although there is an @Embedded class/field) I would imagine that they are all modelled as being in the same entity group .. but apparently not. The documentation is basically useless at this point ... On Aug 15, 1:09 pm, Foreigner foreigne...@gmail.com wrote: While trying to do a bulk update on my entities using JPA I get the exception bellow. I understand that you can't do a bulk update on different entity groups in the same transaction but I guess I don't quite understand what an entity group is and how I go about making all entities part of the same group I want. Thanks for the help. fbr Illegal argument org.datanucleus.exceptions.NucleusUserException: Illegal argument at org.datanucleus.store.appengine.DatastoreExceptionTranslator.wrapIllegalArgumentException(DatastoreExceptionTranslator.java:42) at org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.put(RuntimeExceptionWrappingDatastoreService.java:106) at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:125) at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:94) at org.datanucleus.store.appengine.DatastorePersistenceHandler.updateObject(DatastorePersistenceHandler.java:398) at org.datanucleus.state.JDOStateManagerImpl.flush(JDOStateManagerImpl.java:4458) at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:2807) at org.datanucleus.ObjectManagerImpl.markDirty(ObjectManagerImpl.java:2617) at org.datanucleus.state.JDOStateManagerImpl.postWriteField(JDOStateManagerImpl.java:4241) at org.datanucleus.state.JDOStateManagerImpl.setObjectField(JDOStateManagerImpl.java:2287) at com.yicook.entities.TwitterDailyTip.jdoSetlastSet(TwitterDailyTip.java) at com.yicook.entities.TwitterDailyTip.setLastSet(TwitterDailyTip.java:36) at com.yicook.control.bco.TwitterStatusSetterBCO.resetTDT(TwitterStatusSetterBCO.java:60) at com.yicook.control.bco.TwitterStatusSetterBCO.execute(TwitterStatusSetterBCO.java:40) at com.yicook.control.ApplicationController.executeControllers(ApplicationController.java:61) at com.yicook.control.ApplicationController.dispatch(ApplicationController.java:41) at com.yicook.servlets.FrontController.doPost(FrontController.java:31) at com.yicook.servlets.FrontController.doGet(FrontController.java:25) 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 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:306) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction. found both
[appengine-java] Re: Bulk update throws exception
h' ... so it would seem that 2 or more entity (instances) persisted in the same tx cause this error ... this cannot be so ... how is the mapping from instance to entity (group) made? On Aug 25, 2:33 pm, Larry Cable larry.ca...@gmail.com wrote: I have exactly the same problem, I instantiate a number of @Entity objects (all of the same type) persist them, and flush them in the context of the same transaction. Since they are all of the same type, and their are no relationships (although there is an @Embedded class/field) I would imagine that they are all modelled as being in the sameentitygroup.. but apparently not. The documentation is basically useless at this point ... On Aug 15, 1:09 pm, Foreigner foreigne...@gmail.com wrote: While trying to do a bulk update on my entities using JPA I get the exception bellow. I understand that you can't do a bulk update on differententitygroups in the same transaction but I guess I don't quite understand what anentity groupis and how I go about making all entities part of the samegroupI want. Thanks for the help. fbr Illegal argument org.datanucleus.exceptions.NucleusUserException: Illegal argument at org.datanucleus.store.appengine.DatastoreExceptionTranslator.wrapIllegalArgumentException(DatastoreExceptionTranslator.java:42) at org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.put(RuntimeExceptionWrappingDatastoreService.java:106) at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:125) at org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:94) at org.datanucleus.store.appengine.DatastorePersistenceHandler.updateObject(DatastorePersistenceHandler.java:398) at org.datanucleus.state.JDOStateManagerImpl.flush(JDOStateManagerImpl.java:4458) at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:2807) at org.datanucleus.ObjectManagerImpl.markDirty(ObjectManagerImpl.java:2617) at org.datanucleus.state.JDOStateManagerImpl.postWriteField(JDOStateManagerImpl.java:4241) at org.datanucleus.state.JDOStateManagerImpl.setObjectField(JDOStateManagerImpl.java:2287) at com.yicook.entities.TwitterDailyTip.jdoSetlastSet(TwitterDailyTip.java) at com.yicook.entities.TwitterDailyTip.setLastSet(TwitterDailyTip.java:36) at com.yicook.control.bco.TwitterStatusSetterBCO.resetTDT(TwitterStatusSetterBCO.java:60) at com.yicook.control.bco.TwitterStatusSetterBCO.execute(TwitterStatusSetterBCO.java:40) at com.yicook.control.ApplicationController.executeControllers(ApplicationController.java:61) at com.yicook.control.ApplicationController.dispatch(ApplicationController.java:41) at com.yicook.servlets.FrontController.doPost(FrontController.java:31) at com.yicook.servlets.FrontController.doGet(FrontController.java:25) 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 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:306) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211
[appengine-java] Using @EmbeddedID and @Embedded with JPA ...
Has anyone managed to get @EmbeddedId with JPA to work in GAE/ DataNucleus??? @Entity public class MyEntity { //... @EmbeddedId public MyId id; } // ... @Embeddable public class MyId { //... public String id; } I'm getting an unsupported primary key type exception at runtime during em.flush() any thoughts? examples of working code? I am pretty sure it's pilot error ... but the documentation for this is pretty thin on the ground ... will try and isolate an actual working example and post that here also ... --~--~-~--~~~---~--~~ 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: datanucleus - key -- set the name component instead
On Jul 13, 2:16 am, Shawn Brown big.coffee.lo...@gmail.com wrote: Hello, I'm seeing Attempt was made to manually set the id component of a Key primary key. If you want to control the value of the primary key, set the name component instead. Do I have to fetch an object before updating it? I'm fetching (dataClass) from the store with detachable=true then copying the data to a bean for serialization to my GWT client when it returns, I create a new (dataClass) instance containing the id of the original. Does that make sense? Should be trying something likehttp://www.datanucleus.org/products/accessplatform_1_1/jdo/attach_det... Thanks for your good advice! I am getting the same error in a similar, but different, scenario with JPA+DataNucleus+GAE ... I *think* it may be as a result that the PersistenceProvider believes that it is in control of the PK value allocation strategy, and not the application, and it is complaining because the app is setting the PK field (which would be a bad thing if the PP thought it was in charge of that field and it's contents)! That's what I think the route of my problem is ... sadly I am not sure how to resolve 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 -~--~~~~--~~--~--~---
[google-appengine] Re: I've just found that the app.yaml file won't allow more than 100 handlers...
Thanks for the idea! Quite a few URLs are similar so it seems most sensible. I also should have noted in my OP that I noticed this on the development server and not on the production server. Either or both means I'll need the work around. On Apr 15, 1:56 am, Gopal Vaswani gopal.vasw...@gmail.com wrote: Hi Larry, I hope you are talking about the number of handlers in the handler script. Its strange that GAE does not allow more than 100 handlers. it should not be the case normally. Anyway, one way you can overcome this issue is to use regex groups to capture URL specific parameters and process the request based on the parameter. This should bring down the number of handlers as I am assuming that many of your urls would be similar. Vaswani On Tue, Apr 14, 2009 at 2:44 PM, Larry larry.ches...@googlemail.com wrote: Hi I've just found that the app.yaml file won't allow more than 100 handlers. I know this seems plenty but using handlers quite conservatively I have found myself requiring slightly more than 100 handlers for my forum. I could just map every URL into one handler and have that search a dictionary for the correct class to handle the request but that is rather irritating to recode. Are there any better plans? Should I file a bug report requesting a larger number of handlers. I personally think it should be dynamic (IE: not limited) or at least be mentioned in the documentation. I could have avoided this situation had I known about the restriction. Thanks! Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] I've just found that the app.yaml file won't allow more than 100 handlers...
Hi I've just found that the app.yaml file won't allow more than 100 handlers. I know this seems plenty but using handlers quite conservatively I have found myself requiring slightly more than 100 handlers for my forum. I could just map every URL into one handler and have that search a dictionary for the correct class to handle the request but that is rather irritating to recode. Are there any better plans? Should I file a bug report requesting a larger number of handlers. I personally think it should be dynamic (IE: not limited) or at least be mentioned in the documentation. I could have avoided this situation had I known about the restriction. Thanks! Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Latency problem still really a problem
I've got stable performance in my application. It consistently runs 3 to 4 times slower than it used to. Apparently, application performance should improve on Monday but in the mean time performance is quite poor... http://code.google.com/status/appengine On Mar 6, 8:05 pm, cz czer...@gmail.com wrote: Our app is still experiencing at least double the latency as compared to last week and the app is basically unusable. I'm really concerned about this since the GAE team has stated that the latency issue has been resolved. This is so disappointing if the current performance is considered to be fine. I'm really hoping that this isn't the case. I'm curious as to how you are testing latency internally? Perhaps the tests aren't reflecting very well some real world scenarios and that some combination of datastore operations are particularly onerous. In any case, latency is still much much worse than before the server maintenance. P.S. also getting random 502 errors which I assume is related to this issue:http://groups.google.com/group/google-appengine/browse_thread/thread/... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How to keep datastore consistency?
Anyone? Is this a flaw in AppEngine? Do you need more information - just ask if that's the case? Larry wrote: Hi! I've hit a small dilemma! I have a handler called vote, when it is invoked it sets a user's vote to whatever they have picked. To remember what options they previously picked, I store a VoteRecord options which details what their current vote is set to. Of course, the first time they vote, I have to create the object and store it. But successive votes should just change the value of the existing VoteRecord. But he comes the problem: under some circumstances two VoteRecords can be created. It's rare (only happened once in all 541 votes we've seen so far) but still bad when it does. The issue happens because two separate handlers both do essentially this: vote = VoteRecord.all().filter('user =', user) if vote.count(1) == 0: obj = VoteRecord() obj.user = user obj.option = option obj.put() else: obj = vote[0] obj.option = option obj.put() My question is: what is the most effective and fastest way to handle these requests while ensuring that no request is lost and no request creates two VoteRecord objects? Thanks, Larry PS: You can see the polls working here: http://silicon.appspot.com/polls. Notice that voting twice should change the vote the second time instead of creating two votes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Django, including a file
Good point. =) Here is my page that is being rendered without the template included: http://silicon.appspot.com/readdoc?id=12619 Here's the template (contained in / and /templates): http://silicon.appspot.com/readdoc?id=12620 And finally, here is my app.yaml file: http://silicon.appspot.com/readdoc?id=12480 Thanks again for the continued help! :) On Jan 26, 12:19 am, Alexander Kojevnikov alexan...@kojevnikov.com wrote: Please post here your templates and also the app.yaml file, you can use dpaste as @theillustratedlife has suggested. On Jan 26, 8:27 am, Larry larry.ches...@googlemail.com wrote: I'm using the templates that are currently inbuilt into AppEngine (I'm not including Django myself). My folder structure has the parent and template in the root directory and also a copy of the template in / templates. Would getting the latest Django be necessary? Or do I just need to tweak things? Thanks, Lster On Jan 24, 2:01 am, Alexander Kojevnikov alexan...@kojevnikov.com wrote: Has anyone got include working? I've been searching everywhere but find any simple examples of AppEngine including templates! {% include %} works for me, I'm using app-engine-patch. Which version of Django do you use? What is your folder structure, where the templates are kept (both the parent and the included one)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Django, including a file
Thanks! I have found my problem... When I render the templates I first load the Template and then for each page render I create a Context object and do: self.response.out.write(templateObject.render(contextObject)) When I change this back to: self.response.out.write(template.render(templatePath, contextVals)) it works perfectly. I wasn't aware of the difference except thought that loading in the template object would be faster since it removes repeated operations. Can I still use the template-object method and includes together? Thanks loads! At the very least I know the problem and can get it working now. =) On Jan 27, 11:03 am, Alexander Kojevnikov alexan...@kojevnikov.com wrote: I've created a sample project with just one page and the inclusion works fine both in the SDK and in production. Take a look, may be you will spot differences with your project: http://www.sendspace.com/file/qrsyjh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Django, including a file
I'm using the templates that are currently inbuilt into AppEngine (I'm not including Django myself). My folder structure has the parent and template in the root directory and also a copy of the template in / templates. Would getting the latest Django be necessary? Or do I just need to tweak things? Thanks, Lster On Jan 24, 2:01 am, Alexander Kojevnikov alexan...@kojevnikov.com wrote: Has anyone got include working? I've been searching everywhere but find any simple examples of AppEngine including templates! {% include %} works for me, I'm using app-engine-patch. Which version of Django do you use? What is your folder structure, where the templates are kept (both the parent and the included one)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Why can't Google index my app?
Hi! I have submitted my application and am tracking progress with Google Webmaster but many of the URLs that it tries to index have errors. The errors are all the same and of the type robots.txt file unreachable as described here: https://www.google.com/support/webmasters/bin/answer.py?answer=35147ctx=tltphl=en The thing that is confusing me is that robots.txt is quite accessible for me by the URL: http://silicon.appspot.com/robots.txt However, obviously Google can't seem to understand it or something! The relevant part of my app.yaml file is pasted below. I would of thought that is adequate and correct but perhaps not? - url: /robots.txt static_files: scripts/robots.txt upload: scripts/robots.txt My only idea as to what is going wrong, is that AppEngine is blocking GoogleBot. Is this likely; or am I doing something wrong? Thanks, Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Why can't Google index my app?
Thanks for the reply, Marzia. It seems to be OK and I'll just have to wait for GoogleBot to scan it again. On Dec 3, 5:34 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi Larry, It could have just been a temporary error, maybe you can try manually checking the robots.txt to see if there are any problems?https://www.google.com/support/webmasters/bin/answer.py?answer=35237;... -Marzia On Wed, Dec 3, 2008 at 8:03 AM, Larry [EMAIL PROTECTED] wrote: Hi! I have submitted my application and am tracking progress with Google Webmaster but many of the URLs that it tries to index have errors. The errors are all the same and of the type robots.txt file unreachable as described here: https://www.google.com/support/webmasters/bin/answer.py?answer=35147;... The thing that is confusing me is that robots.txt is quite accessible for me by the URL: http://silicon.appspot.com/robots.txt However, obviously Google can't seem to understand it or something! The relevant part of my app.yaml file is pasted below. I would of thought that is adequate and correct but perhaps not? - url: /robots.txt static_files: scripts/robots.txt upload: scripts/robots.txt My only idea as to what is going wrong, is that AppEngine is blocking GoogleBot. Is this likely; or am I doing something wrong? Thanks, Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Small Bug - I think
Well deleting properties work well generally but not when the object is a DateTimeProperty and auto_now=True. Then, if you try delete the property, it will saved an updated value when put() is called! I am at a loss to know how to delete these properties considering every time I do delete it, they get a new value! Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Small Bug - I think
Here it is: http://code.google.com/p/googleappengine/issues/detail?id=895 On Dec 1, 10:26 pm, Xavier Mathews [EMAIL PROTECTED] wrote: Post it in the issue tracker! Xavier A. Mathews Student/Browser Specialist/Developer/Web-Master Google Group Client Based Tech Support Specialist Hazel Crest Illinois [EMAIL PROTECTED]@[EMAIL PROTECTED] Fear of a name, only increases fear of the thing itself. On Mon, Dec 1, 2008 at 4:25 PM, Larry [EMAIL PROTECTED] wrote: Well deleting properties work well generally but not when the object is a DateTimeProperty and auto_now=True. Then, if you try delete the property, it will saved an updated value when put() is called! I am at a loss to know how to delete these properties considering every time I do delete it, they get a new value! Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Wrong Ordering Of Query!
Thanks for the reply. Well there is either a bug in the system or the documentation because the docs do not mention this as far as I can tell. Inconsistencies like this could produce major errors in my application and I would consider that a huge defect regardless of whether it is documented. As I've only seen it once, I'll hope it doesn't happen again... Thanks, Larry On Nov 27, 9:53 pm, Duncan [EMAIL PROTECTED] wrote: On Nov 27, 6:31 pm, Larry [EMAIL PROTECTED] wrote: Scanning the relevant datastore API docs hasn't yielded any insight into what is going on! It seems quite like to me that this is a bug on Google's side rather than in my code. There was a document somewhere, but I can't remember offhand exactly where which explains some of the aspects of how the system works. In particular it points out that it can take some time between the data being updated and the index being updated. So for your example if the index records the last access order as B, A, C but A has just hit the system you could get the sort of result you describe where a recent access occurs somewhere further down the list. So not a bug on Google's side, rather a fundamental restriction of the system that you hadn't fully realised. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Wrong Ordering Of Query!
It's kind of difficult to give any meaningful information though since it is fixed now and doesn't seem to relapsed... I can explain the bug but I can't give any instructions to replicate it and so I doubt it will be of much use. Also, I think it may have been due to maintenance or something similar so may be already fixed. If it happens again, I will inform Google, but it wasn't too bad anyway... On Nov 28, 11:30 am, David Symonds [EMAIL PROTECTED] wrote: On Fri, Nov 28, 2008 at 8:53 AM, Duncan [EMAIL PROTECTED] wrote: There was a document somewhere, but I can't remember offhand exactly where which explains some of the aspects of how the system works. In particular it points out that it can take some time between the data being updated and the index being updated. So for your example if the index records the last access order as B, A, C but A has just hit the system you could get the sort of result you describe where a recent access occurs somewhere further down the list. That should never be the case. If the index wasn't fully updated, it should serve you an old version of both the index and the data. If something else happens, it is definitely a bug, so you should file a ticket giving as much information as you can. Dave. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Wrong Ordering Of Query!
I've had the same code for some time and it has always worked fine but now a query which should return a list of users sorted by their last activity has mistakes in it. My code to list the users is: query = User.all() query.order('-lastactivity') ... vals['users'] = query[:20] The trouble is that sometimes the users order is mixed. It should be like: User | Last Activity A | 1 minute ago B | 2 minute ago C | 3 minute ago ... But it is: User | Last Activity B | 2 minute ago A | 1 minute ago C | 3 minute ago ... Scanning the relevant datastore API docs hasn't yielded any insight into what is going on! It seems quite like to me that this is a bug on Google's side rather than in my code. Does anyone have any ideas about possible mistakes I could have made? Or should I contact Google about this? Thanks, Larry And here is my full handler: session = Session() query = User.all() query.order('-lastactivity') vals = {} vals['user'] = session.user vals['users'] = query[:20] self.response.out.write(templ.render(Context(vals))) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Wrong Ordering Of Query!
Well magically it has stopped happening without any code changes... I'm still very interested in peoples' thought on the matter! It was happening on my users' page: http://silicon.appspot.com/users. Thanks, Larry On Nov 27, 6:31 pm, Larry [EMAIL PROTECTED] wrote: I've had the same code for some time and it has always worked fine but now a query which should return a list of users sorted by their last activity has mistakes in it. My code to list the users is: query = User.all() query.order('-lastactivity') ... vals['users'] = query[:20] The trouble is that sometimes the users order is mixed. It should be like: User | Last Activity A | 1 minute ago B | 2 minute ago C | 3 minute ago ... But it is: User | Last Activity B | 2 minute ago A | 1 minute ago C | 3 minute ago ... Scanning the relevant datastore API docs hasn't yielded any insight into what is going on! It seems quite like to me that this is a bug on Google's side rather than in my code. Does anyone have any ideas about possible mistakes I could have made? Or should I contact Google about this? Thanks, Larry And here is my full handler: session = Session() query = User.all() query.order('-lastactivity') vals = {} vals['user'] = session.user vals['users'] = query[:20] self.response.out.write(templ.render(Context(vals))) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---