[appengine-java] Re: Datastore Import and Export
Any news on this topic...?? What about an estimated release date..?? Thanks, Patrizio On Aug 29, 12:42 pm, Thomas M thomas.m...@googlemail.com wrote: Hi Jason, this sounds extremely promising. When will it come? best Thomas On 19 Aug., 20:35, Jason apija...@google.com wrote: This is coming. As far as I know, it will work similarly to the Python script, meaning it won't use Google Spreadsheets. - Jason On Aug 15, 9:17 am, rbakos rgba...@hotmail.com wrote: I've noticed that there is a utility for python for exporting data from thedatastore. Will there be animport/exportutility for java? Or perhaps a backup/restore utility on the app console? It would be extremely helpful if you could test production data in development through a backup/restore orimport/exportprocess and saving the data offline would be good in case of some catastrophic data loss in production. --~--~-~--~~~---~--~~ 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: Unicode problems
Hello, I have the same issue with Czech characters. It is fine on local SDK but not when I send it to appengine. See my testing application on http://lskokan.appspot.com. Should I create a bug for this? Ladislav. On 15 zář, 10:58, George Moschovitis george.moschovi...@gmail.com wrote: I have created a simple application that usesUnicodehtml files andUnicodedata in the Datastore. To be more specific I use Greek text. The application runs fine in the development server. However, when I deployed the application to GAE all theUnicode(Greek) strings show up as '?'. This problem affects both strings in html templates and strings fetched from the Datastore. Any ideas? -g. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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] what's the bigger/complex application Java/Python running on GAE
Hi everybody, Does everyone know (app developer or google guys) what's the bigger application running on GAE in term of data storage?? I'm trying to figure out how much the data storage quota is limiting for my application... One more thing, how can I found out how much storage I'm using in the local GAE SDK..? Is the local_db.bin file size a storage indication of what I'm going to use in GAE server...?? Hope an answer... 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: cron query
On Wed, Sep 16, 2009 at 6:53 AM, antshpra antsh...@gmail.com wrote: no... you can generate a cron job that runs every minute and only executes the working task when the time is right (eg the 12:20 13:20 whatever..). this is fairly easy to make.. r --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: RPC call and variables
Follow this thread - could be helpful http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/d816992c5a82506b/e50b4eb988d2f45b?lnk=gstq=comet#e50b4eb988d2f45b --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: [giannim] [appengine-java] Re: Unicode problems
Make sure you have this meta tag in your generated html file. meta http-equiv=Content-Type content=text/html; charset=utf-8 / Also, you can set a response HTTP header with the same string. On Wed, Sep 16, 2009 at 8:06 PM, George Moschovitis george.moschovi...@gmail.com wrote: Hmm, I see correct (Greek) characters in the DataViewer. But I get s in my app. The strange thing is that everything works correctly in the development server. -g. On Sep 16, 12:45 pm, leszek leszek.ptokar...@gmail.com wrote: Very interesting, I don't have any problems with Polish characters. Firstly look at your tables via data-viewer in the production environment. I see Polish characters there. You have to narrow the problem - the characters are lost during sending, persisting or retrieving. -- Gianni Mariani Google, Sydney --~--~-~--~~~---~--~~ 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: Unicode problems
Yes, I o have this tag in all html files. But I am uploading .groovy files (Groovy source code) and these dont have this tag. These are source code UTF-8 encoded. L. On 16 zář, 12:28, Gianni Mariani gian...@google.com wrote: Make sure you have this meta tag in your generated html file. meta http-equiv=Content-Type content=text/html; charset=utf-8 / Also, you can set a response HTTP header with the same string. On Wed, Sep 16, 2009 at 8:06 PM, George Moschovitis george.moschovi...@gmail.com wrote: Hmm, I see correct (Greek) characters in the DataViewer. But I get s in my app. The strange thing is that everything works correctly in the development server. -g. On Sep 16, 12:45 pm, leszek leszek.ptokar...@gmail.com wrote: Very interesting, I don't have any problems with Polish characters. Firstly look at your tables via data-viewer in the production environment. I see Polish characters there. You have to narrow the problem - the characters are lost during sending, persisting or retrieving. -- Gianni Mariani Google, Sydney --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: [giannim] [appengine-java] Re: Unicode problems
Looking at http://lskokan.appspot.com, somehow the strings are being rendered incorrectly in the application. It would be nice to know what the rendering code looks like. On Wed, Sep 16, 2009 at 9:08 PM, George Moschovitis george.moschovi...@gmail.com wrote: Make sure you have this meta tag in your generated html file. meta http-equiv=Content-Type content=text/html; charset=utf-8 / I *do* have this tag in my html! Also, you can set a response HTTP header with the same string. OK, I will try to set the HTTP header, but I don't think this is the problem. -g. -- Gianni Mariani Google, Sydney --~--~-~--~~~---~--~~ 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: doubt with detachable property...
one more doubt similar/related to previous one : i want to fetch object(s) from datastore, cache it to Memcache and fetch it from Memcache for further requests. and if any change happens to data i want to update the object(s) to datastore straight away using cashed instance of object instead of fetching it (again) form datastore and then updating it. following is a code snippet: Data data = cache.get(key); data.setValue(new updated value); pm.makePersistent(data); cache.put(key, data); thanks. On Wed, Sep 16, 2009 at 5:49 PM, Prashant antsh...@gmail.com wrote: hi, I tried the Updating an Object (using detachable property) example given herehttp://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Updating_an_Object. Later I found that even if I do not add *detachable=true *property to my JDO class it works without any problem. Is it ok to work without detachable property or it just worked with my case. Following is the code I tried : @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Data{ @SuppressWarnings(unused) @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String value; public Data(String value){ this.value = value; } public void setValue(String value){ this.value = value; } public String getValue(){ return this.value; } } public class Main extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException{ doReq(req, resp); } public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException{ doReq(req, resp); } private void doReq(HttpServletRequest req, HttpServletResponse resp) throws IOException{ Data data = new Data(some value); PrintWriter out = resp.getWriter(); PersistenceManager pm = PMF.get().getPersistenceManager(); pm.makePersistent(data); pm.close(); chageValue(data); out.close(); } @SuppressWarnings(unchecked) private void chageValue(Data data){ PersistenceManager pm = PMF.get().getPersistenceManager(); data.setValue(some other value.); pm.makePersistent(data); pm.close(); } } --~--~-~--~~~---~--~~ 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] null pointer issues when using compass with GAE
Hie Anyone using compass with GAE? I am frequently seeing not able to initilize PMF null pointer exception after adding code into PMF as usggested on kimchy's blog on using compass with GAE. Anyone any help on this please? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: [google-appengine] using a variable to buffer cache data...
thanks nick. Actually I wanted to use Task Queue instead of Global LinkedList, but this task queue quota is very limited. i am expecting my app to reach at least 5 to 10 lacks queues per day. 2009/9/16 Nick Johnson (Google) nick.john...@google.com Hi Prashant, In addition to what Barry says below, a couple of comments: - You can safely ignore the 'high cpu' warnings if you've already done what you can to optimize the page. You're not going to hit any invisible limits based on them, just the usual CPU quota etc. - If 'eventual' writes are good enough, you may want to look into using the task queue. You can enqueue the write in the task queue, which will do it offline and avoid making the user wait. -Nick Johnson On Wed, Sep 16, 2009 at 2:11 PM, Prashant antsh...@gmail.com wrote: hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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] JSP errors in hosted mode
I have been trying out Google App Engine for Java in Hosted mode and ran into something I hope someone can shed some light on. I'm using JSP pages and when a JSP page generates an error ( either compilation or runtime ) the error message displayed contains reference to the line number in the compiled servlet not the jsp source. For example, the following error is displayed for a simple invalid tag % abc %: Unable to compile class for JSP Generated servlet error: [javac] C:\DOCUME~1\username\LOCALS~1\Temp \Jetty_0_0_0_0_8080_warut4fm1\jsp\org\apache\jsp\index_jsp.java: 53: ';' expected Is there a way to get the GAE hosted mode server to display JSP source line level error messages? Any help would be much appreciated. Andy --~--~-~--~~~---~--~~ 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/JPA Snippets That Work - Creating a bidirectional, owned, one-to-many relationship
Thanks a lot for explanations. They've returned me my ability to sleep. :) On Sep 16, 7:44 am, Max Ross maxr+appeng...@google.com wrote: GAE does not support joins so Book.chapters is always lazy loaded. I'm guessing the old posts you're thinking of relate to lazy loading of non-relationship fields (Strings, ints, Dates, etc). These cannot be lazy loaded because GAE only fetches entire entities from the datastore (one exception to the rule - if you issue a query that only selects the key we will issue a keys-only query that fetches only the key, not the entire entity). Max On Tue, Sep 15, 2009 at 7:24 PM, Bulat Sirazetdinov bula...@gmail.comwrote: I have several questions on lazy loading. How can I make JDO (or JPA) lazy load Book.chapters on GAE? Is Chapter.book in your example really lazy loaded on GAE? P.S. I've found some old posts stating that lazy loading is not working on GAE datastore service. That's why I'm asking those questions. P.P.S. Good job! Seeing forward for new snippets. On Sep 15, 6:24 pm, Max Ross maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: This example only demonstrates creation of parent and child when both parent and child use datastore id generation. If you wanted to use a named Key for either of these objects as opposed to datastore id generation, the KeyFactory and the KeyFactory.Builder class would be involved. This would also be the case if you were constructing a Key to perform a lookup of either parent or child. I plan to devote other snippets to more complicated Key-management scenarios. Thanks, Max On Tue, Sep 15, 2009 at 4:16 AM, Jeff Arbaugh jeffarba...@gmail.com wrote: Max, Love the examples, however I have one question. In the GAE JDO documentation there's much written about the KeyFactory, Builder(s) and creating hierarcal Key(s). It's doesn't appear that your example has factored these in. I know littered through out my code are KeyFactory and Builders for the child objects. Should these Key Builders be included within your example? Thank you, Jeff On Mon, Sep 14, 2009 at 7:07 PM, Max Ross maxr+appeng...@google.commaxr%2bappeng...@google.com maxr%2bappeng...@google.com maxr%252bappeng...@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
[appengine-java] Re: [google-appengine] using a variable to buffer cache data...
Hi Prashant, On Wed, Sep 16, 2009 at 3:54 PM, Prashant antsh...@gmail.com wrote: thanks nick. Actually I wanted to use Task Queue instead of Global LinkedList, but this task queue quota is very limited. i am expecting my app to reach at least 5 to 10 lacks queues per day. How many is a 'lacks'? -Nick 2009/9/16 Nick Johnson (Google) nick.john...@google.com Hi Prashant, In addition to what Barry says below, a couple of comments: - You can safely ignore the 'high cpu' warnings if you've already done what you can to optimize the page. You're not going to hit any invisible limits based on them, just the usual CPU quota etc. - If 'eventual' writes are good enough, you may want to look into using the task queue. You can enqueue the write in the task queue, which will do it offline and avoid making the user wait. -Nick Johnson On Wed, Sep 16, 2009 at 2:11 PM, Prashant antsh...@gmail.com wrote: hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: self referral one-to-many relationship with null root
I myself am having problems with a self-referring tree structure of persistent entities where the root element has no parent and I get the exception org.datanucleus.exceptions.NucleusUserException: Field cloud.persistence.ItemCategory.icParent should be able to provide a reference to its parent but the entity does not have a parent. Did you perhaps try to establish an instance of ItemCategory as the child of an instance of ItemCategory after the child had already been persisted? when attempting to read the root element. Perhaps the DataNucleus plug-in for Google App Engine Issue Nº 80: Recursive relation does not work is the relevant issue (which I have now starred to monitor progress)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: How to make parent optional
I have the same problem. Does the DataNucleus plug-in for Google App Engine Issue Nº 80: Recursive relation does not work cover your problem (it does for me)? It looks like it might not be fixed soon, so I may have to switch to unowned relationships to get my tree structure to work --~--~-~--~~~---~--~~ 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: cron query
Thanks for the responses, I had ended up with this one (from Raphael) before I posted - just seems a bit inelegant to have to poll every minute when you know the desired times in advance. On Sep 16, 2:08 am, Raphael André Bauer raphael.andre.ba...@gmail.com wrote: On Wed, Sep 16, 2009 at 6:53 AM, antshpra antsh...@gmail.com wrote: no... you can generate a cron job that runs every minute and only executes the working task when the time is right (eg the 12:20 13:20 whatever..). this is fairly easy to make.. r --~--~-~--~~~---~--~~ 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: Location of Datastore/JDO (physical) file
Hi pion: In my case it's located at myProyect\war\WEB-INF\appengine-generated\local_db.bin Esteban Pion escribió: I am looking at the guestbook tutorial. The “Using the Datastore with JDO” section has the following code: … Date date = new Date(); Greeting greeting = new Greeting(user, content, date); PersistenceManager pm = PMF.get().getPersistenceManager(); try { pm.makePersistent(greeting); } finally { pm.close(); } … Where is the location of the (physical) file that actually store those info? I am running App Engine SDK 1.2.5 using Eclipse-Galileo on Windows Vista. Thanks in advance for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Creating static files from a servlet
Is there a way to create static files from a servlet? We are using an image upload JSP, but we currently store the image in the data store, and we serve the image back with a servlet. As the images are referenced from emails we send from AppEngine, it would be more efficient to just reference a static URL for the image, rather than pointing to the servlet (useless CPU and data store usage). Thanks, Jerome --~--~-~--~~~---~--~~ 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: JSP errors in hosted mode
Hi Andy, At this point, no. For JSP errors generated by javac, the error will refer to locations inside the generated servlet class, instead of inside the JSP file it came from. Errors from the JSP compiler, on the other hand, *will*generally refer to the actual JSP file/line that caused the error. I see that you've already created an issue in the public tracker, which is exactly the right approach. Incidentally, you created an issue *just minutes* before I created essentially the same issue (issue 2131http://code.google.com/p/googleappengine/issues/detail?id=2131) on your behalf! That's ok, though; I'll go ahead and mark mine as a duplicate. Thanks for reporting this, Keith On Wed, Sep 16, 2009 at 11:23 AM, andy asaut...@gmail.com wrote: I have been trying out Google App Engine for Java in Hosted mode and ran into something I hope someone can shed some light on. I'm using JSP pages and when a JSP page generates an error ( either compilation or runtime ) the error message displayed contains reference to the line number in the compiled servlet not the jsp source. For example, the following error is displayed for a simple invalid tag % abc %: Unable to compile class for JSP Generated servlet error: [javac] C:\DOCUME~1\username\LOCALS~1\Temp \Jetty_0_0_0_0_8080_warut4fm1\jsp\org\apache\jsp\index_jsp.java: 53: ';' expected Is there a way to get the GAE hosted mode server to display JSP source line level error messages? Any help would be much appreciated. Andy --~--~-~--~~~---~--~~ 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] Wrong default urls in TaskQueue. Bug?
if i fill queue without TaskOption.url: queue = QueueFactory.getDefaultQueue() queue.add() or queue = QueueFactory.getQueue(myqueue) queue.add() i get URLs in local and prod: /_ah/queue instead of /_ah/queue/default or /_ah/queue/myqueue Is it a bug or am i doing something wrong? If i use Python SDK, default urls are correct... --~--~-~--~~~---~--~~ 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: Regarding error 500
Have you verified that req.getParameter(body) does not return null? - Jason On Mon, Sep 14, 2009 at 5:37 AM, mahesh nimmala.anukar...@gmail.com wrote: hi i am working with a sample application in gooleappengine and when iam sending a request to application through the browser iam getting the following error HTTP ERROR: 500 Must set a body RequestURI=/helloxmpp1 Caused by: java.lang.IllegalArgumentException: Must set a body at com.google.appengine.api.xmpp.MessageBuilder.build (MessageBuilder.java:54) at com.google.appengine.demos.HelloXmpp1Servlet.doGet (HelloXmpp1Servlet.java:41) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:313) 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) Powered by Jetty:// actually class and xml file which i have written for my application are as follows: java class: // Copyright 2008 Google Inc. All rights reserved. package com.google.appengine.demos; import com.google.appengine.api.xmpp.JID; import com.google.appengine.api.xmpp.Message; import com.google.appengine.api.xmpp.MessageBuilder; import com.google.appengine.api.xmpp.MessageType; import com.google.appengine.api.xmpp.Presence; import com.google.appengine.api.xmpp.SendResponse; import com.google.appengine.api.xmpp.XMPPService; import com.google.appengine.api.xmpp.XMPPServiceFactory; import java.io.IOException; import java.util.Map; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * HelloXmpp is an echo bot that sends back the message it receives. */ public class HelloXmpp1Servlet extends HttpServlet { private XMPPService xmppService; @Override public void init() { this.xmppService = XMPPServiceFactory.getXMPPService(); } // For testing. Real requests are POST public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException { Message message =new MessageBuilder() .withMessageType(MessageType.CHAT) .withFromJid(new JID(req.getParameter(from))) .withRecipientJids(new JID(req.getParameter(to))) .withBody(req.getParameter(body)) .build(); processMessage(message, res); } public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { processMessage(xmppService.parseMessage(req), res); } public void processMessage(Message message, HttpServletResponse res) throws IOException { JID fromId = message.getFromJid(); Presence presence = xmppService.getPresence(fromId); String presenceString = presence.isAvailable() ? : not ; SendResponse response = xmppService.sendMessage( new MessageBuilder(). withBody(message.getBody() + (you are + presenceString + available)).
[appengine-java] Re: Regarding 404 error
I think you misspecified your servlet-mapping in your web.xml file. Change it to: servlet-mapping servlet-namecom.google.appengine.demos.taskqueueexamples/servlet-name url-pattern/SimpleCounterWork/url-pattern /servlet-mapping - Jason On Mon, Sep 14, 2009 at 6:32 AM, mahesh nimmala.anukar...@gmail.com wrote: hi i have developed an application and when iam trying to access the application through url request from browser iam getting thesome error my application code is as follows classes for my app Counter.java /* Copyright (c) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.appengine.demos.taskqueueexamples; import javax.jdo.JDOObjectNotFoundException; import javax.jdo.PersistenceManager; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; /** * A JDO object representing a counter. */ @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Counter { @PrimaryKey private String name; @Persistent private int count; public Counter(String name, int count) { this.name = name; this.count = count; } public String getName() { return name; } public int getCount() { return count; } public void increment(int delta) { count += delta; } /* Helper methods */ public static void createOrIncrement(String name, int delta) { PersistenceManager pm = PMF.get().getPersistenceManager(); Counter counter = null; try { pm.currentTransaction().begin(); try { counter = pm.getObjectById(Counter.class, name); counter.increment(delta); } catch (JDOObjectNotFoundException e) { counter = new Counter(name, delta); pm.makePersistent(counter); } pm.currentTransaction().commit(); } finally { if (pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } } } public static int getCount(String name) { PersistenceManager pm = PMF.get().getPersistenceManager(); Counter counter = null; try { counter = pm.getObjectById(Counter.class, name); } catch (JDOObjectNotFoundException e) { } if (counter == null) { return 0; } else { return counter.getCount(); } } } PMF.java /* Copyright (c) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.appengine.demos.taskqueueexamples; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; public final class PMF { private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory(transactions-optional); private PMF() {} public static PersistenceManagerFactory get() { return pmfInstance; } } SimpleCounterWork.java /* Copyright (c) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.appengine.demos.taskqueueexamples; import java.io.IOException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Task Queue worker servlet that offsets a counter by a delta. */ public class SimpleCounterWork extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws
[appengine-java] Re: Regarding 404 error
Or whichever servlet is appropriate for that particular endpoint. - Jason On Wed, Sep 16, 2009 at 10:59 AM, Jason (Google) apija...@google.comwrote: I think you misspecified your servlet-mapping in your web.xml file. Change it to: servlet-mapping servlet-namecom.google.appengine.demos.taskqueueexamples/servlet-name url-pattern/SimpleCounterWork/url-pattern /servlet-mapping - Jason On Mon, Sep 14, 2009 at 6:32 AM, mahesh nimmala.anukar...@gmail.comwrote: hi i have developed an application and when iam trying to access the application through url request from browser iam getting thesome error my application code is as follows classes for my app Counter.java /* Copyright (c) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.appengine.demos.taskqueueexamples; import javax.jdo.JDOObjectNotFoundException; import javax.jdo.PersistenceManager; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; /** * A JDO object representing a counter. */ @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Counter { @PrimaryKey private String name; @Persistent private int count; public Counter(String name, int count) { this.name = name; this.count = count; } public String getName() { return name; } public int getCount() { return count; } public void increment(int delta) { count += delta; } /* Helper methods */ public static void createOrIncrement(String name, int delta) { PersistenceManager pm = PMF.get().getPersistenceManager(); Counter counter = null; try { pm.currentTransaction().begin(); try { counter = pm.getObjectById(Counter.class, name); counter.increment(delta); } catch (JDOObjectNotFoundException e) { counter = new Counter(name, delta); pm.makePersistent(counter); } pm.currentTransaction().commit(); } finally { if (pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } } } public static int getCount(String name) { PersistenceManager pm = PMF.get().getPersistenceManager(); Counter counter = null; try { counter = pm.getObjectById(Counter.class, name); } catch (JDOObjectNotFoundException e) { } if (counter == null) { return 0; } else { return counter.getCount(); } } } PMF.java /* Copyright (c) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.appengine.demos.taskqueueexamples; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; public final class PMF { private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory(transactions-optional); private PMF() {} public static PersistenceManagerFactory get() { return pmfInstance; } } SimpleCounterWork.java /* Copyright (c) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.appengine.demos.taskqueueexamples; import java.io.IOException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Task Queue worker servlet that offsets a
[appengine-java] Re: Issue on using Spring MVC framework on GAE.
Hi Brian. What field types are in your command class? If you're using anything besides a String, Long, or Boolean (taken from the snippet I posted earlier), you'll have to add another custom editor for that property type. - Jason On Mon, Sep 14, 2009 at 9:14 AM, Brian Dorry brian.do...@gmail.com wrote: Running into the same problem here using both the bean definition and overriding the initBinder method on the SimpleFormController. Any other insight into this issue? On Sep 11, 3:13 pm, Jason (Google) apija...@google.com wrote: If you're subclassing SimpleFormController, you can also override the initBinder method in your custom classes directly. e.g.: @Override protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); binder.registerCustomEditor(Boolean.class, new CustomBooleanEditor(false)); binder.registerCustomEditor(Long.class, new CustomNumberEditor(Long.class, true)); } - Jason On Thu, Sep 10, 2009 at 5:00 AM, xueqiang.mi allo...@gmail.com wrote: Thanks. The problem I encountered is caused by the Spring form tag, I have fixed it. If you want to use form tag, you must override the initBinder method of WebBindingInitializer, otherwise you will get a error: org.springframework.web.servlet.tags.RequestContextAwareTag doStartTag: access denied (java.lang.RuntimePermission getClassLoader) java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) .. Nested in org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: java.security.AccessControlException cannot be cast to javax.servlet.ServletException: java.lang.ClassCastException: java.security.AccessControlException cannot be cast to javax.servlet.ServletException You should write your own WebBindingInitializer class {code} public class TheFocusBindingInitializer implements WebBindingInitializer { @Override public void initBinder(WebDataBinder binder, WebRequest request) { binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); } } {code} and then inject it into the AnnotationMethodHandlerAdapter by the following configuration: {xml} bean class=org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter property name=webBindingInitializer bean class=com.appspot.thefocus.web.TheFocusBindingInitializer / /property /bean {xml} On 9月10日, 下午4时13分, Loïc Talbot loic.tal...@gmail.com wrote: Hi, I've tried successfully spring mvc with this tutorial (Flex, graniteDS, springMVC) : http://graniteds.blogspot.com/2009/04/graniteds-20-on-google-app-engi. .. Moreover Spring MVC is compatible with GAE according to this : http://groups.google.com/group/google-appengine-java/web/will-it-play. .. You should find a more verbose and meaningful error in the console log underhttps://appengine.google.com/ The stack trace should be there. Loïc 2009/9/10 xueqiang.mi allo...@gmail.com Have anyone used Spring MVC framework on GAE? My project runs well on my pc, but after uploading on the GAE server, it doesn't work. A error comes out: Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. http://alloyer.appspot.com Can anyone help me here? --~--~-~--~~~---~--~~ 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 static files from a servlet
You can also avoid extra traffic against your servlet and datastore by making sure to set http caching headers appropriately. On Wed, Sep 16, 2009 at 1:50 PM, Don Schwarz schwa...@google.com wrote: The Service for storing and serving large files item on the Roadmap will give you what you want when it launches: http://code.google.com/appengine/docs/roadmap.html In the mean time your current approach sounds reasonable. On Wed, Sep 16, 2009 at 12:35 PM, Jerome jerome.mou...@gmail.com wrote: Is there a way to create static files from a servlet? We are using an image upload JSP, but we currently store the image in the data store, and we serve the image back with a servlet. As the images are referenced from emails we send from AppEngine, it would be more efficient to just reference a static URL for the image, rather than pointing to the servlet (useless CPU and data store usage). Thanks, Jerome --~--~-~--~~~---~--~~ 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: Java Security Error
Hi Ravi. As Gianni wrote, you can't use JDBC directly. Using App Engine's datastore would be ideal, but if you must use an existing RDBMS, you'll have to put a web service in front of it. This can be as simple as a servlet or script (not running on App Engine) which retrieves the data and returns it as plain text, XML, JSON, or another format of your choice. You can call this servlet or script using App Engine's URL Fetch service. - Jason On Mon, Sep 14, 2009 at 10:11 AM, Ravi Mandliya funkyr...@gmail.com wrote: Thanks for the reply... Can u please elaborate How JDBC request can be pushed to another server I have an event coming up so I have to upload the site in urgency. any help would be appreciated. On Sep 14, 2:25 am, Gianni Mariani gian...@google.com wrote: App Engine does not allow access to JDBC. You must either use the App Engine Datastore or push you JDBC requests to another server using the UrlFetch service (perhaps using SDC). On Sun, Sep 13, 2009 at 2:14 AM, Ravi Mandliya funkyr...@gmail.com wrote: Hello everyone I just uploaded my first application, its running, and seems to be working fine, but there is a problem, I get the following error when onblur() on the textbox is activated, I have applied ajax which fetches the data from Database(IBM DB2). It generates the following error: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.io) Full error code is following: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139) at java.lang.SecurityManager.checkPackageAccess(Unknown Source) at org.apache.jasper.servlet.JasperLoader.loadClass (JasperLoader.java: 117) at org.apache.jasper.servlet.JasperLoader.loadClass (JasperLoader.java: 69) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at java.sql.DriverManager.getCallerClass(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.apache.jsp.validate_jsp._jspService(validate_jsp.java: 65) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 806) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access $101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet $2.run (PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service (PrivilegedJspServlet.java:57) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 806) at org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle (WebAppContext.java: 405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139)
[appengine-java] Re: A parent cannot be established or changed once an object has been persisted
I don't have an example handy, but if you can paste your model classes and your code, I can try to point you in the right direction. - Jason On Mon, Sep 14, 2009 at 6:29 AM, Anita an...@ensarm.com wrote: hi, I am facing same problem. I referred to above given link as well but could not succeed. Can anyone please provide me with a complete example. Thanks, Anita On Jul 18, 11:50 am, George Simon george.simo...@gmail.com wrote: Thanks Max. I followed the notes and its working fine. On Fri, Jul 17, 2009 at 6:44 AM, Max Ross maxr+appeng...@google.com maxr%2bappeng...@google.com maxr%2bappeng...@google.com maxr%252bappeng...@google.com wrote: Many to many relationships are not yet supported. Suggested workaround is here: http://code.google.com/appengine/docs/java/datastore/relationships.ht. .. Thanks, Max On Fri, Jul 17, 2009 at 9:28 AM, GS george.simo...@gmail.com wrote: I am getting an issue in many to many relationships A parent cannot be established or changed once an object has been persisted. My Code is given below @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable=true) public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String property; public A(Key key, String property) { super(); this.key = key; this.property = property; } @Persistent private SetB bObjs = new HashSetB(); public void addB(B bObj) { bObjs.add(bObj); } } - @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable=true) public class B { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String prop; public B(Key key, String prop) { super(); this.key = key; this.prop = prop; } @Persistent private SetA aObjs = new HashSetA(); public void addA(A a){ aObjs.add(a); } } -- class MyServlet{ public boolean createData() { PersistenceManagerFactory pmf = PMF.get(); PersistenceManager pm = pmf.getPersistenceManager(); pm.setDetachAllOnCommit(true); //javax.jdo.Transaction tx = pm.currentTransaction(); Object[] aIds = new Object[3]; Object[] bIds = new Object[3]; try { A aObject1 = new A(KeyFactory.createKey(A.class.getSimpleName(), a1001), Property for A(1)); A aObject2 = new A(KeyFactory.createKey(A.class.getSimpleName(), a1002), Property for A(2)); A aObject3 = new A(KeyFactory.createKey(A.class.getSimpleName(), a1003), Property for A(3)); B bObject1 = new B(KeyFactory.createKey(B.class.getSimpleName(), b1001), Property value for B(1) ); B bObject2 = new B(KeyFactory.createKey(B.class.getSimpleName(), b1002), Property value for B(2) ); B bObject3 = new B(KeyFactory.createKey(B.class.getSimpleName(), b1003), Property value for B(3) ); pm.makePersistent(aObject1); pm.makePersistent(aObject2); pm.makePersistent(aObject3); pm.makePersistent(bObject1); pm.makePersistent(bObject2); pm.makePersistent(bObject3); aIds[0] = aObject1.getKey(); aIds[1] = aObject2.getKey(); aIds[2] = aObject3.getKey(); bIds[0] = bObject1.getKey(); bIds[1] = bObject2.getKey(); bIds[2] = bObject3.getKey(); tx = pm.currentTransaction(); tx.begin(); aObject1.addB(bObject1); aObject1.addB(bObject2); bObject3.addA(aObject2); bObject3.addA(aObject3); tx.commit(); } catch (Exception e) { log.warning(Error while adding + e.getMessage()); if (tx.isActive()) {
[appengine-java] makePersistent() question
I am using App Engine SDK 1.2.5 with Eclipse-Galileo on Windows Vista with the following (simplified/stripped) code: import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class FooDb { @PrimaryKey @Persistent private String id; @Persistent private String name; public FoafIndexDb(String id, String name) { this.id = id; this.name = name; } } // import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; public final class PMF { public static PersistenceManagerFactory get() { return pmfInstance; } private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory(transactions-optional); } // PersistenceManager pm = PMF.get().getPersistenceManager(); FooDb fooDb = new FooDb (key, name); try { pm.makePersistent(foafIndexDb); } finally { pm.close(); } // The output from DataNucleus Enhancement during build: DataNucleus Enhancer (version 1.1.4) : Enhancement of classes DataNucleus Enhancer completed with success for 1 classes. Timings : input=147 ms, enhance=29 ms, total=176 ms. Consult the log for full details // The output during execution: 0 [btpool0-3] DEBUG DataNucleus.Connection - Registered transactional connection factory under name appengine 1 [btpool0-3] DEBUG DataNucleus.Connection - Registered nontransactional connection factory under name appengine 395 [btpool0-3] DEBUG DataNucleus.Connection - Connection added to the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 399 [btpool0-3] DEBUG DataNucleus.Connection - Connection found in the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 399 [btpool0-3] DEBUG DataNucleus.Connection - Connection found in the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 597 [btpool0-3] DEBUG DataNucleus.Connection - Connection found in the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 601 [btpool0-3] DEBUG DataNucleus.Reachability - Performing check of objects for persistence-by-reachability (commit) ... 601 [btpool0-3] DEBUG DataNucleus.Reachability - Completed check of objects for persistence-by-reachability (commit). // THE PROBLEM: No (data) file created after running the above. war\WEB-INF\appengine-generated\ folder only has datastore-indexes- auto.xml which contains the following: !-- Indices written at Wed, 16 Sep 2009 17:58:16 UTC -- datastore-indexes/ I am new on this. What did I miss? Thanks in advance for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] From adult google group.
For google-appengine-java group members. HD tube adult movies. Sorted by rating of millions users http://www.2watch4.com/redsdkp/includes/db/www/ --~--~-~--~~~---~--~~ 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: makePersistent() question
The local_db.bin shows up now. It seems that I have to wait for a minute or two before it shows up on the war\WEB-INF\appengine-generated. On Sep 16, 12:20 pm, Pion onlee2...@gmail.com wrote: I am using App Engine SDK 1.2.5 with Eclipse-Galileo on Windows Vista with the following (simplified/stripped) code: import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class FooDb { @PrimaryKey @Persistent private String id; @Persistent private String name; public FoafIndexDb(String id, String name) { this.id = id; this.name = name; } } // import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; public final class PMF { public static PersistenceManagerFactory get() { return pmfInstance; } private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory(transactions-optional); } // PersistenceManager pm = PMF.get().getPersistenceManager(); FooDb fooDb = new FooDb (key, name); try { pm.makePersistent(foafIndexDb); } finally { pm.close(); } // The output from DataNucleus Enhancement during build: DataNucleus Enhancer (version 1.1.4) : Enhancement of classes DataNucleus Enhancer completed with success for 1 classes. Timings : input=147 ms, enhance=29 ms, total=176 ms. Consult the log for full details // The output during execution: 0 [btpool0-3] DEBUG DataNucleus.Connection - Registered transactional connection factory under name appengine 1 [btpool0-3] DEBUG DataNucleus.Connection - Registered nontransactional connection factory under name appengine 395 [btpool0-3] DEBUG DataNucleus.Connection - Connection added to the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 399 [btpool0-3] DEBUG DataNucleus.Connection - Connection found in the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 399 [btpool0-3] DEBUG DataNucleus.Connection - Connection found in the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 597 [btpool0-3] DEBUG DataNucleus.Connection - Connection found in the pool : org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl $datastoremanagedconnect...@1a2d209 601 [btpool0-3] DEBUG DataNucleus.Reachability - Performing check of objects for persistence-by-reachability (commit) ... 601 [btpool0-3] DEBUG DataNucleus.Reachability - Completed check of objects for persistence-by-reachability (commit). // THE PROBLEM: No (data) file created after running the above. war\WEB-INF\appengine-generated\ folder only has datastore-indexes- auto.xml which contains the following: !-- Indices written at Wed, 16 Sep 2009 17:58:16 UTC -- datastore-indexes/ I am new on this. What did I miss? Thanks in advance for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: [google-appengine] using a variable to buffer cache data...
ohh sorry, my bad, I meant Lakhs (1Lakh = 100, 000). 2009/9/16 Nick Johnson (Google) nick.john...@google.com Hi Prashant, On Wed, Sep 16, 2009 at 3:54 PM, Prashant antsh...@gmail.com wrote: thanks nick. Actually I wanted to use Task Queue instead of Global LinkedList, but this task queue quota is very limited. i am expecting my app to reach at least 5 to 10 lacks queues per day. How many is a 'lacks'? -Nick 2009/9/16 Nick Johnson (Google) nick.john...@google.com Hi Prashant, In addition to what Barry says below, a couple of comments: - You can safely ignore the 'high cpu' warnings if you've already done what you can to optimize the page. You're not going to hit any invisible limits based on them, just the usual CPU quota etc. - If 'eventual' writes are good enough, you may want to look into using the task queue. You can enqueue the write in the task queue, which will do it offline and avoid making the user wait. -Nick Johnson On Wed, Sep 16, 2009 at 2:11 PM, Prashant antsh...@gmail.com wrote: hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: CPU Occasionally Spikes when HttpSession is Created
Sono one else has noticed anything like this??? Regards, Jamie On Sep 15, 9:13 am, Traveler1980 jshar...@gmail.com wrote: Hi Everyone, I've noticed that CPU occasionally spikes when creating an HTTPSession. It only seems to happen when it's been awhile since an app has been accessed or when an app is initially deployed. For example, I created a simple test servlet that creates a session and and writes a response: protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.getSession(); PrintWriter writer = resp.getWriter(); writer.write(Test Complete); writer.flush(); writer.close(); } When I deploy the app and invoke the servlet for the first time, I see the following in the admin console: 09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/ 2009011913 Firefox/3.0.6 (.NET C Note the high CPU and long response time. Subsequent session creations are much faster. If I delete my cookies and re-invoke the servlet, CPU is approx. 70-80ms. Now, if I leave the app for awhile (let's say an hour) and hit the servlet again, CPU is once again through the roof for the initial GET. Any thoughts about what's going on here? I know that Google's session management involves memcache and the datastore. Could the high CPU be a side-effect of some initialization routine, etc...? Thanks for the feedback, Jamie --~--~-~--~~~---~--~~ 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: CPU Occasionally Spikes when HttpSession is Created
Sono one else has noticed anything like this??? Regards, Jamie On Sep 15, 9:13 am, Traveler1980 jshar...@gmail.com wrote: Hi Everyone, I've noticed that CPU occasionally spikes when creating an HTTPSession. It only seems to happen when it's been awhile since an app has been accessed or when an app is initially deployed. For example, I created a simple test servlet that creates a session and and writes a response: protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.getSession(); PrintWriter writer = resp.getWriter(); writer.write(Test Complete); writer.flush(); writer.close(); } When I deploy the app and invoke the servlet for the first time, I see the following in the admin console: 09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/ 2009011913 Firefox/3.0.6 (.NET C Note the high CPU and long response time. Subsequent session creations are much faster. If I delete my cookies and re-invoke the servlet, CPU is approx. 70-80ms. Now, if I leave the app for awhile (let's say an hour) and hit the servlet again, CPU is once again through the roof for the initial GET. Any thoughts about what's going on here? I know that Google's session management involves memcache and the datastore. Could the high CPU be a side-effect of some initialization routine, etc...? Thanks for the feedback, Jamie --~--~-~--~~~---~--~~ 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: [google-appengine] using a variable to buffer cache data...
Hi Prashant, The task queue quota for billed apps is currently set at 100,000. If you have a compelling use case for more tasks per day, we can increase your quota accordingly. -Nick On Wed, Sep 16, 2009 at 9:00 PM, Prashant antsh...@gmail.com wrote: ohh sorry, my bad, I meant Lakhs (1Lakh = 100, 000). 2009/9/16 Nick Johnson (Google) nick.john...@google.com Hi Prashant, On Wed, Sep 16, 2009 at 3:54 PM, Prashant antsh...@gmail.com wrote: thanks nick. Actually I wanted to use Task Queue instead of Global LinkedList, but this task queue quota is very limited. i am expecting my app to reach at least 5 to 10 lacks queues per day. How many is a 'lacks'? -Nick 2009/9/16 Nick Johnson (Google) nick.john...@google.com Hi Prashant, In addition to what Barry says below, a couple of comments: - You can safely ignore the 'high cpu' warnings if you've already done what you can to optimize the page. You're not going to hit any invisible limits based on them, just the usual CPU quota etc. - If 'eventual' writes are good enough, you may want to look into using the task queue. You can enqueue the write in the task queue, which will do it offline and avoid making the user wait. -Nick Johnson On Wed, Sep 16, 2009 at 2:11 PM, Prashant antsh...@gmail.com wrote: hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: CPU Occasionally Spikes when HttpSession is Created
App Engine retires and spins up new instances of your app based on demand. If a new instance of your app is being created, you'll see higher CPU then normal as all of your code gets reloaded and initialized. This sounds like the behavior you're seeing. One way to test that is to write a logging statement in your Servlet's init() method. On Wed, Sep 16, 2009 at 4:00 PM, Traveler1980 jshar...@gmail.com wrote: Sono one else has noticed anything like this??? Regards, Jamie On Sep 15, 9:13 am, Traveler1980 jshar...@gmail.com wrote: Hi Everyone, I've noticed that CPU occasionally spikes when creating an HTTPSession. It only seems to happen when it's been awhile since an app has been accessed or when an app is initially deployed. For example, I created a simple test servlet that creates a session and and writes a response: protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.getSession(); PrintWriter writer = resp.getWriter(); writer.write(Test Complete); writer.flush(); writer.close(); } When I deploy the app and invoke the servlet for the first time, I see the following in the admin console: 09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/ 2009011913 Firefox/3.0.6 (.NET C Note the high CPU and long response time. Subsequent session creations are much faster. If I delete my cookies and re-invoke the servlet, CPU is approx. 70-80ms. Now, if I leave the app for awhile (let's say an hour) and hit the servlet again, CPU is once again through the roof for the initial GET. Any thoughts about what's going on here? I know that Google's session management involves memcache and the datastore. Could the high CPU be a side-effect of some initialization routine, etc...? Thanks for the feedback, Jamie --~--~-~--~~~---~--~~ 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: JSP errors in hosted mode
Hi Andy, Actually, both the JSP compiler (Jasper) and javac process your JSPs. Jasper's compiler is really more of a pre-processor than an actual compiler: it just converts a JSP into source code for a Java servlet, which javac then compiles into Java bytecode. The problem comes when the Java servlet source that's generated by Jasper is malformed (due to errors in the JSP) and causes javac to generate errors. Those errors, as you noticed, refer to the locations within the generated servlet source code instead of in the original JSP. Internally, Jasper does maintain source mappings between the two, though, so it should be possible for the App Engine SDK to *always* report errors in terms of the original JSP. Keith On Wed, Sep 16, 2009 at 4:12 PM, andy asaut...@gmail.com wrote: Thanks Keith. I somewhat understand your point. Since you say the JSP compiler would give the desired information is there a way to configure the hosted mode to use the JSP compiler instead of javac? From the IRC chat today it was suggested that I add an issue. The issue I added was http://code.google.com/p/googleappengine/issues/detail?id=2132. If anyone else feels this is an issue please feel free to star the issue. Thanks again. On Sep 16, 11:49 am, Keith Platfoot kplatf...@google.com wrote: Hi Andy, At this point, no. For JSP errors generated by javac, the error will refer to locations inside the generated servlet class, instead of inside the JSP file it came from. Errors from the JSP compiler, on the other hand, *will*generally refer to the actual JSP file/line that caused the error. I see that you've already created an issue in the public tracker, which is exactly the right approach. Incidentally, you created an issue *just minutes* before I created essentially the same issue (issue 2131http://code.google.com/p/googleappengine/issues/detail?id=2131) on your behalf! That's ok, though; I'll go ahead and mark mine as a duplicate. Thanks for reporting this, Keith On Wed, Sep 16, 2009 at 11:23 AM, andy asaut...@gmail.com wrote: I have been trying out Google App Engine for Java in Hosted mode and ran into something I hope someone can shed some light on. I'm using JSP pages and when a JSP page generates an error ( either compilation or runtime ) the error message displayed contains reference to the line number in the compiled servlet not the jsp source. For example, the following error is displayed for a simple invalid tag % abc %: Unable to compile class for JSP Generated servlet error: [javac] C:\DOCUME~1\username\LOCALS~1\Temp \Jetty_0_0_0_0_8080_warut4fm1\jsp\org\apache\jsp\index_jsp.java: 53: ';' expected Is there a way to get the GAE hosted mode server to display JSP source line level error messages? Any help would be much appreciated. Andy --~--~-~--~~~---~--~~ 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: Wrong default urls in TaskQueue. Bug?
Yes, this is a bug. Please file an issue in our issue tracker and I'll see to it that this gets fixed. On Wed, Sep 16, 2009 at 2:43 PM, Vince Bonfanti vbonfa...@gmail.com wrote: I've noticed the same problem. I think it's a bug. Vince On Wed, Sep 16, 2009 at 1:53 PM, oizo m...@oizo.biz wrote: if i fill queue without TaskOption.url: queue = QueueFactory.getDefaultQueue() queue.add() or queue = QueueFactory.getQueue(myqueue) queue.add() i get URLs in local and prod: /_ah/queue instead of /_ah/queue/default or /_ah/queue/myqueue Is it a bug or am i doing something wrong? If i use Python SDK, default urls are correct... --~--~-~--~~~---~--~~ 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: testing applications in GAE - jUnit4
ok, i will publish in the weekend.bye! On Tue, Sep 15, 2009 at 4:00 PM, Vince Bonfanti vbonfa...@gmail.com wrote: Hi Nicolas, I'm interested in seeing what you've done. Thanks. Vince On Tue, Sep 15, 2009 at 9:33 AM, Nicolas Melendez nmelen...@getsense.com.ar wrote: Hi EveryBody: The how-to for testing in GAE is for Junit3 , there should be also for junit4 which has -Annotations -Assert of expeted Exceptions -Test classes don't extends from TestCase, so we are more free to design class hirarchy. Also the migration from Junit3 to Junit4 isn't so easy(but not imposible) i have made my own implementation for GAE, i can share if people are interested. Thanks, bye! NM - Java Developer --~--~-~--~~~---~--~~ 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: CPU Occasionally Spikes when HttpSession is Created
Thanks Toby. Your explanation makes sense and it looks like that's exactly what's happening: 09-16 01:39PM 57.474 /test 200 4036ms 4478cpu_ms 65api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) W 09-16 01:40PM 00.884 foo.bar.TestServlet init: Initializing Test Servlet W 09-16 01:40PM 00.908 foo.bar.TestServlet doGet: Before calling request.getSession() W 09-16 01:40PM 01.484 foo.bar.TestServlet doGet: After calling request.getSession() On Sep 16, 4:09 pm, Toby Reyelts to...@google.com wrote: App Engine retires and spins up new instances of your app based on demand. If a new instance of your app is being created, you'll see higher CPU then normal as all of your code gets reloaded and initialized. This sounds like the behavior you're seeing. One way to test that is to write a logging statement in your Servlet's init() method. On Wed, Sep 16, 2009 at 4:00 PM, Traveler1980 jshar...@gmail.com wrote: Sono one else has noticed anything like this??? Regards, Jamie On Sep 15, 9:13 am, Traveler1980 jshar...@gmail.com wrote: Hi Everyone, I've noticed that CPU occasionally spikes when creating an HTTPSession. It only seems to happen when it's been awhile since an app has been accessed or when an app is initially deployed. For example, I created a simple test servlet that creates a session and and writes a response: protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.getSession(); PrintWriter writer = resp.getWriter(); writer.write(Test Complete); writer.flush(); writer.close(); } When I deploy the app and invoke the servlet for the first time, I see the following in the admin console: 09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/ 2009011913 Firefox/3.0.6 (.NET C Note the high CPU and long response time. Subsequent session creations are much faster. If I delete my cookies and re-invoke the servlet, CPU is approx. 70-80ms. Now, if I leave the app for awhile (let's say an hour) and hit the servlet again, CPU is once again through the roof for the initial GET. Any thoughts about what's going on here? I know that Google's session management involves memcache and the datastore. Could the high CPU be a side-effect of some initialization routine, etc...? Thanks for the feedback, Jamie --~--~-~--~~~---~--~~ 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] Error 400 while trying to upload my application for the first time
Hi, my application runs fine locally. I'd like to upload it for the fist time and I get the following error : java.io.IOException: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id=IDversion=1; 400 Bad Request Error when loading application configuration: while scanning a simple key in string, line 23, column 1: \ ^ could not found expected ':' in string, line 25, column 9: script: unused ^ II try to upload from the Eclipse plugin. Can someone help me in debugging this ? Thx ! Note: I posted this message inthe general group and Nick from Google advices me to post in the java group with some files. Here they are : web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-namegreetServlet/servlet-name servlet-classcom.me.myapp.is.server.GreetingServiceImpl/servlet- class /servlet servlet-mapping servlet-namegreetServlet/servlet-name url-pattern/myapp/greet/url-pattern /servlet-mapping servlet servlet-namestationListUpdater/servlet-name servlet-classcom.me.myapp.is.servlet.StationListUpdater/servlet- class /servlet servlet-mapping servlet-namestationListUpdater/servlet-name url-pattern/update/url-pattern /servlet-mapping servlet servlet-nameStationAvailabilitiesUpdater/servlet-name servlet- classcom.me.myapp.is.servlet.StationAvailabilitiesUpdater/servlet- class /servlet servlet-mapping servlet-nameStationAvailabilitiesUpdater/servlet-name url-pattern/ /url-pattern /servlet-mapping !-- Default page to serve -- welcome-file-list welcome-filemyapp.html/welcome-file /welcome-file-list security-constraint web-resource-collection url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint /web-app - logging.properties : # A default java.util.logging configuration. # (All App Engine logging is through java.util.logging by default). # # To use this configuration, copy it into your application's WEB-INF # folder and add the following to your appengine-web.xml: # # system-properties # property name=java.util.logging.config.file value=WEB-INF/ logging.properties/ # /system-properties # # Set the default logging level for all loggers to INFO .level = INFO # Set the default logging level for ORM, specifically, to WARNING DataNucleus.JDO.level=WARNING DataNucleus.Persistence.level=WARNING DataNucleus.Cache.level=WARNING DataNucleus.MetaData.level=WARNING DataNucleus.General.level=WARNING DataNucleus.Utility.level=WARNING DataNucleus.Transaction.level=WARNING DataNucleus.Datastore.level=WARNING DataNucleus.ClassLoading.level=WARNING DataNucleus.Plugin.level=WARNING DataNucleus.ValueGeneration.level=WARNING DataNucleus.Enhancer.level=WARNING DataNucleus.SchemaTool.level=WARNING --- cron.xml: ?xml version=1.0 encoding=UTF-8? cronentries cron url/update_availabilities/url descriptionRempli les dispo des groupes - Group Reseau 1/ description scheduleevery 3 minutes/schedule /cron !-- cron-- !--url/weeklyreport/url-- !--descriptionMail out a weekly report/description-- !--scheduleevery monday 08:30/schedule-- !--timezoneAmerica/New_York/timezone-- !-- /cron-- /cronentries --- ?xml version=1.0 encoding=utf-8? appengine-web-app xmlns=http://appengine.google.com/ns/1.0; applicationmyappid/application version1/version !-- Configure java.util.logging -- system-properties property name=java.util.logging.config.file value=WEB-INF/ logging.properties/ /system-properties /appengine-web-app I use eclipse and the plugin Google App Engine Java SDK 1.2.5 1.2.5.v200909021031 com.google.appengine.eclipse.sdkbundle.e35.feature.feature.group If i try to update with appcfg I get the additionnal log lines : at com.google.appengine.tools.admin.ServerConnection.send (ServerConnection.java:143) at com.google.appengine.tools.admin.ServerConnection.post (ServerConnection.java:81) at com.google.appengine.tools.admin.AppVersionUpload.send (AppVersionUpload.java:429) at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction (AppVersionUpload.java:243) at com.google.appengine.tools.admin.AppVersionUpload.doUpload (AppVersionUpload.java:98) at com.google.appengine.tools.admin.AppAdminImpl.update (AppAdminImpl.java:53) ... 4 more - and finally I use as applicationid the id given in the field Application Identifier under application settings section. I do not expect a patch but just a workaround :-) or an explanation :-) Thks to everybody for your help.
[appengine-java] Re: Detching an object graph with JDO
You can declare a field to be in the default fetch group if you always want the field to be available: @Persistent(defaultFetchGroup = true) private ListValue values; If you don't want to go with this approach, you can also touch the field that you want (e.g. call item.getItemValues()) before calling pm.close. After detaching the object, the values field will be available since they will have been lazily fetched with the getter call. - Jason On Mon, Sep 14, 2009 at 11:47 AM, bysse erik.byst...@gmail.com wrote: Clearly i'm just as lost now as before On Sep 14, 7:54 pm, bysse erik.byst...@gmail.com wrote: Okej, i've learned a bit more since i've posted these messages. I didn't quite understand (still don't probably) fetchgroups and detach enough. Anyway, the problem i had with could be avoided by defining fetch groups for fields that will be stored in different tables. If i have a declaration like this: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) @FetchGroup(name = ItemValues, members = { @Persistent(name = values) }) public class Item implements Serializable { //... @Persistent private SetValue values; // ... } And i want to get an entity from the datastore including the field values. I have to the FetchGroup ItemValues to the FetchPlan: pm.setDetachAllOnCommit(true); pm.getFetchPlan().addGroup(ItemValues); Query query = pm.newQuery(Item.class); ... This way all the basic fields and the field values will be filled when the query returns. On Aug 14, 6:23 pm, bysse erik.byst...@gmail.com wrote: Ah true, i had a call to pm.setDetachAllOnCommit(true) that i didn't see. It's a bit disturbing that i can't pinpoint the error, i'll continue on this thread if it pops up again. thanks a lot for your answers On Aug 14, 6:03 pm, datanucleus andy_jeffer...@yahoo.com wrote: --~--~-~--~~~---~--~~ 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: Wrong default urls in TaskQueue. Bug?
Oh, and correct please Language-... from Python to Java --~--~-~--~~~---~--~~ 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 static files from a servlet
Are there any details available for this feature other than this one-liner? Thanks. On Wed, Sep 16, 2009 at 1:50 PM, Don Schwarz schwa...@google.com wrote: The Service for storing and serving large files item on the Roadmap will give you what you want when it launches: http://code.google.com/appengine/docs/roadmap.html In the mean time your current approach sounds reasonable. --~--~-~--~~~---~--~~ 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 startsWith for Japanese does not work on production server
Thanks for the extra digging, Yasuo. Feel free to file a bug in the issue tracker regarding the default character encoding issue: http://code.google.com/p/googleappengine/issues/list - Jason On Mon, Sep 14, 2009 at 7:13 PM, Yasuo Higa higaya...@gmail.com wrote: Hi Jason, Thanks for your reply. On Tue, Sep 15, 2009 at 8:21 AM, Jason (Google) apija...@google.com wrote: You should add a filter that calls request.setCharacterEncoding() and sets the appropriate encoding before handling the request. If you query for the data without startsWith and display it on-screen, do you see what you expect or is it garbled? I call request.setCharacterEncoding(UTF-8), and my JSP is not garbled. I think the cause is DatastoreQuery#getUpperLimitForStartsWithStr(). In the method, val.getBytes() is called. String#getBytes() depends on default charset encoding. Shift_JIS is used on my local server, but an another charset encoding may be used on production server. The following code may work fine: private Literal getUpperLimitForStartsWithStr(String val) { return new Literal(val + \ufffd); } Also, make sure you add this line after declaring the Query: query.declareParameters(String content); I use implicit parameter as :content. Thanks, Yasuo Higa - Jason On Sat, Sep 12, 2009 at 10:32 PM, Yasuo Higa higaya...@gmail.com wrote: Hi all, JDO startsWith for Japanese works fine on development server, but it does not work on production server. The following url is my test application. http://2.latest.higayasuo.appspot.com/blog/ Test code: Query query = pm.newQuery(Blog.class, content.startsWith(:content)); ListBlog blogList = (ListBlog) query.execute(request.getParameter(content)); request.setAttribute(blogList, blogList); Blog.java: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Blog { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String key; @Persistent private String title; @Persistent private String content; ... } My jsp's encoding is UTF-8. Is there a workaround? Thanks, Yasuo Higa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Bulk update throws exception
Hi Anita. I don't understand your data model -- if you are modeling the relationship between entities of type A and entities of type B using entities of type C, why do entities of type A have direct references to entities of type B and vice versa? Either way, the reason you're getting this error is because you're inadvertently attempting to set an owned relationship between entities of types A and B under type C, and doing this tries to modify the keys of types A and B after they've been persisted, which you can't do. Try changing the following: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class TableC implements Serializable{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private Key tablea; @Persistent private Key tableb; . This should just store a reference to the entity's key (unowned relationship) rather than trying to modify the keys of the A and B entities. - Jason On Tue, Sep 15, 2009 at 1:34 AM, Anita an...@ensarm.com wrote: Hi Jason, I could solve my previous problem. But now i am facing some other problem with many to many relationship tables. My schema looks as follows: TableA --- TableC - TableB which means there is many to many relationship between TableA TableB. So i want TableA and TableB primary keys into TableC as foreign key. TableA class looks as follows: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class TableA implements Serializable{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; .. @Persistent(defaultFetchGroup=true) private SetKey tableB = new HashSetKey(); .. (some getter setter) TableB class looks as follows: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class TableB implements Serializable{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; .. @Persistent(defaultFetchGroup=true) private SetKey tableA = new HashSetKey(); .. (some getter setter) TableC class looks as follows: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class TableC implements Serializable{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private TableA tablea; @Persistent private TableB tableb; . (some getter setter) While adding data into TableC i use following code: Query query1 = pm.newQuery(TableA.class); ListTableA results1 = (ListTableA) query1.execute(); TableA tableA= results1.get(0); Query query2 = pm.newQuery(TableB.class); ListTableB results2 = (ListTableB) query2.execute(); TableB tableB= results2.get(0); tableA.add(tableB); tableB.add(tableA); At this point TableA and TableB values are getting update but while entering data into TableC the problem comes. TableC tableC = new TableC(); tableC.setTableA(tableA); tableC.setTableB(tableB); pm.makePersistent(tableC); -- at this point it gives me A parent cannot be established or changed once an object has been persisted. Can you please tell me were i am going wrong? Thanks Anita On Sep 15, 3:54 am, Jason (Google) apija...@google.com wrote: From the error message, it sounds like the parent isn't getting set correctly. You'll need to share some of your code in order for me to help you further -- what does your Release class look like and how are you persisting it? - Jason On Sat, Sep 12, 2009 at 4:36 AM, Anita an...@ensarm.com wrote: Hi Jason, Our schema looks as follows: ProductType 1-M Product 1M Release Data is inserting into Release table. But while fetching data from release table i am getting following exception: Field com.ensarm.server.domain.Release.products should be able to provide a reference to its parent but the entity does not have a parent. Did you perhaps try to establish an instance of com.ensarm.server.domain.Release as the child of an instance of com.ensarm.server.domain.Products after the child had already been persisted? org.datanucleus.exceptions.NucleusUserException: Field com.ensarm.server.domain.Release.products should be able to provide a reference to its parent but the entity does not have a parent. Did you perhaps try to establish an instance of com.ensarm.server.domain.Release as the child of an instance of com.ensarm.server.domain.Products after the child had already been persisted? at org.datanucleus.store.appengine.DatastoreRelationFieldManager.lookupParent (DatastoreRelationFieldManager.java:302) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.fetchRelationField (DatastoreRelationFieldManager.java:289) at org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField (DatastoreFieldManager.java:271) at
[appengine-java] Core Value Types a benefit?
I'm noticing a list of Core Value Types listed in the Datastore Guide. Are there any benefits of using these (besides being supported) vs. any other Serializable class? --~--~-~--~~~---~--~~ 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: I broke something using Eclipse plugin
Try adding the JARs to your build path without copying them to your lib directory. Just use Add external JARs in the Eclipse Build Path dialog. - Jason On Tue, Sep 15, 2009 at 2:13 AM, Clay Lenhart c...@lenharts.net wrote: I included appengine-local-runtime.jar, because it is needed to resolve ApiProxyLocalImpl in my unit tests. How do I configure both unit tests and the local webserver? This type is documented here: http://code.google.com/appengine/docs/java/howto/unittesting.html This thread suggests that we should include the appengine-local- runtime.jar in the class path: http://groups.google.com/group/google-appengine-java/browse_thread/thread/5bd9829e85c90c90 --~--~-~--~~~---~--~~ 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: built in security features of GAE
This can mean several things, so you'll have to be more specific. To see the list of restrictions in place to help secure Google's back-end infrastructure, see the documentation on the App Engine sandbox: http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox If you're referring to the built-in services Google offers for authenticating and authorizing users, then you should see the following links: http://code.google.com/appengine/docs/java/users/ http://code.google.com/appengine/docs/java/config/webxml.html#Security_and_Authentication HTTPS (secure URL) support is discussed here: http://code.google.com/appengine/docs/java/config/webxml.html#Secure_URLs Let me know if you were looking for something else. - Jason On Tue, Sep 15, 2009 at 4:30 AM, George Simon george.simo...@gmail.comwrote: Has anyone know the built in security features in GAE. Thanks in Advance --~--~-~--~~~---~--~~ 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] Lets get acquainted
Hi to group, Im newbie here. I will ask many questions My webcam-profile is here http://xxx-spaces.com/Anna/anna.html Thank you. Kiss. --~--~-~--~~~---~--~~ 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 static files from a servlet
Thank you guys, I did not realize this item on the road map was to let the app store large files. I can't wait to see this coming. Thanks as well for the http caching headers suggestion. We were planning to get these set shortly. Jerome On Sep 16, 2:06 pm, Toby Reyelts to...@google.com wrote: You can also avoid extra traffic against your servlet and datastore by making sure to set http caching headers appropriately. On Wed, Sep 16, 2009 at 1:50 PM, Don Schwarz schwa...@google.com wrote: The Service for storing and serving large files item on the Roadmap will give you what you want when it launches: http://code.google.com/appengine/docs/roadmap.html In the mean time your current approach sounds reasonable. On Wed, Sep 16, 2009 at 12:35 PM, Jerome jerome.mou...@gmail.com wrote: Is there a way to create static files from a servlet? We are using an image upload JSP, but we currently store the image in the data store, and we serve the image back with a servlet. As the images are referenced from emails we send from AppEngine, it would be more efficient to just reference a static URL for the image, rather than pointing to the servlet (useless CPU and data store usage). Thanks, Jerome --~--~-~--~~~---~--~~ 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: Pointing Domains
This isn't directly possible, no. You could probably make it work it with a lot of trouble, i.e. adding your application to each Google Apps domain that you want then setting up the handler to inspect the hostname and appropriately reinterpret the request. But even if you succeed, this will be very fragile, so it's not recommended. - Jason On Sun, Sep 13, 2009 at 8:31 AM, Danny dannyz...@gmail.com wrote: Hello, i would like to know if is it possible in some way to add a dns server in the google app engine ? allowing multiple domains refereing to specifc urls inside my account exmple: (without using the versions because these are not versions of the application) www.myapp1.com/p1 pointing to (internal) showPage?pageId=p1 www.myapp2.com/index.html pointing to (internal) showPage?pageId=index.html .. this can be done on any host when using a dns server and refering to a specific directory/file. any one has any idea of how to do this here ? or any work around? --~--~-~--~~~---~--~~ 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] File management
I've written a couple GAE apps, and I'm starting on my 3rd, and biggest right now. With my previous two projects, I ended up with one main python file that became quite large and hard to traverse. Is it possible to break out different parts of that file into separate files and include them as needed into the main file? Many thanks... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: JDO startsWith for Japanese does not work on production server
Thanks for your suggestion, Jason. I filed it. http://code.google.com/p/googleappengine/issues/detail?id=2135 Thanks, Yasuo Higa On Thu, Sep 17, 2009 at 6:56 AM, Jason (Google) apija...@google.com wrote: Thanks for the extra digging, Yasuo. Feel free to file a bug in the issue tracker regarding the default character encoding issue: http://code.google.com/p/googleappengine/issues/list - Jason On Mon, Sep 14, 2009 at 7:13 PM, Yasuo Higa higaya...@gmail.com wrote: Hi Jason, Thanks for your reply. On Tue, Sep 15, 2009 at 8:21 AM, Jason (Google) apija...@google.com wrote: You should add a filter that calls request.setCharacterEncoding() and sets the appropriate encoding before handling the request. If you query for the data without startsWith and display it on-screen, do you see what you expect or is it garbled? I call request.setCharacterEncoding(UTF-8), and my JSP is not garbled. I think the cause is DatastoreQuery#getUpperLimitForStartsWithStr(). In the method, val.getBytes() is called. String#getBytes() depends on default charset encoding. Shift_JIS is used on my local server, but an another charset encoding may be used on production server. The following code may work fine: private Literal getUpperLimitForStartsWithStr(String val) { return new Literal(val + \ufffd); } Also, make sure you add this line after declaring the Query: query.declareParameters(String content); I use implicit parameter as :content. Thanks, Yasuo Higa - Jason On Sat, Sep 12, 2009 at 10:32 PM, Yasuo Higa higaya...@gmail.com wrote: Hi all, JDO startsWith for Japanese works fine on development server, but it does not work on production server. The following url is my test application. http://2.latest.higayasuo.appspot.com/blog/ Test code: Query query = pm.newQuery(Blog.class, content.startsWith(:content)); ListBlog blogList = (ListBlog) query.execute(request.getParameter(content)); request.setAttribute(blogList, blogList); Blog.java: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Blog { �...@primarykey �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) �...@extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String key; �...@persistent private String title; �...@persistent private String content; ... } My jsp's encoding is UTF-8. Is there a workaround? Thanks, Yasuo Higa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Task Queue: java.lang.IllegalArgumentException: ETA is invalid :
I was trying to use eta parameter in TaskOptions and I keep getting the following error: java.lang.IllegalArgumentException: ETA is invalid : Anybody has some clue about this one? My code is pasted below. My intention is to execute this task after two hours. Thanks! Queue queue = QueueFactory.getQueue(payments); long eta = System.currentTimeMillis() + 2*60*60*1000; TaskOptions taskOptions = TaskOptions.Builder.url(/pollpayments); taskOptions = taskOptions.etaMillis(eta); taskOptions = taskOptions.param(URLs.REQUEST_PARAM_POSTING_ID, postingId); taskOptions = taskOptions.param(task, true); TaskHandle queueHendle = queue.add(taskOptions); --~--~-~--~~~---~--~~ 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] Is the Google Collections framework already in deployed environment?
I'd like to start using the Google Collections framework (ImmutableList, etc) in my AppEngine project. I see that it is already available in the SDK but I am wondering if it is safe to assume that it is present in the production deployed environment. In other words, is it necessary to explicitly include the JAR in my WEB-INF/lib directory? - Jim --~--~-~--~~~---~--~~ 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: Exceptions from JDOQL
any updates on this please? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Wed, Sep 16, 2009 at 4:49 PM, Vik vik@gmail.com wrote: Hie While querying I am getting following trace but my things works fine. Sep 16, 2009 11:16:55 AM com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue init INFO: Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.init(FinalizableReferenceQueue.java:124) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools$WeakInterningPool.clinit(InterningPools.java:104) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool(InterningPools.java:48) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.clinit(ProtocolSupport.java:55) at com.google.apphosting.api.DatastorePb$Query.init(DatastorePb.java:1072) at com.google.apphosting.api.DatastorePb$Query$1.init(DatastorePb.java:2355) at com.google.apphosting.api.DatastorePb$Query.clinit(DatastorePb.java:2355) at com.google.appengine.api.datastore.QueryTranslator.convertToPb(QueryTranslator.java:27) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.convertToPb(DatastoreServiceImpl.java:357) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.runQuery(DatastoreServiceImpl.java:339) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.access$100(DatastoreServiceImpl.java:269) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl$1.iterator(DatastoreServiceImpl.java:303) at org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterable.iterator(RuntimeExceptionWrappingIterable.java:42) at org.datanucleus.store.appengine.query.StreamingQueryResult.init(StreamingQueryResult.java:77) at org.datanucleus.store.appengine.query.DatastoreQuery.newStreamingQueryResultForEntities(DatastoreQuery.java:324) at org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(DatastoreQuery.java:310) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:242) at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.java:84) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithArray(Query.java:1371) at org.datanucleus.store.query.Query.execute(Query.java:1344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221) at vik.sakshum.sakshumweb.jsp.model.GetAdminTypes.execute(GetAdminTypes.java:51) at org.apache.jsp.ui.page.p_005fadmin_jsp._jspService(p_005fadmin_jsp.java:53) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access$101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet$2.run(PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:57) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at
[appengine-java] Re: Exceptions from JDOQL
If you do a search for this message, you can see that there are some other threads where we have explained that it is a harmless INFO message. On Wed, Sep 16, 2009 at 11:13 PM, Vik vik@gmail.com wrote: any updates on this please? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Wed, Sep 16, 2009 at 4:49 PM, Vik vik@gmail.com wrote: Hie While querying I am getting following trace but my things works fine. Sep 16, 2009 11:16:55 AM com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue init INFO: Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.init(FinalizableReferenceQueue.java:124) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools$WeakInterningPool.clinit(InterningPools.java:104) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool(InterningPools.java:48) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.clinit(ProtocolSupport.java:55) at com.google.apphosting.api.DatastorePb$Query.init(DatastorePb.java:1072) at com.google.apphosting.api.DatastorePb$Query$1.init(DatastorePb.java:2355) at com.google.apphosting.api.DatastorePb$Query.clinit(DatastorePb.java:2355) at com.google.appengine.api.datastore.QueryTranslator.convertToPb(QueryTranslator.java:27) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.convertToPb(DatastoreServiceImpl.java:357) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.runQuery(DatastoreServiceImpl.java:339) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.access$100(DatastoreServiceImpl.java:269) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl$1.iterator(DatastoreServiceImpl.java:303) at org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterable.iterator(RuntimeExceptionWrappingIterable.java:42) at org.datanucleus.store.appengine.query.StreamingQueryResult.init(StreamingQueryResult.java:77) at org.datanucleus.store.appengine.query.DatastoreQuery.newStreamingQueryResultForEntities(DatastoreQuery.java:324) at org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(DatastoreQuery.java:310) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:242) at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.java:84) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithArray(Query.java:1371) at org.datanucleus.store.query.Query.execute(Query.java:1344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221) at vik.sakshum.sakshumweb.jsp.model.GetAdminTypes.execute(GetAdminTypes.java:51) at org.apache.jsp.ui.page.p_005fadmin_jsp._jspService(p_005fadmin_jsp.java:53) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access$101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet$2.run(PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:57) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at
[appengine-java] Re: Exceptions from JDOQL
Thankx Toby. Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Thu, Sep 17, 2009 at 9:38 AM, Toby Reyelts to...@google.com wrote: If you do a search for this message, you can see that there are some other threads where we have explained that it is a harmless INFO message. On Wed, Sep 16, 2009 at 11:13 PM, Vik vik@gmail.com wrote: any updates on this please? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Wed, Sep 16, 2009 at 4:49 PM, Vik vik@gmail.com wrote: Hie While querying I am getting following trace but my things works fine. Sep 16, 2009 11:16:55 AM com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue init INFO: Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.init(FinalizableReferenceQueue.java:124) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools$WeakInterningPool.clinit(InterningPools.java:104) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool(InterningPools.java:48) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.clinit(ProtocolSupport.java:55) at com.google.apphosting.api.DatastorePb$Query.init(DatastorePb.java:1072) at com.google.apphosting.api.DatastorePb$Query$1.init(DatastorePb.java:2355) at com.google.apphosting.api.DatastorePb$Query.clinit(DatastorePb.java:2355) at com.google.appengine.api.datastore.QueryTranslator.convertToPb(QueryTranslator.java:27) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.convertToPb(DatastoreServiceImpl.java:357) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.runQuery(DatastoreServiceImpl.java:339) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl.access$100(DatastoreServiceImpl.java:269) at com.google.appengine.api.datastore.DatastoreServiceImpl$PreparedQueryImpl$1.iterator(DatastoreServiceImpl.java:303) at org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterable.iterator(RuntimeExceptionWrappingIterable.java:42) at org.datanucleus.store.appengine.query.StreamingQueryResult.init(StreamingQueryResult.java:77) at org.datanucleus.store.appengine.query.DatastoreQuery.newStreamingQueryResultForEntities(DatastoreQuery.java:324) at org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(DatastoreQuery.java:310) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:242) at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.java:84) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithArray(Query.java:1371) at org.datanucleus.store.query.Query.execute(Query.java:1344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221) at vik.sakshum.sakshumweb.jsp.model.GetAdminTypes.execute(GetAdminTypes.java:51) at org.apache.jsp.ui.page.p_005fadmin_jsp._jspService(p_005fadmin_jsp.java:53) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access$101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet$2.run(PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:57) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at
[google-appengine] Re: Load Django Template from database
generally, avoid markup in datastore is good, do intermediary, yaml is good --~--~-~--~~~---~--~~ 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: 'ReferenceProperty' query filtering?
Using the query interface or building a query in code (with filter) are the same. Neither is capable of the kind of join you want to do. Two simple ways to accomplish what you are trying to do are: Method 1: Using your current model, structure the question as: theowner = PetOwner.all().filter('name =', 'johndoe').get() print theowner.name for pet in theowner.pet_set: print pet.name, pet.type This will use a bunch of API calls though, as I recall. Method 2: Add a ownerName (db.StringProperty()) to your Pet model, when you set the owner also set the ownerName. Then your query could look like: johnspets = Pet.all().filter('ownerName =', 'johndoe').fetch(limit=1000) for pet in johnspets: print pet.ownerName, pet.name, pet.type This is the method I have been using, a lot. It make reporting much easier in the reporting intensive apps I develop. Robert On Tue, Sep 15, 2009 at 5:17 PM, PatHaugen pathau...@gmail.com wrote: Thanks for the response, works nice, however coming from PHP/MySQL this seems strange to me. We have two 'tables' and are trying to perform a query to link them, however this solution causes two queries on the 'database' to be performed, which are logged against you for your quotas. I'm used to joins: http://dev.mysql.com/doc/refman/5.0/en/join.html One query linking two or more tables for the data you need. Is Google App Engine's 'query' function not able to do anything like this? Is GQL better than GAE's 'Query'? On Sep 15, 12:41 pm, Arun Shanker Prasad arunshankerpra...@gmail.com wrote: Hi, I am sorry I replied to the thread when I was not at my dev machine, did not test the code. I am not sure if putting the query inside the query.filter() will break it. owner = PetOwner.all().filter('name =', 'johndoe'),get() query.filter('owner = ', owner) This should work. Thanks, Arun Shanker Prasad. On Sep 16, 12:20 am, PatHaugen pathau...@gmail.com wrote: I tested the filter you provided: query.filter('owner = ', PetOwner.all().filter('name =', 'johndoe')) However it didn't work. I visited the doc you referenced, but the page does not mention anything about the style of query filters or any information on construction of queries with ReferenceProperty that I could find. Does the query filter you wrote work on your side? I broke our your query: PetOwner.all().filter('name =', 'johndoe') Which worked fine, however it was in placing it inside the query.filter that I get an error. Do you not get an error structured like this? On Sep 15, 4:36 am, Arun Shanker Prasad arunshankerpra...@gmail.com wrote: Hi, I think you are trying to filter the ReferenceProperty as a string, this won't work. You need to; query.filter('owner = ', PetOwner.all().filter('name =', 'johndoe')) Doc on the Datastore ReferenceProperty; http://code.google.com/appengine/docs/python/datastore/entitiesandmod... Thanks, Arun Shanker Prasad. On Sep 15, 8:54 am, PatHaugen pathau...@gmail.com wrote: Jumping into GAE, I found the ReferenceProperty interesting but still don't fully understand it. My question can expand on the example from: http://code.google.com/appengine/docs/python/datastore/creatinggettin... class PetOwner(db.Model): name = db.StringProperty() class Pet(db.Model): name = db.StringProperty() type = db.StringProperty() # cat, dog, etc. owner = db.ReferenceProperty(PetOwner) Let's do a query to select all cats with a specific owner. query = db.Query(Pet) query = Pet.all() query.filter('type = ', 'Cat') results = query.fetch(limit=10) for result in results: output = result.name return output What can I add to this to filter only those where 'owner' is 'johndoe'? I tried: query.filter('owner = ', 'johndoe') However it fails to return me a result, and I know you can pull the owner name via 'pet.owner.name' however trying: query.filter('owner.name = ', 'johndoe') Also fails, though it made sense for what should work. Does anyone know the proper method? --~--~-~--~~~---~--~~ 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: Open Letter to Ryan Barrett and the AppEngine Team regarding high availability
On Sep 15, 7:09 pm, Stephen sdea...@gmail.com wrote: On Sep 16, 12:04 am, ryan ryanb+appeng...@google.com wrote: (of course, as you mention, we can always improve the ways we communicate so that you know we're aware of a problem and do plan to work on it eventually.) How will you do this? good question. we currently use the roadmap for big things and the issue tracker for small things. both are good, but we can always improve on how we use them. the issue tracker, in particular, we haven't kept up with as well as we'd like to. we're going to work on that. the indices count quota problem, for example, has bugs in the issue tracker that we could update with status reports when we work on fixes like the ones coming up in 1.2.6. we'll try to do that more in the future. http://code.google.com/p/googleappengine/issues/detail?id=1161 http://code.google.com/p/googleappengine/issues/detail?id=2124 --~--~-~--~~~---~--~~ 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: SearchableModel
Thanks for reminding me about the codesearch. What I meant was tutorials or documents on using it like API docs or like the ones for Datastore Python API. On Wed, Sep 16, 2009 at 2:46 AM, Barry Hunter barrybhun...@googlemail.comwrote: What do you mean by 'resources' ? The code is a good place to start: http://www.google.com/codesearch/p?hl=ensa=Ncd=1ct=rc#Qx8E-7HUBTk/trunk/google/appengine/ext/search/__init__.pyq=searchablemodel%20package:http://googleappengine%5C.googlecode%5C.com A websearch will find you other stuff too. On 15/09/2009, Randell Benavidez josephrandell.benavi...@gmail.com wrote: Hi guys, I can't seem to find good resources for SearchableModel. Could you point me to those resources, please? Thank you! -- http://randell.ph/ --~--~-~--~~~---~--~~ 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] Deploy Application From Run code
Hello, please help me, I want to know if possible to deploy my application from code. thanks, --~--~-~--~~~---~--~~ 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] new quota exception?
is anybody aware of a hidden quota limit, i get the exception below, but in the dashboard i cannot see any quotas exceeded, when this happens, the dataviewer is also non-functional any clues? thx Exception while handling service_name: remote_datastore method: RunQuery request stripped Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py, line 265, in post response_data = self.ExecuteRequest(request) File /base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py, line 293, in ExecuteRequest response_data) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub.py, line 80, in MakeSyncCall method(request, response) File /base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py, line 84, in _Dynamic_RunQuery request, runquery_response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 72, in MakeSyncCall apiproxy.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 255, in MakeSyncCall rpc.CheckSuccess() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_rpc.py, line 111, in CheckSuccess raise self.exception OverQuotaError: The API call datastore_v3.RunQuery() required more quota than is available. --~--~-~--~~~---~--~~ 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: new quota exception?
Hi dobee, What is your App ID? -Nick On Wed, Sep 16, 2009 at 10:12 AM, dobee berndd...@gmail.com wrote: is anybody aware of a hidden quota limit, i get the exception below, but in the dashboard i cannot see any quotas exceeded, when this happens, the dataviewer is also non-functional any clues? thx Exception while handling service_name: remote_datastore method: RunQuery request stripped Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py, line 265, in post response_data = self.ExecuteRequest(request) File /base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py, line 293, in ExecuteRequest response_data) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub.py, line 80, in MakeSyncCall method(request, response) File /base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py, line 84, in _Dynamic_RunQuery request, runquery_response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 72, in MakeSyncCall apiproxy.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 255, in MakeSyncCall rpc.CheckSuccess() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_rpc.py, line 111, in CheckSuccess raise self.exception OverQuotaError: The API call datastore_v3.RunQuery() required more quota than is available. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Create and download binary file
Hi Mark, On Sun, Sep 13, 2009 at 8:07 AM, Mark marklawso...@gmail.com wrote: Hi, I am trying to allow users of my app to download binary files which are created on the fly. These files will contain model data in binary format. I am doing the following now; def post(self): self.response.headers[Content-Type] = application/octet-stream self.response.headers[Content-Disposition] = attachment;filename=license.bin self.response.out.write(89372379324) However I have found out that out.write is actually writing strings.. how I can change this to write a binary file? Python raw strings _are_ binary. What is the desired output of your snippet above? -Nick -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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] doubt with detachable property...
hi, I tried the Updating an Object (using detachable property) example given herehttp://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Updating_an_Object. Later I found that even if I do not add *detachable=true *property to my JDO class it works without any problem. Is it ok to work without detachable property or it just worked with my case. Following is the code I tried : @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Data{ @SuppressWarnings(unused) @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String value; public Data(String value){ this.value = value; } public void setValue(String value){ this.value = value; } public String getValue(){ return this.value; } } public class Main extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException{ doReq(req, resp); } public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException{ doReq(req, resp); } private void doReq(HttpServletRequest req, HttpServletResponse resp) throws IOException{ Data data = new Data(some value); PrintWriter out = resp.getWriter(); PersistenceManager pm = PMF.get().getPersistenceManager(); pm.makePersistent(data); pm.close(); chageValue(data); out.close(); } @SuppressWarnings(unchecked) private void chageValue(Data data){ PersistenceManager pm = PMF.get().getPersistenceManager(); data.setValue(some other value.); pm.makePersistent(data); pm.close(); } } --~--~-~--~~~---~--~~ 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: doubt with detachable property...
one more doubt similar/related to previous one : i want to fetch object(s) from datastore, cache it to Memcache and fetch it from Memcache for further requests. and if any change happens to data i want to update the object(s) to datastore straight away using cashed instance of object instead of fetching it (again) form datastore and then updating it. following is a code snippet: Data data = cache.get(key); data.setValue(new updated value); pm.makePersistent(data); cache.put(key, data); thanks. On Wed, Sep 16, 2009 at 5:49 PM, Prashant antsh...@gmail.com wrote: hi, I tried the Updating an Object (using detachable property) example given herehttp://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Updating_an_Object. Later I found that even if I do not add *detachable=true *property to my JDO class it works without any problem. Is it ok to work without detachable property or it just worked with my case. Following is the code I tried : @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Data{ @SuppressWarnings(unused) @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String value; public Data(String value){ this.value = value; } public void setValue(String value){ this.value = value; } public String getValue(){ return this.value; } } public class Main extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException{ doReq(req, resp); } public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException{ doReq(req, resp); } private void doReq(HttpServletRequest req, HttpServletResponse resp) throws IOException{ Data data = new Data(some value); PrintWriter out = resp.getWriter(); PersistenceManager pm = PMF.get().getPersistenceManager(); pm.makePersistent(data); pm.close(); chageValue(data); out.close(); } @SuppressWarnings(unchecked) private void chageValue(Data data){ PersistenceManager pm = PMF.get().getPersistenceManager(); data.setValue(some other value.); pm.makePersistent(data); pm.close(); } } --~--~-~--~~~---~--~~ 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: doubt with detachable property...
oh sorry, i forgot to add a point to the second post : is it an acceptable practice to do so (second post) ? is it required for my JDO class (Data, first psot) to extend Serialzable Class? --~--~-~--~~~---~--~~ 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] using a variable to buffer cache data...
hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. --~--~-~--~~~---~--~~ 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: using a variable to buffer cache data...
Quite simply wont work. It might appear to work for a while, but it will soon break. AppEngine is distributed, and runs on many machines. You can cache global variables between requests. But its just a bonus cache, cant store data there. Each request might hit a different instance, instances will be flushed without warning, and there is strong evidence that cron jobs hit different instances to ones serving web visitors anyway. Memcache will give more persistance, (ie less likly the data disappear on you) - but even that can be flushed or become unavailable. Again its just a cache - not for data. If you want to store the data have to use the datastore. Fundermentally, writing in 'batches' like you propose is not going to save much, because the same datastore API calls are still going to have to be made, just there can be some optimization as the task is similar. It might save some tho because the index writes can be batched. On 16/09/2009, Prashant antsh...@gmail.com wrote: hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. -- Barry - www.nearby.org.uk - www.geograph.org.uk - --~--~-~--~~~---~--~~ 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: Load Django Template from database
It's working like this: from google.appengine.ext.webapp import template foo = {{bar}} baz = template.Template(foo) baz.render(template.Context({'bar': Hello, world!})) 'Hello, world!' On Sep 15, 7:26 pm, PatHaugen pathau...@gmail.com wrote: I tried your example a few different ways, still get an error: AttributeError: 'str' object has no attribute 'render' bar = # pulled template from DB self.response.out.write(bar.render(template.Context(template_values))) Tried again using what you did on 'bar' before: foo = # pulled template from DB bar = template.Template(foo) self.response.out.write(bar.render(template.Context(template_values))) Not sure if 'template.Template()' takes a str and makes it into a 'template' able to be rendered, does this code work on your side? I even tried scrapping the way I pull the template and using your method: foo = db.get(templatekey).templatetext Before that, I had to do another DB query to pull the key value of the template I wanted, regardless it still failed... On Sep 15, 11:09 am, Wooble geoffsp...@gmail.com wrote: On Sep 15, 2:08 pm, Wooble geoffsp...@gmail.com wrote: self.response.out.write(bar.render(template_values)) correction: you'll need to wrap template_values in template.Context(); template.render() does this for you automagically. --~--~-~--~~~---~--~~ 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: using a variable to buffer cache data...
ok, thanks a lot. On Wed, Sep 16, 2009 at 7:19 PM, Barry Hunter barrybhun...@googlemail.comwrote: Quite simply wont work. It might appear to work for a while, but it will soon break. AppEngine is distributed, and runs on many machines. You can cache global variables between requests. But its just a bonus cache, cant store data there. Each request might hit a different instance, instances will be flushed without warning, and there is strong evidence that cron jobs hit different instances to ones serving web visitors anyway. Memcache will give more persistance, (ie less likly the data disappear on you) - but even that can be flushed or become unavailable. Again its just a cache - not for data. If you want to store the data have to use the datastore. Fundermentally, writing in 'batches' like you propose is not going to save much, because the same datastore API calls are still going to have to be made, just there can be some optimization as the task is similar. It might save some tho because the index writes can be batched. On 16/09/2009, Prashant antsh...@gmail.com wrote: hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. -- Barry - www.nearby.org.uk - www.geograph.org.uk - --~--~-~--~~~---~--~~ 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: Unable to upload first application version : Error 400
sniff !! Nobody have an idea help me ;-( ? On Sep 14, 10:51 pm, 6real xirgon...@gmail.com wrote: Hi, my application runs fine locally. I'd like to upload it for the fist time and I get the following error : java.io.IOException: Error posting to URL:http://appengine.google.com/api/appversion/create?app_id=IDversion=1; 400 Bad Request Error when loading application configuration: while scanning a simple key in string, line 23, column 1: \ ^ could not found expected ':' in string, line 25, column 9: script: unused ^ II try to upload from the Eclipse plugin. Can someone help me in debugging this ? Thx ! --~--~-~--~~~---~--~~ 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: using a variable to buffer cache data...
Hi Prashant, In addition to what Barry says below, a couple of comments: - You can safely ignore the 'high cpu' warnings if you've already done what you can to optimize the page. You're not going to hit any invisible limits based on them, just the usual CPU quota etc. - If 'eventual' writes are good enough, you may want to look into using the task queue. You can enqueue the write in the task queue, which will do it offline and avoid making the user wait. -Nick Johnson On Wed, Sep 16, 2009 at 2:11 PM, Prashant antsh...@gmail.com wrote: hi, my app needs to store some data to datastore for each every request, say 1 object per request which causes high cpu usage per request. to minimize the cpu usage per request, instead of adding the object directly to datastore i add the object to a LinkedList (every request) and use a cron which moves objects form the LinkedList to datastrore periodically, say every min. I feel it is not a good practice. I don't want to use memcache (instead of server ram) to store my LinkedList because delay in fetching and storing the list form/to memcache may cause loss of data from upcomming requests (or previous request). I don't want to use task queue either for some reasons. Experts please comment on this kind of implementation. Losses Benefits, any alternative good practice. Thanks. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Unable to upload first application version : Error 400
Hi 6real, Can you please post your configuration files (web.xml etc)? Also, you'll probably have more luck getting this answered on the google-appengine-java group. -Nick Johnson On Wed, Sep 16, 2009 at 3:05 PM, 6real xirgon...@gmail.com wrote: sniff !! Nobody have an idea help me ;-( ? On Sep 14, 10:51 pm, 6real xirgon...@gmail.com wrote: Hi, my application runs fine locally. I'd like to upload it for the fist time and I get the following error : java.io.IOException: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id=IDversion=1; 400 Bad Request Error when loading application configuration: while scanning a simple key in string, line 23, column 1: \ ^ could not found expected ':' in string, line 25, column 9: script: unused ^ II try to upload from the Eclipse plugin. Can someone help me in debugging this ? Thx ! -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Run your Lucene Applications on Google AppEngine with GAELucene
Hi lhelper, I'm glad to see it evidently scales past the 'trivial' size of test datasets. I'd be keen to see it demonstrated on much larger (multi gigabyte) corpuses, as well as benchmarks of how it performs with increasing corpus size. All in all, good work on an area that can use contributions like this! -Nick Johnson On Wed, Sep 16, 2009 at 6:04 AM, lhelper lhel...@gmail.com wrote: Hi Johnson, Here, http://so.3gmatrix.cn/news/search?q=3G, is an app built with GAELucene. The index size of 'news' is about 96Mb, docs number is 22651. The index was splitted into about 200 segments(GAEFileContent) when GAEFile.SEGMENT_LENGTH was set to 512000(bytes). You can check the indices use http://so.3gmatrix.cn/gaelucenedashboard/list On Sep 15, 11:09 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi lhelper, Interesting project! Have you tested it with a large corpus of text to search? -Nick Johnson On Mon, Sep 14, 2009 at 5:23 PM, lhelper lhel...@gmail.com wrote: Enlightened by the discussion Can I run Lucene in google app engine? [http://www.nabble.com/Can-I-run-Lucene-in-google-app-engine-- td23017742.html], I implemented a google datastore based Lucene component, GAELucene, which can help you to run search applications on google app engine. The main clazz of GAELucene include: * GAEDirectory - a read only Directory based on google datastore. * GAEFile - stands for an index file, the file's byte content will be splited into multi GAEFileContent. * GAEFileContent - stands for a segment of index file. * GAECategory - the identifier of different indices. * GAEIndexInput - a memory-resident IndexInput? implementation like the RAMInputStream. * GAEIndexReader - wrapper for IndexReader? that cached in GAEIndexReaderPool * GAEIndexReaderPool - pool for GAEIndexReader The following code snippet demonstrates the use of GAELucene do searching: Query queryObject = parserQuery(request); GAEIndexReaderPool readerPool =GAEIndexReaderPool.getInstance(); GAEIndexReader indexReader = readerPool.borrowReader (INDEX_CATEGORY_DEMO); IndexSearcher searcher =newIndexSearcher(indexReader); Hits hits = searcher.search(queryObject); readerPool.returnReader(indexReader); You can find more here 'http://code.google.com/p/gaelucene' -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Can you switch billing to monthly instead of daily
Hi Alex, Normal billing is weekly. Are you sure you're getting billing emails daily? What did you set your daily limit to? -Nick On Wed, Sep 16, 2009 at 5:24 AM, Alex Epshteyn alexander.epsht...@gmail.com wrote: It's a bit annoying to get daily billing emails and having 30 tiny charges on my credit card bill every month instead of one. In addition to being annoying, it complicates the accounting. I think every other hosting company charges on a monthly basis. Any chance App Engine could start using the traditional billing model? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Efficiency Conundrum
I don't fully understand exactly what the problem is you are trying to optimize, however, in general if the user is in a browser, there is a HUGE pool of completely free CPU resources available by moving program logic into javascript on the page. For example, as the user is typing, you could be doing the splitting in real-time, and using XMLHttpRequests to query the data store little by little. -Joshua On Sep 16, 2009, at 1:03 AM, Larkin2 wrote: My application is comprised of semicolon delimited phrases or sentence fragments. When a user enters these phrases into a form textarea I split the contents into a list and then check to see if each phrase already exists as an entity in the datastore. This process is killing me on cpu cycles, but I'm not sure there's any alternative. Has anyone discovered techniques for efficiently searching through entity properties? I've thought about using a listproperty, but I'm not sure this will work. --~--~-~--~~~---~--~~ 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: Efficiency Conundrum
On Wed, Sep 16, 2009 at 6:33 AM, Larkin2 michael.mer...@gmail.com wrote: as a follow up to this - would it be possible to use the phrases I describe below as entity keys so that I could just use the getbykey method rather than querying for each phrase to see if it exists in the Datastore? If so, does anyone know the limitations on keys - how long can they be and can they contain special characters like ) etc...? Yes - though if your phrases are long, you should probably sha1 hash them and use the hash as a key. Also, if simply overwriting old data is fine, you can simply unconditionally insert the phrases; if they already exist, they will overwrite the old record. -Nick On Sep 16, 1:03 am, Larkin2 michael.mer...@gmail.com wrote: My application is comprised of semicolon delimited phrases or sentence fragments. When a user enters these phrases into a form textarea I split the contents into a list and then check to see if each phrase already exists as an entity in the datastore. This process is killing me on cpu cycles, but I'm not sure there's any alternative. Has anyone discovered techniques for efficiently searching through entity properties? I've thought about using a listproperty, but I'm not sure this will work. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Efficiency Conundrum
Thank you both for your input; much appreciated! On Sep 16, 10:09 am, Nick Johnson (Google) nick.john...@google.com wrote: On Wed, Sep 16, 2009 at 6:33 AM, Larkin2 michael.mer...@gmail.com wrote: as a follow up to this - would it be possible to use the phrases I describe below as entity keys so that I could just use the getbykey method rather than querying for each phrase to see if it exists in the Datastore? If so, does anyone know the limitations on keys - how long can they be and can they contain special characters like ) etc...? Yes - though if your phrases are long, you should probably sha1 hash them and use the hash as a key. Also, if simply overwriting old data is fine, you can simply unconditionally insert the phrases; if they already exist, they will overwrite the old record. -Nick On Sep 16, 1:03 am, Larkin2 michael.mer...@gmail.com wrote: My application is comprised of semicolon delimited phrases or sentence fragments. When a user enters these phrases into a form textarea I split the contents into a list and then check to see if each phrase already exists as an entity in the datastore. This process is killing me on cpu cycles, but I'm not sure there's any alternative. Has anyone discovered techniques for efficiently searching through entity properties? I've thought about using a listproperty, but I'm not sure this will work. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Datastore query
On Tue, Sep 15, 2009 at 7:33 PM, Tomi Korhonen tomi.korho...@gmail.comwrote: Hi guys, I just started learning app engine by developing a small application. I am facing following problem: 1) I have following model class Contact(db.Model): name = db.StringProperty() type = db.StringProperty() class PhoneNumber(db.Model): contact = db.ReferenceProperty(Contact, collection_name='phone_numbers') phone_type = db.StringProperty() number = db.PhoneNumberProperty() 2) I need to fetch all contacts that are type 'A' and those contacts should only contain phone numbers that have phone_type 'B' or 'C' The best way to do this is to denormalize: Add phone_types = StringListProperty() to the Contact entity, and populate it with the list of types that their phone numbers have. 3) I have no idea how to solve this :) (One solution would be fetch contacts and filter out wrong phone_types at application level, but I think that is not best way to solve this) This depends on how many you need to fetch, and what percentage you expect to be filtered out. -Nick Johnson Thanks in advance, Tomi -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Server error without any log
The same problem with the default 0.96. This week the number of DeadlineExceededError s and other random errors in Django packages is very disappointing. Some times like 5-10% of requests, sometimes all requests are timed out for 5-10 minutes in a row. I'm looking for an official explanation. --~--~-~--~~~---~--~~ 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: Open Letter to Ryan Barrett and the AppEngine Team regarding high availability
On Sep 15, 6:04 pm, ryan ryanb+appeng...@google.com wrote: i also feel your pain in the support department. we wish we had the resources to provide more high-touch support! we're not a large team, though, so we have to ruthlessly prioritize. that often means less individual support, and it can also means prioritizing necessary but invisible internal changes over developer-visible features and bug fixes. What about opening the SDK code and accepting contributions from the community? There have been statements in the forums from Google people that eventually the SDK code would be open sourced. If you do this now I am sure that you will get bug fixes and extensions from the community (I would personally like to fix 1899, Asynchonous fetch in Java API). If you let the community help you fix issues then there will be a lot less high-touch support required from you. --~--~-~--~~~---~--~~ 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: DataStore backup policies
Hi mably, On Tue, Sep 15, 2009 at 3:41 PM, mably fm2...@mably.com wrote: Hello, Do we have any chance to get an integrated backup/restore tool in Google App Engine any time soon ? You can use the bulkloader's --dump and --restore functionality for this. It will work fine in Java, as long as you set up a Python version containing the remote_api handler. -Nick Johnson Is there a gaebar equivalent on java side ? Thanx for your help. François Bordeaux, FRANCE On 3 sep, 10:41, Nick Johnson (Google) nick.john...@google.com wrote: Hi Carlos, The short story is: We won't lose your data - we have a robust backup and recovery strategy - but we're not responsible for you losing your own data, so we suggest you keep your own backups so you can recover from bugs or mistakes in your code. -Nick Johnson On Mon, Aug 31, 2009 at 11:13 PM, Carlos Andres Echeverri Delgado caecheverr...@gmail.com wrote: Thank you for you response but it doesn't clear yet. If I use Google's Apps Engine service, what kind of guarantee Google offer me about my data? Exist some certified or something like that? Thanks 2009/8/31 Wooble geoffsp...@gmail.com You can probably trust Google's infrastructure to not lose your data; however, it's a good idea to make backups in case software problems in your own code cause data loss. On Aug 31, 2:46 pm, caecheverri caecheverr...@gmail.com wrote: Hi, I want to know what are the policies to make backup to data? Can I do it or it is done by Apps Engine administrator? How Apps Engine deal with data integrity and reliability?...I mean, if infraestructure crash, How is recovery the data? Thanks. -- Nick Johnson, Developer Programs Engineer, App Engine -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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] DownloadError: ApplicationError: 5
Sometimes when performing this request: client = gdata.spreadsheet.service.SpreadsheetsService() session_token = client.token_store.find_token(flubaroo.token_url) gdata.alt.appengine.run_on_appengine(client) try: sfeed = client.GetSpreadsheetsFeed() I see the error below come up in my browser. Any ideas? Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 507, in __call__ handler.get(*groups) File /base/data/home/apps/flubaroo/1.336381965530829925/main.py, line 58, in get sfeed = client.GetSpreadsheetsFeed() File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ spreadsheet/service.py, line 96, in GetSpreadsheetsFeed converter=gdata.spreadsheet.SpreadsheetsSpreadsheetsFeedFromString) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ service.py, line 1012, in Get headers=extra_headers) File /base/data/home/apps/flubaroo/1.336381965530829925/atom/ __init__.py, line 93, in optional_warn_function return f(*args, **kwargs) File /base/data/home/apps/flubaroo/1.336381965530829925/atom/ service.py, line 182, in request data=data, headers=all_headers) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ auth.py, line 725, in perform_request return http_client.request(operation, url, data=data, headers=headers) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/alt/ appengine.py, line 144, in request method=method, headers=all_headers, follow_redirects=False)) File /base/python_lib/versions/1/google/appengine/api/urlfetch.py, line 241, in fetch return rpc.get_result() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 458, in get_result return self.__get_result_hook(self) File /base/python_lib/versions/1/google/appengine/api/urlfetch.py, line 331, in _get_fetch_result raise DownloadError(str(err)) DownloadError: ApplicationError: 5 --~--~-~--~~~---~--~~ 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] discounts for non-profit organizations
Hi, I just wanted to bring up the idea of discounts for non-profit organizations, or for apps that you deem doing good work for the world. While the free limit is generous, some applications can easily go over these limits, and at this point AppEngine becomes less of a good deal for organizations who might be able to get discounts from other hosting providers. I also am under the impression that some of these discounts are tax deductible, so while it might mean a little extra billing infrastructure to deal with it, it might not be like you're just losing all that money entirely, and you'll be helping out some good groups. Cheers, -Josh --~--~-~--~~~---~--~~ 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: DownloadError: ApplicationError: 5
Yup, I've been seeing a fair number of those, too. I guess it means the urlfetch fails for some reason. Would be nice to know if this can be avoided, or if it's just something we have to live with. Ben -- Benjamin Schuster-Böckler benjamin.schus...@crg.es +43 60 8927407 On 16 Sep 2009, at 19:06, Dave dabo...@gmail.com wrote: Sometimes when performing this request: client = gdata.spreadsheet.service.SpreadsheetsService() session_token = client.token_store.find_token(flubaroo.token_url) gdata.alt.appengine.run_on_appengine(client) try: sfeed = client.GetSpreadsheetsFeed() I see the error below come up in my browser. Any ideas? Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 507, in __call__ handler.get(*groups) File /base/data/home/apps/flubaroo/1.336381965530829925/main.py, line 58, in get sfeed = client.GetSpreadsheetsFeed() File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ spreadsheet/service.py, line 96, in GetSpreadsheetsFeed converter=gdata.spreadsheet.SpreadsheetsSpreadsheetsFeedFromString) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ service.py, line 1012, in Get headers=extra_headers) File /base/data/home/apps/flubaroo/1.336381965530829925/atom/ __init__.py, line 93, in optional_warn_function return f(*args, **kwargs) File /base/data/home/apps/flubaroo/1.336381965530829925/atom/ service.py, line 182, in request data=data, headers=all_headers) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ auth.py, line 725, in perform_request return http_client.request(operation, url, data=data, headers=headers) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/alt/ appengine.py, line 144, in request method=method, headers=all_headers, follow_redirects=False)) File /base/python_lib/versions/1/google/appengine/api/urlfetch.py, line 241, in fetch return rpc.get_result() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 458, in get_result return self.__get_result_hook(self) File /base/python_lib/versions/1/google/appengine/api/urlfetch.py, line 331, in _get_fetch_result raise DownloadError(str(err)) DownloadError: ApplicationError: 5 --~--~-~--~~~---~--~~ 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: Can you switch billing to monthly instead of daily
Star this one : http://code.google.com/p/googleappengine/issues/detail?id=1999 On Sep 16, 4:12 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi Alex, Normal billing is weekly. Are you sure you're getting billing emails daily? What did you set your daily limit to? -Nick On Wed, Sep 16, 2009 at 5:24 AM, Alex Epshteyn alexander.epsht...@gmail.com wrote: It's a bit annoying to get daily billing emails and having 30 tiny charges on my credit card bill every month instead of one. In addition to being annoying, it complicates the accounting. I think every other hosting company charges on a monthly basis. Any chance App Engine could start using the traditional billing model? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Can't access the dashboard anymore
Hi Nick, Yep, I quadrupled-checked and it's http://appengine.google.com/a/afghanchat.com that I'm using. Signing in works, but then I don't see the Dashboard - I only see the Create an application page. This used to work fine until a few days ago. The application ID is afghanchat-com and the version I deployed is 1. Thanks R. On Sep 14, 12:22 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi Riyadh, Rud, What Google Apps domain are you using? Also, can you please provide the app ID of one of your apps, and double-check that signing in fromhttp://appengine.google.com/a/yourdomain(replacing yourdomain with the Apps domain your account is for) does not work? -Nick Johnson On Thu, Sep 10, 2009 at 12:56 AM, Riyadh rias.sher...@gmail.com wrote: I posted this message in response to another thread but for some reason it is not shown there. So here we go again :-) --- Hi everyone, A few weeks ago I created my GAE account and set up two applications. I deployed them using Eclipse - several times, over a course of about two weeks. Everything was working fine. Then, a few days ago, I tried to log in to my GAE account using https://appengine.google.com/and https://appengine.google.com/a/MYDOMAIN.TLD and all I see is the page that says Create an application - just as if I never created an application before. For some strange reason both of my applications are still accessible when I open them viahttp://MYDOMAIN.TLD- so they're not down or something like that. The only thing is that I can't access their Dashboard using the above URLs. I can still deploy the applications using Eclipse. I also tried creating a new application and when I entered my cell phone number during the verification step it says The phone number has been sent too many messages or has already been used to confirm an account.. How can I get access to my applications and - more importantly - to the database contents (without writing some Servlet that exports them). I didn't do anything to my Google accounts lately so I guess it's some GAE issue. By the way: in Google Apps I still see my domains being connected to Google AppEngine. Many thanks R. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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] Future of Google App Engine?
I hope this posting doesn't come across as harsh. I'm just being pragmatic about what I need to do for the applications I'm currently running and developing on Google App Engine and for the users on those applications. I read the email Maintenance Schedule for 2009 with some dismay, the three new maintenance slots plus the previous maintenance and service issues in July mean the application uptime for July-Dec is, at best, 3 nines. 5pm PST sits directly in the middle of my applications heaviest usage time (7-9pm EST) making the apparent uptime for July- Dec of this year well under 2 nines. I've been following with interest the problems that Peter has been having, his open letter and Ryan's response. So the real question to the GAE team is: When will GAE stop being a preview release and become an actual service offering; with SLA's, 24/7 support, customer friendly maintenance windows and 4 or 5 nines of uptime? Is this on a roadmap that can be made public? The _Why App Engine_ page says Google has a reputation for highly reliable, high performance infrastructure. With App Engine you can take advantage of the 10 years of knowledge Google has in running massively scalable, performance driven systems. and that is what initially attracted me to the service. What made me actually develop on it was how easy it was to publish and maintain applications and versions. Unfortunately the ongoing downtime, performance and reliability issues may be driving me away. Rob. --~--~-~--~~~---~--~~ 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] high amount of cpu
Hi Guys, I am not sure I am getting high amount of cpu usage for my web-page. The webpage is actually a form. In my logs I can see high amount of CPU 2410ms. I am going to make my website public in a day or two. Its for college and may be more than 1000 students will be using it. I am just afraid that because of this could it crash. Since many people will be requesting this page at the same time. Anyone can explain me how to lower it down. Again, its a very simple website, no animation. Just few images for button nd all. I am on free quota. So please let me know that by example or by calculation that if my cpu usage for one request is 2410 ms and If I expect more than 1000 request per hour then what will happen to my site. Help regarding this will be highly appreciated. Thanks. --~--~-~--~~~---~--~~ 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] How to get the total row number of a table
I try to get the total row number of a table which has more than 1,000,000 data. I got error message query is too large. may not have more than 100 filters + sort orders + ancestor total. Anyone can help on that? My code looks like this: def get_count(query): BATCH_SIZE = 1000 # Maximum number of results returned by a query query = query.order('__key__') results = query.fetch(BATCH_SIZE) count = len(results) while True: if not results: return count last_key = results[-1] results = query.filter('__key__ ', last_key).fetch (BATCH_SIZE) count = count + len(results) count = get_count(MyModel.all(keys_only=True)) --~--~-~--~~~---~--~~ 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] Case sensitivity
We recently moved our company website to Google app engine. We have encountered case sensitivity problems with some of the links in our website. Some links are uppercase when the corresponding folders on the server are lowercase. This was not an issue on our old windows server. Google app engine appears to be case sensitive with URLs. This is causing broken links. Does anyone know if there is a way to make our URLs work case insensitively on Google app engine? --~--~-~--~~~---~--~~ 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: Can't access the dashboard anymore
To end this topic: it was my mistake, I was using the wrong domain (no idea how I started doing that). Thanks a bunch Nick, great support :-) Kind Regards R. --~--~-~--~~~---~--~~ 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] App Engine Speed Questions (Python)
My question has a bit of overlap between App Engine settings questions and pure Python questions, so I posted to the App Engine Python group, but I'd like to repost it here (as a link): http://groups.google.com/group/google-appengine-python/browse_thread/thread/e3d866e4cb8ede10 --~--~-~--~~~---~--~~ 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: Case sensitivity
Hi Johnc, I just updated my answer to your question on Stack Overflow. The short story is that you can do this by writing a handler that redirects users from any page that includes an uppercase character to the same URL without it. This could be extended to a handler that goes first in the list and rewrites all requests, not just ones for static content. I'd suggest watching the logs and fixing links as you can, though - the redirect will add a little bit of latency to requests. http://stackoverflow.com/questions/1428431/switch-off-case-sensitive-urls-in-google-app-engine/1429800#1429800 -Nick On Wed, Sep 16, 2009 at 3:40 PM, johnc ogmani...@gmail.com wrote: We recently moved our company website to Google app engine. We have encountered case sensitivity problems with some of the links in our website. Some links are uppercase when the corresponding folders on the server are lowercase. This was not an issue on our old windows server. Google app engine appears to be case sensitive with URLs. This is causing broken links. Does anyone know if there is a way to make our URLs work case insensitively on Google app engine? -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ 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: DownloadError: ApplicationError: 5
Is there a way to catch this, so I can at least show a more graceful error? It doesn't seem to be an exception. On Sep 16, 10:21 am, Benjamin Schuster-Böckler b...@pearcomp.com wrote: Yup, I've been seeing a fair number of those, too. I guess it means the urlfetch fails for some reason. Would be nice to know if this can be avoided, or if it's just something we have to live with. Ben -- Benjamin Schuster-Böckler benjamin.schus...@crg.es +43 60 8927407 On 16 Sep 2009, at 19:06,Davedabo...@gmail.com wrote: Sometimes when performing this request: client = gdata.spreadsheet.service.SpreadsheetsService() session_token = client.token_store.find_token(flubaroo.token_url) gdata.alt.appengine.run_on_appengine(client) try: sfeed = client.GetSpreadsheetsFeed() I see the error below come up in my browser. Any ideas? Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 507, in __call__ handler.get(*groups) File /base/data/home/apps/flubaroo/1.336381965530829925/main.py, line 58, in get sfeed = client.GetSpreadsheetsFeed() File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ spreadsheet/service.py, line 96, in GetSpreadsheetsFeed converter=gdata.spreadsheet.SpreadsheetsSpreadsheetsFeedFromString) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ service.py, line 1012, in Get headers=extra_headers) File /base/data/home/apps/flubaroo/1.336381965530829925/atom/ __init__.py, line 93, in optional_warn_function return f(*args, **kwargs) File /base/data/home/apps/flubaroo/1.336381965530829925/atom/ service.py, line 182, in request data=data, headers=all_headers) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/ auth.py, line 725, in perform_request return http_client.request(operation, url, data=data, headers=headers) File /base/data/home/apps/flubaroo/1.336381965530829925/gdata/alt/ appengine.py, line 144, in request method=method, headers=all_headers, follow_redirects=False)) File /base/python_lib/versions/1/google/appengine/api/urlfetch.py, line 241, in fetch return rpc.get_result() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 458, in get_result return self.__get_result_hook(self) File /base/python_lib/versions/1/google/appengine/api/urlfetch.py, line 331, in _get_fetch_result raise DownloadError(str(err)) DownloadError: ApplicationError: 5 --~--~-~--~~~---~--~~ 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: Error on update. Ask for email 3 times and then... 401 authentication error
Would you mind sending me the app IDs for these applications. I'm also curious what the app auth settings are for these apps and what domain the account is in (for the second report, I saw gmail for the first). Thank you, Jeff 2009/9/13 m4spam m4s...@gmail.com Got the same error. Is there any solution? On 8 сен, 17:51, Lecter23 lecte...@gmail.com wrote: Hi. This is the log of the update: Initiating update. Email: x...@gmail.com Password for x...@gmail.com: Saving authentication cookies to C:\Documents and Settings \Administrador/.appcfg_cookies Email: x...@gmail.com Password for x...@gmail.com: Saving authentication cookies to C:\Documents and Settings \Administrador/.appcfg_cookies Email: x...@gmail.com Password for x...@gmail.com: Saving authentication cookies to C:\Documents and Settings \Administrador/.appcfg_cookies 2009-10-08 19:25:20,671 ERRORappcfg.py:1334 An unexpected error occurred. Aborting. Error401: --- begin server output --- Must authenticate first. --- end server output --- The login credentials are ok, and after the password and after saving the cookies, it ask for email once again. Any idea? Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---