[appengine-java] Re: cron jobs
Hi, Thanks for your reply. The output for my present program is,the word a'cron' is printing only one time. But i want to print it for every minute. Please help me to get that result. Thanks, Lakshmi. On Feb 18, 7:10 pm, bimbo jones bimbojone...@gmail.com wrote: Hi, if you want it to be printed on the browser you should use pw.println(cron); pw.close(); instead of System.out.println(cron); 2010/2/18 Sowji sowji.ap...@gmail.com Hi, Please help me in cron jobs,in google app engine. My program main code is as follows. -- import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.List; import java.util.Timer; import java.util.TimerTask; import javax.jdo.PersistenceManager; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class RepeatedResults extends HttpServlet { public PersistenceManager pm=PMF.getInstance().getPersistenceManager(); ListManager list; public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType(text/plain); PrintWriter pw=resp.getWriter(); System.out.println(cron); } } this code i wrote for printing a word like cron nuber of times. My cron.xml is as follows. -- ?xml version=1.0 encoding=UTF-8? cronentries cron url/repeated/url descriptionrepeated every one minutes/description scheduleevery 1 minutes/schedule /cron /cronentries It was saved in war\WEB_INF My servlet for repeatedResults is as follws servlet servlet-nameRepeated/servlet-name servlet-classgoalsmanagement.RepeatedResults/servlet-class /servlet servlet-mapping servlet-nameRepeated/servlet-name url-pattern/repeated/url-pattern /servlet-mapping I access this url from a html file. but result is print only one time.not repeatedly. My cron job status in admin console is as follows cron Job Schedule/Last Run/Last Status (All times are UTC) /repeated repeated every one minutes every 1 minutes (UTC) 2010-02-18 08:54:49 on time Success could you please help me what was my mistake. thanks, Lakshmi. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: New template project for Wicket on Google App Engine
this is a nice thing. thanks for providing this template to the community... On 21 Feb., 16:19, SRF srfar...@gmail.com wrote: I put together a project to help developers get started with deploying a Wicket application on Google App Engine. It's a re-implementation of the Guestbook demo. It also uses Guice for dependency injection and includes a servlet filter that automatically sets up the JDO persistence manager for injection on each request. The project is build with Maven and (optionally) uses the maven-gae-plugin for interacting with the App Engine SDK. If you are interested, please have a look: http://code.google.com/p/wicket-gae-template/ I'll be happy to respond to any issues that you may find. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: owned relationship ? - could it be a bug
Hmm... If JDO does not allow unowned relationships, then when you are trying to persist B inside A, then trying to persist B by itself, are you not declaring that B is actually unowned? In this case, A can not actually hold onto B directly and can only hold its Key instead. When I read the documentation, I understood owned relationships as an Object (e.g. B) is always found in another object (e.g. A) and never by itself. Do you think that could be it? Although its weird that the 2nd transaction works when you move it around. Does it actually store two different Bs? These are all ideas. Not sure honestly... On Feb 21, 10:24 pm, aswath satrasala aswath.satras...@gmail.com wrote: Hello Payam Thanks for looking into this. Please see inline On Sun, Feb 21, 2010 at 3:25 PM, Payam pmoghad...@gmail.com wrote: Hello Aswath, What you are doing seems really odd to me. From my understanding a Datastore Key consists of multiple components. A complete key includes several pieces of information, including the application ID, the kind, and an entity ID - GAE Docs If you use encoded key strings, you can get access to these other pieces of information: @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName=datanucleus, key=gae.encoded-pk, value=true) private String encodedKey; @Persistent @Extension(vendorName=datanucleus, key=gae.pk-name, value=true) private String keyName; @Persistent @Extension(vendorName=datanucleus, key=gae.pk-id, value=true) private Long keyId; In this case, you have access to the name ID (keyName) and numeric ID (keyID) of the encoded key. Therefore, from my understanding, you can not change the name ID after you have persisted your first object. The first object determines the name ID for all remaining objects (from my understanding). This is why when you try to change it for the second object, you get an exception. Your understanding is not documented. Please see 'encodedStrings' inhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga Perhaps, you can better explain why you are using the gae.pk-name extension for the name. The context of your code is not clear! When using encoded key strings, you can provide access to an object's string or numeric ID with an additional field: I am using the gae-pk-name, so that I can identity the entity uniquely. - if it is associated with a parent, I do, KeyFactory.createKey (parentkey, kind, name) and then access the entity. - if it is not associated with the parent, I do KeyFactory.createKey(kind, name) and then access the entity. I use this entity to store default values for the entity in my application. Thanks, -Aswath Thanks! On Feb 16, 11:38 pm, aswath satrasala aswath.satras...@gmail.com wrote: any help on this please... Thanks. On Fri, Feb 12, 2010 at 3:18 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello Ikia As suggested by you in the thread 'Incorrect number of entities returned', I have attached the complete files in my previous email. Please let me know, what am I doing wrong here. Thanks -Aswath On Tue, Feb 9, 2010 at 3:06 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello Ikai, Attached is the zip file that contains three files A.java B.java BTest.java Please load in your environment and test it. Thanks. -Aswath On Fri, Feb 5, 2010 at 4:36 PM, aswath satrasala aswath.satras...@gmail.com wrote: B list is missing from class A in my previous posting. Here is the complete A class... @PersistenceCapable(identityType = IdentityType.APPLICATION) public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key=gae.encoded-pk, value=true) private String id; @Persistent @Extension(vendorName = datanucleus, key=gae.pk-name, value=true) private String name; @Persistent private ListB bList ; } On Fri, Feb 5, 2010 at 4:32 PM, aswath satrasala aswath.satras...@gmail.com wrote: This is a similar posting I had posted earlier incorrect number of entities returned. Hopefully, this posting may be more clean and I will get some replies. I have two classes 1) A 2) B A is in 1 to many relationship with B @PersistenceCapable(identityType = IdentityType.APPLICATION) public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key=gae.encoded-pk, value=true) private String id; @Persistent @Extension(vendorName = datanucleus, key=gae.pk-name, value=true) private String name; } @PersistenceCapable(identityType = IdentityType.APPLICATION) public
Re: [appengine-java] Re: owned relationship ? - could it be a bug
I am creating two instances of B. In the first instance, I am making it as a child of A. In the second instance, it is by itself. The second instance cannot persist itself. Hence, I am raising this issue and thinking it as a bug. Is the owned-relationship at the class level? I think it is at the entity level. Can someone from Google team, please confirm on this. -Aswath On Mon, Feb 22, 2010 at 2:26 PM, Payam pmoghad...@gmail.com wrote: Hmm... If JDO does not allow unowned relationships, then when you are trying to persist B inside A, then trying to persist B by itself, are you not declaring that B is actually unowned? In this case, A can not actually hold onto B directly and can only hold its Key instead. When I read the documentation, I understood owned relationships as an Object (e.g. B) is always found in another object (e.g. A) and never by itself. Do you think that could be it? Although its weird that the 2nd transaction works when you move it around. Does it actually store two different Bs? These are all ideas. Not sure honestly... On Feb 21, 10:24 pm, aswath satrasala aswath.satras...@gmail.com wrote: Hello Payam Thanks for looking into this. Please see inline On Sun, Feb 21, 2010 at 3:25 PM, Payam pmoghad...@gmail.com wrote: Hello Aswath, What you are doing seems really odd to me. From my understanding a Datastore Key consists of multiple components. A complete key includes several pieces of information, including the application ID, the kind, and an entity ID - GAE Docs If you use encoded key strings, you can get access to these other pieces of information: @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName=datanucleus, key=gae.encoded-pk, value=true) private String encodedKey; @Persistent @Extension(vendorName=datanucleus, key=gae.pk-name, value=true) private String keyName; @Persistent @Extension(vendorName=datanucleus, key=gae.pk-id, value=true) private Long keyId; In this case, you have access to the name ID (keyName) and numeric ID (keyID) of the encoded key. Therefore, from my understanding, you can not change the name ID after you have persisted your first object. The first object determines the name ID for all remaining objects (from my understanding). This is why when you try to change it for the second object, you get an exception. Your understanding is not documented. Please see 'encodedStrings' inhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga.. .. Perhaps, you can better explain why you are using the gae.pk-name extension for the name. The context of your code is not clear! When using encoded key strings, you can provide access to an object's string or numeric ID with an additional field: I am using the gae-pk-name, so that I can identity the entity uniquely. - if it is associated with a parent, I do, KeyFactory.createKey (parentkey, kind, name) and then access the entity. - if it is not associated with the parent, I do KeyFactory.createKey(kind, name) and then access the entity. I use this entity to store default values for the entity in my application. Thanks, -Aswath Thanks! On Feb 16, 11:38 pm, aswath satrasala aswath.satras...@gmail.com wrote: any help on this please... Thanks. On Fri, Feb 12, 2010 at 3:18 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello Ikia As suggested by you in the thread 'Incorrect number of entities returned', I have attached the complete files in my previous email. Please let me know, what am I doing wrong here. Thanks -Aswath On Tue, Feb 9, 2010 at 3:06 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello Ikai, Attached is the zip file that contains three files A.java B.java BTest.java Please load in your environment and test it. Thanks. -Aswath On Fri, Feb 5, 2010 at 4:36 PM, aswath satrasala aswath.satras...@gmail.com wrote: B list is missing from class A in my previous posting. Here is the complete A class... @PersistenceCapable(identityType = IdentityType.APPLICATION) public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key=gae.encoded-pk, value=true) private String id; @Persistent @Extension(vendorName = datanucleus, key=gae.pk-name, value=true) private String name; @Persistent private ListB bList ; } On Fri, Feb 5, 2010 at 4:32 PM, aswath satrasala aswath.satras...@gmail.com wrote: This is a similar posting I had posted earlier incorrect number of entities returned. Hopefully, this posting may be more clean and I will
[appengine-java] How to handle schema change on JDO data model class?
What about rename/add/remove persistent field or change its data type? I found there are some exceptions thrown out while querying on old data. What should I do? Any document for this problem? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] How to get the size of my cache object to avoid pass over the 1M limitation?
I want to know the size of my cache object because I found there are some errors on the admin console said that GCache.put failed because some kind of policy. I thought that maybe caused by the size limitation(only 1M of cache object allowed). My question is how can I know the actual size of my cached object? Is there a simple list to show all my cached object just like data viewer? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] reply
hi opok,You have to use JPA(Java persistence Api) because JPA supports relational database.When you are usin JPA for adding record you have to use Persist(object),for deleting record you have to use remove(object) and for updating record you have to use merge(object) methods. -- Regards, Sujata... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Google Apps Support in GAE
Hi, That looks very interesting. Can I also access the user accounts of a certain domain? I would like to provide a custom app for doing ressource planning. So a Google apps user would need to interact with his/her colleagues. Is there a thing to list users when inside a google apps domain? Also I wonder if this can be added to the top tool-bar, where there is Mail - Calendar - ... - MyApp Cheers, Toby On Feb 19, 10:40 pm, Peter Ondruska peter.ondru...@gmail.com wrote: I usehttp://code.google.com/p/gdata-java-client/ On Feb 19, 5:16 pm, g3 insight insigh...@gmail.com wrote: I want to provideGoogleAppssearch and document upload service in my GAE application. Is there any API/Service can support this function in GAE application? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Batch load from DataStore?
Why you interate the results? 2010/2/21 Ftaylor finbarrtay...@googlemail.com Is this the fastest way to load all of the Elements of a given type from the DataStore? @SuppressWarnings(unchecked) public static final ListPage loadAllPagesFromDataStore() { ListPage pages = new ArrayListPage(); PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = null; try { query = pm.newQuery(Page.class); ListPage results = (ListPage)query.execute(); if(results.iterator().hasNext()) { IteratorPage it = results.iterator(); while(it.hasNext()) pages.add(pm.detachCopy(it.next())); } } finally { query.closeAll(); pm.close(); } return pages; } I ask because the datastore is meant to be very fast at reading huge amounts of data, but slow at writing huge amounts of data, yet this query is quite slow for only 100 elements. Thanks, Finbarr -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How to handle schema change on JDO data model class?
For example, when adding a field that uses a primitve type to an object. You can't query all objects with JDO pretending to store them in the recently modified object, because null cannot be asigned to the non-null field, but you can query the objects using the low level api and set a default value for the new field. And in terms of the JDO implementation, the only thing needed for it to handle that seamlessly would be to support the use of a default value for any new field, so when reading old data that doesn't have that field it would apply the default value to the field. This is specifiable in JDO metadata, so is only waiting for the GAE/J plugin to be modified to use it. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Google Apps Support in GAE
I guess so (but never done that) because Sync utility also retrieves user account list. See the docs.. On Feb 22, 2:59 pm, Toby tobias.ro...@sunnymail.mobi wrote: Hi, That looks very interesting. Can I also access the user accounts of a certain domain? I would like to provide a custom app for doing ressource planning. So a Google apps user would need to interact with his/her colleagues. Is there a thing to list users when inside a google apps domain? Also I wonder if this can be added to the top tool-bar, where there is Mail - Calendar - ... - MyApp Cheers, Toby On Feb 19, 10:40 pm, Peter Ondruska peter.ondru...@gmail.com wrote: I usehttp://code.google.com/p/gdata-java-client/ On Feb 19, 5:16 pm, g3 insight insigh...@gmail.com wrote: I want to provideGoogleAppssearch and document upload service in my GAE application. Is there any API/Service can support this function in GAE application? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Batch load from DataStore?
You can set the chunk size to 100 or use one of the non iterator query methods. By default only 20 results are loaded at a time so for 100 results the iterator does 5 queries. On 22 Feb 2010, at 02:23, Ftaylor wrote: Is this the fastest way to load all of the Elements of a given type from the DataStore? @SuppressWarnings(unchecked) public static final ListPage loadAllPagesFromDataStore() { ListPage pages = new ArrayListPage(); PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = null; try { query = pm.newQuery(Page.class); ListPage results = (ListPage)query.execute(); if(results.iterator().hasNext()) { IteratorPage it = results.iterator(); while(it.hasNext()) pages.add(pm.detachCopy(it.next())); } } finally { query.closeAll(); pm.close(); } return pages; } I ask because the datastore is meant to be very fast at reading huge amounts of data, but slow at writing huge amounts of data, yet this query is quite slow for only 100 elements. Thanks, Finbarr -- 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 . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Convert Dynamic Web Project to Google App Engine
Dear Google App Engine, Actually I have my old project developed in Struts, Hibernate with MySQL so How can I move it to Google App Engine? Do I need to convert? Please give me the technical instruction on how to migration this project! Billion Thanks --Kimseng -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Eclipse hangs at startup, Ubuntu
Eclipse will not get struck, but some of its windows and buttons are not active, not detecting mouse movements or action You can solve the problem by editing the eclipse.ini with export GDK_NATIVE_WINDOWS=true inside eclipse directory Thanks On Thu, Feb 18, 2010 at 9:48 PM, Rajeev Dayal rda...@google.com wrote: Hi, I am guessing that you're using Subclipse? If you can reproduce the problem consistently, can you file an issue for this? Thanks, Rajeev On Fri, Feb 12, 2010 at 4:31 AM, Tony tony.kapfenber...@gmail.com wrote: Hello, I do have the same Problem (Ubuntu 9.10, Eclipse Galileo, Google Plugin) my, web-inf/lib folder is under source control. I found out that it helps, when i delete the contents of the web-inf/ lib folder prior to starting eclipse. Eclipse then will start without problem and i can get the deleted libraries back from the svn repository... tony On Jan 22, 4:23 pm, Rajeev Dayal rda...@google.com wrote: Hi, What is the name of your project, and the name of your App Engine SDK? I'm trying to decipher (in our code) where the message Updating myproject/...ne - 1.3.0 comes from. When Eclipse starts up, the SDKs will automatically copy over the necessary jars to your project's war/WEB-INF/lib folder. I think that's what is happening here. This should not cause a freeze-up in the IDE though. Is your war/WEB-INF/lib folder version-controlled, and are you using some sort of version-control plugin in Eclipse? If so, does it help if you remove the war/WEB-INF/lib folder from version control? Rajeev On Thu, Jan 14, 2010 at 7:33 AM, pgoetz pgo...@pgoetz.de wrote: On Jan 14, 11:41 am, Blessed Geek blessedg...@gmail.com wrote: Is any of your resources sitting in a foreign file system like smb, ntfs or nfs? No, all of my resources are local. They are attached to a SVN repository, but the subversion plugin does not communicate with the repository at that time. And do you have many projects mounted like I do? I had the same problem and I had to kill/restart the connector process to the foreign file system, whenever this happens. I would notice thrashing going own in the connection and eclipse got stuck. Again no. It is the only project in this workspace (just a test project). [...] Perhaps, you could turn autobuild off everytime you exit eclipse so that it when eclipse is started, it would not autobuild - and turn it back on when eclipse startup has quieted down. That was a hint in the right direction, I think. I have disabled the google plugin, closed the project, reactivated the plugin and after a startup and some time for eclipse to organize itself, I opened the project. That did the trick. In my opinion this is not a very elegant solution, but it works for me so far. Thank you very much for your help! Greetings, Peter -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com google-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] complex query
Hi I am trying to execute a query in the data store, the query would be something like this: select listingNumber from {class name here} where listPrice=1 listPrice=20 listingStatusId IN (1) houseTypeId IN (1,2,4,6) zipCode IN ('33035') I know the In syntax is not standard, but I got the impression from some issue that I can no longer find that it could work I also tried using contains, with parameters and executeWithMap, declaring the parameters, and not, nothing seems to work, I can make simpler queries, by Id, by a field, delete all entities, all works fine, except this. Somebody has a complex query sample in java, query on one class only is fine, but would like something with = and more than one contains?, my code would translate to something like: Query query = pm.newQuery(select listingNumber from {class name here} ); query.setFilter(listPrice=:minPrice listPrice=:maxPrice :status.contains(listingStatusId) :houseType.contains(houseTypeId) :zip.contains(zipCode)); //query.declareParameters(pars defined here); MapString,Object pars= new HashMapString, Object(); pars.put(minPrice, minPrice); pars.put(maxPrice, maxPrice); pars.put(status, Arrays.asList(status)); pars.put(houseType, Arrays.asList(houseType)); pars.put(zip, Arrays.asList(zipCode)); results= (ListString) query.executeWithMap(pars); thanks Karel -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Child objects not stored on GEA using JDO from Scala code
Hi, I'm have a parent-child relation between 2 classes, but the child objects are never stored. I do get an warning: org.datanucleus.store.appengine.MetaDataValidator checkForIllegalChildField: Unable to validate relation net.vermaas.kivanotify.model.UserCriteria.internalCriteria but it is unclear to me why this occurs. Already tried several alternatives without luck. The parent class is UserCriteria which has a List of Criteria as children. The classes are defined as follows (Scala): class UserCriteria(tu: String, crit: Map[String, String]) extends LogHelper { @PrimaryKey @Persistent{val valueStrategy = IdGeneratorStrategy.IDENTITY} var id = KeyFactory.createKey(UserCriteria, System.nanoTime) @Persistent var twitterUser = tu @Persistent var internalCriteria: java.util.List[Criteria] = flatten(crit) def flatten(crits: Map[String, String]) : java.util.List[Criteria] = { val list = new java.util.ArrayList[Criteria] for (key - crits.keySet) { list.add(new Criteria(this, key, crits(key))) } list } def criteria: Map[String, String] = { val crits = mutable.Map.empty[String, String] for (i - 0 to internalCriteria.size-1) { crits(internalCriteria.get(i).name) = internalCriteria.get(i).value } Map.empty ++ crits } // Stripped the equals, canEquals, hashCode, toString code to keep the code snippet short... } @PersistenceCapable @EmbeddedOnly class Criteria(uc: UserCriteria, nm: String, vl: String) { @Persistent var userCriteria = uc @Persistent var name = nm @Persistent var value = vl override def toString = { Criteria name: + name + value: + value } } Any ideas why the childs are not stored? Or why I get the error message? Regards, Gero -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] I'm have a question about Java runtime
Hi, I'm a new IT, I'm working on Google App Engine using Eclipse, I have two questions for you: 1/I want to create two entities and use one-to-one relationships, how can I do that, please help me? 2/I want to insert a new entity from child, how can I do that, please help me? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] abort SAML SSO on GAE/J
I start getting SAML on GAE/J. Are referring to the following page. http://code.google.com/intl/ja/apis/apps/sso/saml_reference_implementation_web.html GAE raises an exception. | java.lang.NoClassDefFoundError: javax.xml.crypto.dsig.XMLSignatureFactory is a restricted class. Please see the Google App Engine developer's guide for more details. | at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: 51) | at util.XmlDigitalSignerUtil.signSamlElement(XmlDigitalSignerUtil.java: 107) Does GAE prohibit all digital signatures? Cannot I use SAML? (;_;) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: complex query
You can only have one inequality filter per query. So you can say: where A==b B==c D==e e0 that last e0 is your ownly allowed inequality filter. It's in the docs :) On Feb 22, 1:39 am, ka2 kalvar...@gmail.com wrote: Hi I am trying to execute a query in the data store, the query would be something like this: select listingNumber from {class name here} where listPrice=1 listPrice=20 listingStatusId IN (1) houseTypeId IN (1,2,4,6) zipCode IN ('33035') I know the In syntax is not standard, but I got the impression from some issue that I can no longer find that it could work I also tried using contains, with parameters and executeWithMap, declaring the parameters, and not, nothing seems to work, I can make simpler queries, by Id, by a field, delete all entities, all works fine, except this. Somebody has a complex query sample in java, query on one class only is fine, but would like something with = and more than one contains?, my code would translate to something like: Query query = pm.newQuery(select listingNumber from {class name here} ); query.setFilter(listPrice=:minPrice listPrice=:maxPrice :status.contains(listingStatusId) :houseType.contains(houseTypeId) :zip.contains(zipCode)); //query.declareParameters(pars defined here); MapString,Object pars= new HashMapString, Object(); pars.put(minPrice, minPrice); pars.put(maxPrice, maxPrice); pars.put(status, Arrays.asList(status)); pars.put(houseType, Arrays.asList(houseType)); pars.put(zip, Arrays.asList(zipCode)); results= (ListString) query.executeWithMap(pars); thanks Karel -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: How to handle schema change on JDO data model class?
Is GAE team working on implementing the JDO feature (use default value for new field instead of throwing exception)? that will make data migration easier. -aj On Mon, Feb 22, 2010 at 8:02 AM, datanucleus andy_jeffer...@yahoo.comwrote: For example, when adding a field that uses a primitve type to an object. You can't query all objects with JDO pretending to store them in the recently modified object, because null cannot be asigned to the non-null field, but you can query the objects using the low level api and set a default value for the new field. And in terms of the JDO implementation, the only thing needed for it to handle that seamlessly would be to support the use of a default value for any new field, so when reading old data that doesn't have that field it would apply the default value to the field. This is specifiable in JDO metadata, so is only waiting for the GAE/J plugin to be modified to use it. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- AJ Chen, PhD Chair, Semantic Web SIG, sdforum.org http://web2express.org @web2express on twitter Palo Alto, CA, USA 650-283-4091 *Monitoring social media in real time* -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Google Accounts are killing my application!....
Providing a login inside a frame is a compromise you should never, ever make. You're essentially training your users to be victims of phishing attacks. By providing a login in a frame, you're essentially removing every single security mechanism browsers provide to attempt to ensure users that the site they are on is really the site they are on and not a password stealing site. This is why many companies go out of their way to provide OAuth: http://oauth.net - because this allows client developers a way to authenticate users against another site's identity mechanism without having users send their credentials to a potentially untrusted site itself. Granted, there's a bit of a disconnect on login, but this is a price we'll have to pay just because this is one of the failings of browser security. Savvy users have already caught on to this, and more and more mainstream users will as well. This is a stopgap - when browsers are able to provide native authentication mechanisms, we shouldn't have to do this anymore, but we have a ways to go before this sort of thing will exist. On Sun, Feb 21, 2010 at 3:21 PM, John V Denley johnvden...@googlemail.comwrote: The frame works fine when logging in. If its a security risk please elaborate, Im onlt using Google accounts because I dont really know how to do my own security, and Im guessing that even using google via a frame is more secure than trying to do it myself! When creating an account it does not take the user back to the original page as there is a total disconnect after the user clicks on the link in the email sent from google. Google have informed me that this is a known issue, but has a low priority (which is understandable). I have now created what I think is a reasonable compromise. Only time will tell if our potential customers are ok with the process! On Feb 18, 7:04 pm, Brian bwa...@gmail.com wrote: You shouldn't use a frame. It is a security problem, and right of google login code to break out of it. After they make a new account, if not using a frame, I believe it forwards the user back to the page they were trying to go to. Seems to work pretty well. On Feb 18, 8:40 am, John V Denley johnvden...@googlemail.com wrote: I have been trying to leverage google accounts for security for my users, but the way its working is really preventing useability within my application, its very frustrating Ive just spent the best part of the last week trying to get the google account login to work in an frame within my application. Ive run into a number of related issues (see other threads in the GWT group) which I have manage to work through finally. (Thanks to everyone who helped out and provided input) However, I have just tried clicking on the create an account now link which is what will be used by any new user who doesnt currently have a google account, but the account creation window has frame breakout code on it, which takes my users away from my application again, and then after clicking on the email link to confirm thier new account, the user is NOT taken back to my application but are just congratulated for creating a google account. The problem is that the user is then left thinking now what do i do? and several of the people we are talking to have just given up at that point! Has anyone else successfully integrated Google accounts into their applications? Should I create my own logins rather than using Google accounts? I have struggled with getting a consistent answer to the problem of how to send passwords to the server given that GAE doesnt support SSL or HTTPS yet. Everyone seems to say that any client side encoding is pointless, but it seems to me that some form of encoding has to be better than not encoding at all!! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Cron jobs in google app engine
Hi You can hit the url as specified in the servlet-mapping to hit the cron on dev server. On appengine, it'll automatically be hit as per the schedule specified in cron.xml On Feb 22, 4:34 pm, Sowji sowji.ap...@gmail.com wrote: Hi, Google App Engine document specefied that, The dev appserver doesn't automatically run your cron jobs. You can use your local desktop's cron or scheduled tasks interface to hit the URLs of your jobs with curl or a similar tool. Is this means we need any external interfaces to hit our cron job? Please tell anybody with a clear example. Thanks, Lakshmi. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] High latency issue
Hi. I just deployed one of my first GAE applications, and I've noticed immediately that it has unacceptably high latency issue. My application uses Ajax for certain parts of the app, and something that should takes less than 100 milliseconds (on our Tomcat container), it is often taking as much as 6.5 or more for the content to be returned in GAE. Is there a problem with my account? Or is this perhaps expected level of performance for non-paid users who are test driving Google App Engine (and will improve once we pay the minimum fee?) Thank you, Soichi -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Navigation exception in JSF 2.0 on App Engine
I've managed to config a JSF 2.0 web app in order it run on app engine. However from time to time, when navigating between pages, I obtain the exception I'm posting below. I wonder what's happening. I'm packaging the following lib in my war file: - JSF 2.0. (mojarra 2.0.2) - Unified EL 1.1 My web.xml looks like: ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; context-param descriptionProduction | Development/description param-namejavax.faces.PROJECT_STAGE/param-name param-valueProduction/param-value /context-param context-param param-namecom.sun.faces.enableMultiThreadedStartup/param- name param-valuefalse/param-value /context-param context-param param-namecom.sun.faces.enableThreading/param-name param-valuefalse/param-value /context-param context-param param-namejavax.faces.STATE_SAVING_METHOD/param-name param-valueserver/param-value /context-param context-param param-namecom.sun.faces.validateXml/param-name param-valuefalse/param-value /context-param listener listener-classcom.sun.faces.config.ConfigureListener/ listener-class /listener servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping session-config session-timeout 30 /session-timeout /session-config welcome-file-list welcome-filefaces/index.xhtml/welcome-file /welcome-file-list /web-app and I've enabled sessions in appengine-web.xml: sessions-enabledtrue/sessions-enabled This is the exception thrown: Nested in javax.servlet.ServletException: Unexpected error restoring state for component with id j_idt3. Cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0.: javax.faces.FacesException: Unexpected error restoring state for component with id j_idt3. Cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0. at com.sun.faces.application.view.StateManagementStrategyImpl $2.visit(StateManagementStrategyImpl.java:239) at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java: 147) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1446) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457) at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java: 223) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java: 177) at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java: 131) at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java: 429) at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java: 143) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java: 199) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java: 110) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java: 118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) 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.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at
Re: [appengine-java] Re: New template project for Wicket on Google App Engine
Cool I was going to do the same thing. Thank you. NM On Mon, Feb 22, 2010 at 5:54 AM, a.maza andr.m...@gmail.com wrote: this is a nice thing. thanks for providing this template to the community... On 21 Feb., 16:19, SRF srfar...@gmail.com wrote: I put together a project to help developers get started with deploying a Wicket application on Google App Engine. It's a re-implementation of the Guestbook demo. It also uses Guice for dependency injection and includes a servlet filter that automatically sets up the JDO persistence manager for injection on each request. The project is build with Maven and (optionally) uses the maven-gae-plugin for interacting with the App Engine SDK. If you are interested, please have a look: http://code.google.com/p/wicket-gae-template/ I'll be happy to respond to any issues that you may find. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Quick question regarding List Order
I fully agree! Gunnar On 27 Jan, 19:22, datanucleus andy_jeffer...@yahoo.com wrote: AListfollows the contract of java.util.List, hence obviously ordering should be preserved. Whether it is JDO or JPA, the whole point of transparent persistence - people shouldn't need to know anything about the persistence process, just use their objects as normal. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Google maps geocoder responds with 620 error since last nights server maintenance
Any updates Ikai? On 21 Feb, 03:46, Ivan Pardo trux...@gmail.com wrote: I'm having the same problem. On Feb 20, 3:06 am, Anders anders.ny...@gmail.com wrote: Still having problems here as well. What you are seeing Jeff is probably the bot information page, besides 620s I'm getting this response: htmlheadmeta http-equiv=content-type content=text/html; charset=utf-8/titleSorry.../titlestyle body { font-family: verdana arial sans-serif; background-color: #fff; color: #000; }/ style/headbodydivtabletrtdbfont face=times color=#0039b6 size=10G/fontfont face=times color=#c41200 size=10o/fontfont face=times color=#f3c518 size=10o/fontfont face=times color=#0039b6 size=10g/fontfont face=times color=#30a72f size=10l/fontfont face=times color=#c41200 size=10e/font/b/tdtd style=text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%div style=border-bottom: 1px solid #dfdfdf;Sorry.../div/td/tr/table/divdiv style=margin-left: 4em;h1We're sorry.../h1p... but your computer or network may be sending automated queries. To protect our users On 20 Feb, 04:53, Jeff Schnitzer j...@infohazard.org wrote: It doesn't seem to be working. Not only am I still seeing a ton of 620s, but half the time I'm also getting something that doesn't parse as JSON. It contains an unexpected ''. I'm guessing it's some sort of error message getting rendered in html or xml. org.codehaus.jackson.JsonParseException: Unexpected character ('' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.bytearrayinputstr...@908faf; line: 1, column: 2] When I try the same URL from my desktop, it works fine. Jeff On Fri, Feb 19, 2010 at 2:16 PM, Ikai L (Google) ika...@google.com wrote: The configuration changes have been made and should be live shortly if not immediately. Can you check and let me know if they are working? I'd give it about ~30 minutes if it doesn't work right away. On Fri, Feb 19, 2010 at 10:56 AM, Ikai L (Google) ika...@google.com wrote: I think there's a version in the main group. I'll post to that one first if it exists. On Fri, Feb 19, 2010 at 10:56 AM, Ikai L (Google) ika...@google.com wrote: Hey guys, I just wanted to let everyone know that I'm working on this. Stay tuned. I'll post to this thread when I have updates. On Fri, Feb 19, 2010 at 10:51 AM, Jeff Schnitzer j...@infohazard.org wrote: It helps to have some links... please star these issues! http://code.google.com/p/googleappengine/issues/detail?id=2806 http://code.google.com/p/gmaps-api-issues/issues/detail?id=2186 This problem is a really big deal, several features of my app depend on reverse geocodes. It looks like a simple whitelisting issue, shouldn't be too hard to fix! Jeff On Fri, Feb 19, 2010 at 12:26 AM, Anders anders.ny...@gmail.com wrote: Same problem here. No problems for 4 months with unchanged mapping code and as of the last day mostly 620 results. I am running on the python appengine but as previously said this is probably an issue with the geocoder IP limit. On 19 Feb, 07:21, Ivan Pardo trux...@gmail.com wrote: ive entered this is a bug on the maps api bug tracker. ive tried on 2 google apps accounts and ive asked others to confirm. it looks like geocoding is impossible from google apps servers. On Feb 18, 6:25 pm, Ivan Pardo trux...@gmail.com wrote: At least now I can be certain that it's not a problem with my code. I can only hope that Google can fix this problem ASAP, as my application is absolutely useless without a working geocoder. On Feb 18, 5:44 pm, Jeff Schnitzer j...@infohazard.org wrote: I'm also seeing 620 errors for most (possibly all) of my reverse geocode requests. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
I hate to be the dork that argues with the referees, but I'm not fond of this advice... * long-id keys can be user-defined just as easily as string-name keys, so you can enforce uniqueness constraints either way if you have some sort of natural key. * Readable urls are a high level construct, and it's easy enough to use pretty names mapped to ids using the memcache. If you ever want to be able to rename people, you probably shouldn't use their name as a key! I'd say that the use case of string name vs numeric id is... is your id a number or is it a string? Boring answer but seems to sum it up pretty well. Jeff On Mon, Feb 22, 2010 at 10:50 AM, Max Ross (Google) maxr+appeng...@google.com wrote: 1) Readable-urls. http://yourapp.appspot.com/users/max versus http://yourapp.appspot.com/users/192398411324987 2) The datastore doesn't support uniqueness constraints so a user-defined key is the only way you can do a true createIfNonExistent() method: beginTxn(); Entity e; try { e = lookupByKeyName(keyName); } cath (EntityNotFoundException enfe) { e = createNewEntity(keyName); } commitTxn(); The final line throws ConcurrentModificationException if someone else created an entity with the same keyName in between the lookup and the commit. Max On Sun, Feb 21, 2010 at 5:08 PM, DutrowLLC dutrow...@gmail.com wrote: Hi, What is the intended purpose of keyName when creating a new Key or new Entity in the low-level API? What are the proper use cases for keyName? Thanks! Chris -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Quick question regarding List Order
On Wed, Jan 27, 2010 at 10:22 AM, datanucleus andy_jeffer...@yahoo.com wrote: A List follows the contract of java.util.List, hence obviously ordering should be preserved. Whether it is JDO or JPA, the whole point of transparent persistence - people shouldn't need to know anything about the persistence process, just use their objects as normal. ...except when it isn't transparent. There are cases you should be cautious of: * In a heterogenous list, Blob and Text objects will be moved to the end of the list. * ListNumber, ListObject, or raw List fields that contain numbers will find all numbers converted to Long no matter what they were stored as. * The case of an empty list and a null list are not distinguished. I believe JDO/JPA's approach is to always construct an empty list. You can't store a null value for a List field. * Any concrete information about the List itself is lost. If you have a field of type List which holds a LinkedList, when you save and load it you will have an ArrayList. * If you have a relationship mapped as a List, be careful serializing it. Given the large number of configuration annotations and required understanding of proxies, deatching, etc work... I would hardly call JDO or JPA transparent. With even the minimum number of annotations, JDO entities look like christmas trees! Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
On Mon, Feb 22, 2010 at 12:54 PM, Jeff Schnitzer j...@infohazard.orgwrote: I hate to be the dork that argues with the referees, but I'm not fond of this advice... No problem, I'm happy to discuss. * long-id keys can be user-defined just as easily as string-name keys, so you can enforce uniqueness constraints either way if you have some sort of natural key. user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. * Readable urls are a high level construct, and it's easy enough to use pretty names mapped to ids using the memcache. If you ever want to be able to rename people, you probably shouldn't use their name as a key! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user-defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I'd say that the use case of string name vs numeric id is... is your id a number or is it a string? Boring answer but seems to sum it up pretty well. Jeff On Mon, Feb 22, 2010 at 10:50 AM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: 1) Readable-urls. http://yourapp.appspot.com/users/max versus http://yourapp.appspot.com/users/192398411324987 2) The datastore doesn't support uniqueness constraints so a user-defined key is the only way you can do a true createIfNonExistent() method: beginTxn(); Entity e; try { e = lookupByKeyName(keyName); } cath (EntityNotFoundException enfe) { e = createNewEntity(keyName); } commitTxn(); The final line throws ConcurrentModificationException if someone else created an entity with the same keyName in between the lookup and the commit. Max On Sun, Feb 21, 2010 at 5:08 PM, DutrowLLC dutrow...@gmail.com wrote: Hi, What is the intended purpose of keyName when creating a new Key or new Entity in the low-level API? What are the proper use cases for keyName? Thanks! Chris -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. Right, but if the user has a natural key (long, String, whatever) they won't be using the generator anyways. There are plenty of natural long keys in the world... facebook userid being a popular one. FWIW, Objectify makes the distinction between ids of type Long, which can be null and thus autogenerated, and long (the primitive) which cannot be autogenerated. I really hadn't intended to plug Objectify here, really! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user-defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I totally agree with you WRT user-defined vs generated values, I just don't see anything wrong with using the long id as a user-defined value. Just make sure you never ask for a generated one. Seems pretty straightforward. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Valid characters in Entity names
What are the valid characters in entity names? Also, they are case sensitive, correct? Thanks! Chris -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: High latency issue
This reply is really to the Google folks. This issue has come up as a number of threads some blaming Datanucleus and others about timing out during startup. I will soon deploy my app and I have the same concerns because it will not have a high hit rate. Unless it is solved I can foresee many apps unable to deploy because the response times will be erratic and will not meet the user's level of acceptance. The design of Java is such that it 'learns' as it warms-up. Thus classes get loaded, byte-code gets rendered into machine code and Singletons get initialized. The standard design of web-applications is to also cache many of its computed values during this warm-up. Once a JDO manager such as Datanucleus is thrown into the mix this warm-up takes even longer and even becomes measurable. Speeding up the warm-up would help but it does not really solve the latency issue. In essence the issue is that the App gets thrown out by the Google app manager because it is deemed to be idle. Then when it needs to service another request it gets rolled back in, somewhere. The 'somewhere' notion is great as it makes the whole Google App Engine concept that Google is building feasible. The trouble is that the App has to warm-up again. This can happen even in a high-volume App because somebody will be the unlucky user that has to warm the App up. My background includes IBM's MVS of 35 plus years ago when they first introduced the concept of Virtual Storage and page faults. As an optimization at this time they also introduced the notion of a 'Working Set'. That is, when an application was idle they threw the whole thing out on disk but noted its 'Working Set'. When it was restarted they bulk loaded (cheaper) the working set and so the application worked in a reasonable manner. I am wondering if such a notion could be used to really solve this problem. I can only guess at the underlying structure of the servers running the Google Web App. Here is my guess with a potential solution. Guess: 64Bit Servers running some sort of VMWare. 32bit Linux used as the host operating system. Potential solution: (1) Configure the server's VMWare to run n images of Linux called Linux-1 through Linux-N, generically referred to as Linux-n. (2) When an App is first started it is run on Linux-n. The IP address settings are virtualized and the VMWare maps them to the physical address for its physical server. The same for the 'mounted drives' if necessary and any other interfaces that need to be externalized. (3) The Page Table for the Linux-n image uses huge Page Table entries, not the 4M entries used in Linux. (3) When it is thrown out the Page Table entries are copied to disk. It might be possible to only write the modified pages. (4) When an App needs to run, a server is found that has the Linux-n image available. It is restarted by bulk loading the whole image. (5) The App will thus run in its Warmed-up-state. Notes: (1) Linux, I assume to be generic, makes no use of Intel's wonderful GDT, LDT design. Instead, it plays with CR3 which points to the Page Table. This makes the Page Table mechanism work but it is not optimized for Intel's design. It also means the application deals with Page Faults as encountered and there is no way to pre-load pages (working set notion). (2) Potentially the 64 Bit VMWare can define Page Table entries that are very large. That is what 64bit machines brought to the table. This could be used to emulate a 'working set'. This is not off-the- shelf VMWare and so it would need some custom tweaks. (3) It might be possible to share the Linux and JVM classes between Linux-n images and thus reduce the footprint of what gets rolled out and in. (4) My guesses could be way off and this whole strategy out to lunch. Steve Pritchard On Feb 22, 12:41 pm, Soichi Hayashi soic...@gmail.com wrote: Hi. I just deployed one of my first GAE applications, and I've noticed immediately that it has unacceptably high latency issue. My application uses Ajax for certain parts of the app, and something that should takes less than 100 milliseconds (on our Tomcat container), it is often taking as much as 6.5 or more for the content to be returned in GAE. Is there a problem with my account? Or is this perhaps expected level of performance for non-paid users who are test driving Google App Engine (and will improve once we pay the minimum fee?) Thank you, Soichi -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
Hi Jeff and Max: Sorry to jump in this debate on the use of system generated Long id and user-provided long id and String name. I found the discussion is useful from best practice. I leverage Objectify and try to re-do our data model. Originally, i chose the route of String name for user, role and group to enforce the unique name of the entity Key, plus long id provided from a simple ConcurrentHashMap Singleton. But i feel that the home-grown ConcurrentHashMap Singleton may not be as robust and scalable as the generated Long id, recognizing that the generated id is not contiguous. So i decided the use of String name of natural uniqueness such as email for user lock-in and generated Long id is for others. Please comment and/or siggestion. Duong BaTien DBGROUPS and BudhNet On Mon, 2010-02-22 at 13:52 -0800, Jeff Schnitzer wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. Right, but if the user has a natural key (long, String, whatever) they won't be using the generator anyways. There are plenty of natural long keys in the world... facebook userid being a popular one. FWIW, Objectify makes the distinction between ids of type Long, which can be null and thus autogenerated, and long (the primitive) which cannot be autogenerated. I really hadn't intended to plug Objectify here, really! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user-defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I totally agree with you WRT user-defined vs generated values, I just don't see anything wrong with using the long id as a user-defined value. Just make sure you never ask for a generated one. Seems pretty straightforward. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
It sounds like you were trying to generate long ids from an in-memory singleton, which is a perilous thing to do... there is never a guarantee that there is only a single instance of your application running on a single machine in appengine. In general... if you have a natural key, use it, otherwise use the generator. Most data modelers say you shouldn't even use natural keys (like email), since what you think is a natural key today turns out to be a mutable field tomorrow (ie, new requirement: users can change email addresses). I'm pretty partial to that philosophy myself, and rarely use natural keys - facebook userid being my main exception. Jeff On Mon, Feb 22, 2010 at 2:46 PM, Duong BaTien duong.bat...@gmail.com wrote: Hi Jeff and Max: Sorry to jump in this debate on the use of system generated Long id and user-provided long id and String name. I found the discussion is useful from best practice. I leverage Objectify and try to re-do our data model. Originally, i chose the route of String name for user, role and group to enforce the unique name of the entity Key, plus long id provided from a simple ConcurrentHashMap Singleton. But i feel that the home-grown ConcurrentHashMap Singleton may not be as robust and scalable as the generated Long id, recognizing that the generated id is not contiguous. So i decided the use of String name of natural uniqueness such as email for user lock-in and generated Long id is for others. Please comment and/or siggestion. Duong BaTien DBGROUPS and BudhNet On Mon, 2010-02-22 at 13:52 -0800, Jeff Schnitzer wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. Right, but if the user has a natural key (long, String, whatever) they won't be using the generator anyways. There are plenty of natural long keys in the world... facebook userid being a popular one. FWIW, Objectify makes the distinction between ids of type Long, which can be null and thus autogenerated, and long (the primitive) which cannot be autogenerated. I really hadn't intended to plug Objectify here, really! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user-defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I totally agree with you WRT user-defined vs generated values, I just don't see anything wrong with using the long id as a user-defined value. Just make sure you never ask for a generated one. Seems pretty straightforward. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Google maps geocoder responds with 620 error since last nights server maintenance
I've updated the whitelist. It should take a bit for the changes to propagate. Let me know if it still doesn't work for you in about 45 minutes, please send me your Geo API key. On Mon, Feb 22, 2010 at 1:14 PM, Ikai L (Google) ika...@google.com wrote: I'm working on it. Seems like I sent out a false all clear because this began working for a portion of applications. On Mon, Feb 22, 2010 at 12:43 PM, Anders anders.ny...@gmail.com wrote: Any updates Ikai? On 21 Feb, 03:46, Ivan Pardo trux...@gmail.com wrote: I'm having the same problem. On Feb 20, 3:06 am, Anders anders.ny...@gmail.com wrote: Still having problems here as well. What you are seeing Jeff is probably the bot information page, besides 620s I'm getting this response: htmlheadmeta http-equiv=content-type content=text/html; charset=utf-8/titleSorry.../titlestyle body { font-family: verdana arial sans-serif; background-color: #fff; color: #000; }/ style/headbodydivtabletrtdbfont face=times color=#0039b6 size=10G/fontfont face=times color=#c41200 size=10o/fontfont face=times color=#f3c518 size=10o/fontfont face=times color=#0039b6 size=10g/fontfont face=times color=#30a72f size=10l/fontfont face=times color=#c41200 size=10e/font/b/tdtd style=text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%div style=border-bottom: 1px solid #dfdfdf;Sorry.../div/td/tr/table/divdiv style=margin-left: 4em;h1We're sorry.../h1p... but your computer or network may be sending automated queries. To protect our users On 20 Feb, 04:53, Jeff Schnitzer j...@infohazard.org wrote: It doesn't seem to be working. Not only am I still seeing a ton of 620s, but half the time I'm also getting something that doesn't parse as JSON. It contains an unexpected ''. I'm guessing it's some sort of error message getting rendered in html or xml. org.codehaus.jackson.JsonParseException: Unexpected character ('' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.bytearrayinputstr...@908faf; line: 1, column: 2] When I try the same URL from my desktop, it works fine. Jeff On Fri, Feb 19, 2010 at 2:16 PM, Ikai L (Google) ika...@google.com wrote: The configuration changes have been made and should be live shortly if not immediately. Can you check and let me know if they are working? I'd give it about ~30 minutes if it doesn't work right away. On Fri, Feb 19, 2010 at 10:56 AM, Ikai L (Google) ika...@google.com wrote: I think there's a version in the main group. I'll post to that one first if it exists. On Fri, Feb 19, 2010 at 10:56 AM, Ikai L (Google) ika...@google.com wrote: Hey guys, I just wanted to let everyone know that I'm working on this. Stay tuned. I'll post to this thread when I have updates. On Fri, Feb 19, 2010 at 10:51 AM, Jeff Schnitzer j...@infohazard.org wrote: It helps to have some links... please star these issues! http://code.google.com/p/googleappengine/issues/detail?id=2806 http://code.google.com/p/gmaps-api-issues/issues/detail?id=2186 This problem is a really big deal, several features of my app depend on reverse geocodes. It looks like a simple whitelisting issue, shouldn't be too hard to fix! Jeff On Fri, Feb 19, 2010 at 12:26 AM, Anders anders.ny...@gmail.com wrote: Same problem here. No problems for 4 months with unchanged mapping code and as of the last day mostly 620 results. I am running on the python appengine but as previously said this is probably an issue with the geocoder IP limit. On 19 Feb, 07:21, Ivan Pardo trux...@gmail.com wrote: ive entered this is a bug on the maps api bug tracker. ive tried on 2 google apps accounts and ive asked others to confirm. it looks like geocoding is impossible from google apps servers. On Feb 18, 6:25 pm, Ivan Pardo trux...@gmail.com wrote: At least now I can be certain that it's not a problem with my code. I can only hope that Google can fix this problem ASAP, as my application is absolutely useless without a working geocoder. On Feb 18, 5:44 pm, Jeff Schnitzer j...@infohazard.org wrote: I'm also seeing 620 errors for most (possibly all) of my reverse geocode requests. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at
[appengine-java] Multiple contains() in a query
I was wondering if is there any way that this would be possible to implement. I have a search criteria that the user would fill out, most of the fields are multi-select, and none is required, so I need to generate the query dynamically (at least that would be a way to handle it in SQL, or store procs..) .Can I use several contains() in a query? have any sample? can I use executeWithMap to supply the lists for the several contains()? Can I mix the lists with other kind of parameters in the map? Again a link to a sample would be great. If not possible, the only other solution I can think off would be to choose one of the fields in the criteria, hopefully the most restrictive, get the results into memcache, and execute the rest of the conditions sequentially, adding the results to the memcache by using incrementAll(), and at the end check the counters for each entity in the memcache, and get only the results where the hitCount is equal to the number of queries. Would do the queries to get only IDs, they say are faster, and at the end would get all the entities with the resulting id set. Is there a better solution?, again preindexing the records with all possible combinations doesn't seem to be a good idea in this case. thanks Karel -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: High latency issue
On Mon, Feb 22, 2010 at 2:29 PM, Steve Pritchard steve...@gmail.com wrote: This reply is really to the Google folks. Guess: 64Bit Servers running some sort of VMWare. 32bit Linux used as the host operating system. (4) My guesses could be way off and this whole strategy out to lunch. I'm not a Google folk but my I'm guessing #4 :-) App instances start up in 5s or so without JDO... about what I would expect for a JVM start and a really amazingly optimized appserver load. Without the weight of framework, Python cold starts are sub-one-second. I doubt this could be done with an OS boot included. My laptop barely wakes up from sleep in that time. I would love to hear even a short a description of how Appengine does load balancing... anyone want to throw us a bone? Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Batch load from DataStore?
Hi, I was having trouble as well with retrieving data quickly and not sure of the best approach. I currently have my JDO object (JdoEvent) on the client (and was advised recently that this may not be the best place to put it) and was retrieving about a 1000 objects and this was taking longer than I'd like. My approach follows and I welcome any criticisms of it, thank you public ListJdoEvent getEvents() { return get(JdoEvent.class, order by date desc); } private T ListT get(ClassT cls, String filterClause) { PersistenceManager pm = PMF.get().getPersistenceManager(); ListT result = null; try { String q = select from + cls.getName() + + filterClause; result = new ArrayListT((ListT) pm.newQuery(q).execute()); } finally { pm.close(); } return result; } On Feb 23, 3:35 am, John Patterson jdpatter...@gmail.com wrote: You can set the chunk size to 100 or use one of the non iterator query methods. By default only 20 results are loaded at a time so for 100 results the iterator does 5 queries. On 22 Feb 2010, at 02:23, Ftaylor wrote: Is this the fastest way to load all of the Elements of a given type from the DataStore? @SuppressWarnings(unchecked) public static final ListPage loadAllPagesFromDataStore() { ListPage pages = new ArrayListPage(); PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = null; try { query = pm.newQuery(Page.class); ListPage results = (ListPage)query.execute(); if(results.iterator().hasNext()) { IteratorPage it = results.iterator(); while(it.hasNext()) pages.add(pm.detachCopy(it.next())); } } finally { query.closeAll(); pm.close(); } return pages; } I ask because the datastore is meant to be very fast at reading huge amounts of data, but slow at writing huge amounts of data, yet this query is quite slow for only 100 elements. Thanks, Finbarr -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] My app, out of the blue, doesn't exist anymore on app engine servers
http://truxmap.appspot.com/ I can access the admin panel and the cron jobs show that it stopped working at 4:03. I wasn't anywhere near my PC and hadn't deployed since last night. For some reason, the app is simply dead -- I cant access any part of it. Last night I tried deploying 3 or 4 times but I got a 503 error every time so I gave up. Since I noticed that my site is now dead, I've tried deploying twice and I've gotten a 503 error once and a 403 (too many versions... i just deleted 1 version and i only have 3 versions anyway). None of this makes any sense to me and is incredibly frustrating. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
On Mon, 2010-02-22 at 15:13 -0800, Jeff Schnitzer wrote: It sounds like you were trying to generate long ids from an in-memory singleton, which is a perilous thing to do... there is never a guarantee that there is only a single instance of your application running on a single machine in appengine. In general... if you have a natural key, use it, otherwise use the generator. Most data modelers say you shouldn't even use natural keys (like email), since what you think is a natural key today turns out to be a mutable field tomorrow (ie, new requirement: users can change email addresses). I'm pretty partial to that philosophy myself, and rarely use natural keys - facebook userid being my main exception. Jeff Yes, i am aware of this. Google uses it and calls the unique name within the system the canonical name whether the name is an email or just a convenient id like the Wave id. I copy google idea. Any comment? Thanks BaTien On Mon, Feb 22, 2010 at 2:46 PM, Duong BaTien duong.bat...@gmail.com wrote: Hi Jeff and Max: Sorry to jump in this debate on the use of system generated Long id and user-provided long id and String name. I found the discussion is useful from best practice. I leverage Objectify and try to re-do our data model. Originally, i chose the route of String name for user, role and group to enforce the unique name of the entity Key, plus long id provided from a simple ConcurrentHashMap Singleton. But i feel that the home-grown ConcurrentHashMap Singleton may not be as robust and scalable as the generated Long id, recognizing that the generated id is not contiguous. So i decided the use of String name of natural uniqueness such as email for user lock-in and generated Long id is for others. Please comment and/or siggestion. Duong BaTien DBGROUPS and BudhNet On Mon, 2010-02-22 at 13:52 -0800, Jeff Schnitzer wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. Right, but if the user has a natural key (long, String, whatever) they won't be using the generator anyways. There are plenty of natural long keys in the world... facebook userid being a popular one. FWIW, Objectify makes the distinction between ids of type Long, which can be null and thus autogenerated, and long (the primitive) which cannot be autogenerated. I really hadn't intended to plug Objectify here, really! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user-defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I totally agree with you WRT user-defined vs generated values, I just don't see anything wrong with using the long id as a user-defined value. Just make sure you never ask for a generated one. Seems pretty straightforward. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: New template project for Wicket on Google App Engine
You're welcome! On Feb 22, 1:26 pm, nicolas melendez nfmelen...@gmail.com wrote: Cool I was going to do the same thing. Thank you. NM On Mon, Feb 22, 2010 at 5:54 AM, a.maza andr.m...@gmail.com wrote: this is a nice thing. thanks for providing this template to the community... On 21 Feb., 16:19, SRF srfar...@gmail.com wrote: I put together a project to help developers get started with deploying a Wicket application on Google App Engine. It's a re-implementation of the Guestbook demo. It also uses Guice for dependency injection and includes a servlet filter that automatically sets up the JDO persistence manager for injection on each request. The project is build with Maven and (optionally) uses the maven-gae-plugin for interacting with the App Engine SDK. If you are interested, please have a look: http://code.google.com/p/wicket-gae-template/ I'll be happy to respond to any issues that you may find. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] I'm have a question about Java runtime
I think you can start reading the guide, let me google that for you... http://code.google.com/appengine/docs/java/datastore/ 2010/2/22 Ngô Chí Lê lengo...@gmail.com Hi, I'm a new IT, I'm working on Google App Engine using Eclipse, I have two questions for you: 1/I want to create two entities and use one-to-one relationships, how can I do that, please help me? 2/I want to insert a new entity from child, how can I do that, please help me? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
Jeff, I agree with the majority of your design philosophy and the advice you're dispensing, but I still disagree with you on one pretty fundamental point. If I'm understanding your argument correctly, you're saying that best practices for primary key management don't involve user-defined strings, therefore user-defined strings aren't a necessary feature, but I think this ignores a pretty basic usage of uniqueness constraints. Let's say you're a domain registrar, you're building your registration workflow on App Engine, and you need to guarantee that a domain name can only be claimed once. If you use a numeric id mapped to the domain name you run the risk of letting two users reserve the same domain, and if you're a domain registrar that's really really bad. There's no natural key we can bring in here. Whether we as application developers run into them frequently or not, there exists a class of problems where a user-defined string pk is a necessary part of the solution. Regards, Max On Mon, Feb 22, 2010 at 1:52 PM, Jeff Schnitzer j...@infohazard.org wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. Right, but if the user has a natural key (long, String, whatever) they won't be using the generator anyways. There are plenty of natural long keys in the world... facebook userid being a popular one. FWIW, Objectify makes the distinction between ids of type Long, which can be null and thus autogenerated, and long (the primitive) which cannot be autogenerated. I really hadn't intended to plug Objectify here, really! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user-defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I totally agree with you WRT user-defined vs generated values, I just don't see anything wrong with using the long id as a user-defined value. Just make sure you never ask for a generated one. Seems pretty straightforward. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
I don't think we're disagreeing - user-defined keys are the only way to enforce uniqueness. I was just trying to point out that user-defined longs work just as well for enforcing uniqueness as user-defined Strings if your natural key is numeric. There's no reason to convert it to a String. I don't personally think there's anything wrong with carefully chosen natural keys. Domain name in your example is a great natural key. Accounts with an email address is a little weirder. You want two things: Accounts should be able to change their email addresses (so using the email as the Account key is a bad idea) but you also want to enforce uniqueness of the email address field (users use it to log in). So the appropriate model for this in appengine is probably to have Account and Email as separate entities, Account with a generated id and Email with a tautological natural key. ...which provides one more illustration of why the JDO claim of transparent persistence across multiple datastores is bogus. You'd never do this in an RDBMS. Jeff On Mon, Feb 22, 2010 at 8:09 PM, Max Ross (Google) maxr+appeng...@google.com wrote: Jeff, I agree with the majority of your design philosophy and the advice you're dispensing, but I still disagree with you on one pretty fundamental point. If I'm understanding your argument correctly, you're saying that best practices for primary key management don't involve user-defined strings, therefore user-defined strings aren't a necessary feature, but I think this ignores a pretty basic usage of uniqueness constraints. Let's say you're a domain registrar, you're building your registration workflow on App Engine, and you need to guarantee that a domain name can only be claimed once. If you use a numeric id mapped to the domain name you run the risk of letting two users reserve the same domain, and if you're a domain registrar that's really really bad. There's no natural key we can bring in here. Whether we as application developers run into them frequently or not, there exists a class of problems where a user-defined string pk is a necessary part of the solution. Regards, Max On Mon, Feb 22, 2010 at 1:52 PM, Jeff Schnitzer j...@infohazard.org wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. Right, but if the user has a natural key (long, String, whatever) they won't be using the generator anyways. There are plenty of natural long keys in the world... facebook userid being a popular one. FWIW, Objectify makes the distinction between ids of type Long, which can be null and thus autogenerated, and long (the primitive) which cannot be autogenerated. I really hadn't intended to plug Objectify here, really! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user-defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I totally agree with you WRT user-defined vs generated values, I just don't see anything wrong with using the long id as a user-defined value. Just make sure you never ask for a generated one. Seems pretty straightforward. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to
[appengine-java] Re: cron jobs
Thanks for your reply, ok i will try it. Thanks, Lakshmi. On Feb 22, 11:52 pm, bimbo jones bimbojone...@gmail.com wrote: Hi, If you want to receive the 'cron' word every 1 minute try logging the result instead of printing, or sending a email to you. 2010/2/22 lakshmi sowji.ap...@gmail.com Hi, Thanks for your reply. The output for my present program is,the word a'cron' is printing only one time. But i want to print it for every minute. Please help me to get that result. Thanks, Lakshmi. On Feb 18, 7:10 pm, bimbo jones bimbojone...@gmail.com wrote: Hi, if you want it to be printed on the browser you should use pw.println(cron); pw.close(); instead of System.out.println(cron); 2010/2/18 Sowji sowji.ap...@gmail.com Hi, Please help me in cron jobs,in google app engine. My program main code is as follows. -- import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.List; import java.util.Timer; import java.util.TimerTask; import javax.jdo.PersistenceManager; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class RepeatedResults extends HttpServlet { public PersistenceManager pm=PMF.getInstance().getPersistenceManager(); ListManager list; public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType(text/plain); PrintWriter pw=resp.getWriter(); System.out.println(cron); } } this code i wrote for printing a word like cron nuber of times. My cron.xml is as follows. -- ?xml version=1.0 encoding=UTF-8? cronentries cron url/repeated/url descriptionrepeated every one minutes/description scheduleevery 1 minutes/schedule /cron /cronentries It was saved in war\WEB_INF My servlet for repeatedResults is as follws servlet servlet-nameRepeated/servlet-name servlet-classgoalsmanagement.RepeatedResults/servlet-class /servlet servlet-mapping servlet-nameRepeated/servlet-name url-pattern/repeated/url-pattern /servlet-mapping I access this url from a html file. but result is print only one time.not repeatedly. My cron job status in admin console is as follows cron Job Schedule/Last Run/Last Status (All times are UTC) /repeated repeated every one minutes every 1 minutes (UTC) 2010-02-18 08:54:49 on time Success could you please help me what was my mistake. thanks, Lakshmi. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com google-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] What is the purpose of keyName? (Low-level API)
I don't see what extra protection storing an email as a separate entity buys you. If you store the same email address twice you do not get an exception thrown like in an RDBMS... it just silently overwrites the existing one. In either case, storing the email as a key or as a field, you would need to do a query (or get) in a transaction to be sure you were not going to overwrite an existing record with the same email. On 23 Feb 2010, at 13:37, Jeff Schnitzer wrote: I don't think we're disagreeing - user-defined keys are the only way to enforce uniqueness. I was just trying to point out that user-defined longs work just as well for enforcing uniqueness as user-defined Strings if your natural key is numeric. There's no reason to convert it to a String. I don't personally think there's anything wrong with carefully chosen natural keys. Domain name in your example is a great natural key. Accounts with an email address is a little weirder. You want two things: Accounts should be able to change their email addresses (so using the email as the Account key is a bad idea) but you also want to enforce uniqueness of the email address field (users use it to log in). So the appropriate model for this in appengine is probably to have Account and Email as separate entities, Account with a generated id and Email with a tautological natural key. ...which provides one more illustration of why the JDO claim of transparent persistence across multiple datastores is bogus. You'd never do this in an RDBMS. Jeff On Mon, Feb 22, 2010 at 8:09 PM, Max Ross (Google) maxr+appeng...@google.com wrote: Jeff, I agree with the majority of your design philosophy and the advice you're dispensing, but I still disagree with you on one pretty fundamental point. If I'm understanding your argument correctly, you're saying that best practices for primary key management don't involve user-defined strings, therefore user-defined strings aren't a necessary feature, but I think this ignores a pretty basic usage of uniqueness constraints. Let's say you're a domain registrar, you're building your registration workflow on App Engine, and you need to guarantee that a domain name can only be claimed once. If you use a numeric id mapped to the domain name you run the risk of letting two users reserve the same domain, and if you're a domain registrar that's really really bad. There's no natural key we can bring in here. Whether we as application developers run into them frequently or not, there exists a class of problems where a user-defined string pk is a necessary part of the solution. Regards, Max On Mon, Feb 22, 2010 at 1:52 PM, Jeff Schnitzer j...@infohazard.org wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used. You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the DatastoreService.allocateIds method. Otherwise you run the risk of a silent collision. There is no such risk with user-defined string keys. Right, but if the user has a natural key (long, String, whatever) they won't be using the generator anyways. There are plenty of natural long keys in the world... facebook userid being a popular one. FWIW, Objectify makes the distinction between ids of type Long, which can be null and thus autogenerated, and long (the primitive) which cannot be autogenerated. I really hadn't intended to plug Objectify here, really! Valid point about renaming, but going back to the example I provided, the datastore does not distinguish between inserts and updates. The only way you can guarantee that an entity was inserted, and therefore the only way you can guarantee the uniqueness of the name, is to use a user- defined key. If you're mapping id to name it will be possible to create two entities with the same name. It's of course up to you to decide how important this is to defend against, but without the ability to provide your own id you wouldn't get to make this choice, and without the ability to provide your own string id you wouldn't be able to add some application-specific meaning to this choice. I totally agree with you WRT user-defined vs generated values, I just don't see anything wrong with using the long id as a user-defined value. Just make sure you never ask for a generated one. Seems pretty straightforward. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google
[appengine-java] Re: bulk download error 403
Matthew I think I am close but... I logged in to https://appengine.google.com/permissions?app_id=myprogram My gmail address is developer on this account. Now I want to add m...@mydomain.com as a developer. I add m...@mydomain.com to the developers list. It says it sent a mail to confirm to m...@mydomain.com and its status is pending. I logged into may mail on m...@mydomain.com and click on the link to confirm but it asks my phone number and want me to create new app. How can I add m...@mydomain.com as a developer? On Feb 17, 1:04 am, Matthew Blain matthew.bl...@google.com wrote: The Google Apps control panel does not affect who is a admin on a particular app engine application. That's controlled by the App Engine admin console, e.g.http://appengine.google.com/permissions?app_id=myprogram . For remote_api to work you also need the admin to match the authentication option of the application, e.g. whatever it says onhttp://appengine.google.com/domain?app_id=myprogramfor Authentication Options. If it says anyone with a valid Google Account then you need to use a non-Google Apps account for the admin with remote API. This is often simplest to do with a Gmail account. If it says anyone with a valid *yourdomain* Google Apps domain, then only admins on the Permissions page with Google Apps account in that domain will work. Hopefully this clarifies things--it's confusing because there are so many different places to check. --Matthew On Dec 24 2009, 1:48 am, lembas keremo...@gmail.com wrote: First of all, sorry for writing remote instead of bulkload in my last 2 posts. There is no remote version. The only version is bulkload. I created it with Python like I said in my first post in this thread. I logged out my gmail.com account and mydomain.com account in my browser. Then I visithttp://bulkload.latest.myprogram.appspot.com/remote_api. There comes a login page of mydomain.com. When I login with my admin account on mydomain.com, it says Error: Forbidden Your client does not have permission to get URL /remote_api from this server. I do not use GAE UserService anywhere in my code. I do not have any security-constraint in my web.xml. I looked at the logs as you said. I have the following in my request- only-filtered log: 12-24 01:33AM 02.761 /remote_api 403 36ms 0cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.6 (KHTML, like Gecko) Chrome/4.0.266.0 Safari/532.6,gzip(gfe) See details 193.xxx.yyy.zzz - myid [24/Dec/2009:01:33:02 -0800] GET /remote_api HTTP/1.1 403 0 https://www.google.com/a/mydomain.com/ServiceLogin? service=ahpassive=truecontinue=http:// bulkload.latest.myprogram.appspot.com/_ah/login%3Fcontinue%3Dhttp:// bulkload.latest.myprogram.appspot.com/ remote_apiltmpl=gaahname=dummysig=a0d1d0bdb0ea9947083be67280bb1e39 Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.6 (KHTML, like Gecko) Chrome/4.0.266.0 Safari/532.6,gzip(gfe) How can I check if my admin account on mydomain.com is really an admin forhttp://bulkload.latest.myprogram.appspot.com/remote_api? I checked it by logging inhttps://www.google.com/a/cpanel/kavancha.com/Users and see that admin is an Administrator as stated in Status column next to Username column. Am I right? Thanks for your help. Now what should I do next? On Dec 24, 4:54 am, Matthew Blain matthew.bl...@google.com wrote: (Note that the log in page is only needed to test interactive login.) On Dec 23, 6:53 pm, Matthew Blain matthew.bl...@google.com wrote: You need to log in to the application, not just the Google control panel--do you have a login page you can visit onhttp://remote.latest.myprogram.appspot.com/remote_api? What do the logs look like in the admin console for your app? On Dec 19, 2:36 am, lembas keremo...@gmail.com wrote: First I visithttps://www.google.com/a/cpanel/mydomain.com then login as ad...@mydomain.com and then I visithttp://remote.latest.myprogram.appspot.com/remote_api, which has remoteapi definition in web.xml as stated inhttp://groups.google.com/group/google-appengine-java/browse_thread/th..., it says Error: Forbidden Your client does not have permission to get URL /remote_api from this server. but if i visithttp://myprogram.appspot.com/remote_api, which is the current version without any remoteapi definition in web.xml, it says Error: Not Found The requested URL /remote_api was not found on this server. what should I do now? On Dec 19, 2:24 am, Matthew Blain matthew.bl...@google.com wrote: A quick test is if you can visit yourapp/remote_api in the web browser--it should work if you log in as an admin, well it should say This request did not contain a necessary header but not any other errors. On Dec 16, 2:52 pm, lembas keremo...@gmail.com wrote: I get exactly the same error
[appengine-java] Re: Google maps geocoder responds with 620 error since last nights server maintenance
It is working for me now, thanks for the help! On 23 Feb, 00:16, Ikai L (Google) ika...@google.com wrote: I've updated the whitelist. It should take a bit for the changes to propagate. Let me know if it still doesn't work for you in about 45 minutes, please send me your Geo API key. On Mon, Feb 22, 2010 at 1:14 PM, Ikai L (Google) ika...@google.com wrote: I'm working on it. Seems like I sent out a false all clear because this began working for a portion of applications. On Mon, Feb 22, 2010 at 12:43 PM, Anders anders.ny...@gmail.com wrote: Any updates Ikai? On 21 Feb, 03:46, Ivan Pardo trux...@gmail.com wrote: I'm having the same problem. On Feb 20, 3:06 am, Anders anders.ny...@gmail.com wrote: Still having problems here as well. What you are seeing Jeff is probably the bot information page, besides 620s I'm getting this response: htmlheadmeta http-equiv=content-type content=text/html; charset=utf-8/titleSorry.../titlestyle body { font-family: verdana arial sans-serif; background-color: #fff; color: #000; }/ style/headbodydivtabletrtdbfont face=times color=#0039b6 size=10G/fontfont face=times color=#c41200 size=10o/fontfont face=times color=#f3c518 size=10o/fontfont face=times color=#0039b6 size=10g/fontfont face=times color=#30a72f size=10l/fontfont face=times color=#c41200 size=10e/font/b/tdtd style=text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%div style=border-bottom: 1px solid #dfdfdf;Sorry.../div/td/tr/table/divdiv style=margin-left: 4em;h1We're sorry.../h1p... but your computer or network may be sending automated queries. To protect our users On 20 Feb, 04:53, Jeff Schnitzer j...@infohazard.org wrote: It doesn't seem to be working. Not only am I still seeing a ton of 620s, but half the time I'm also getting something that doesn't parse as JSON. It contains an unexpected ''. I'm guessing it's some sort of error message getting rendered in html or xml. org.codehaus.jackson.JsonParseException: Unexpected character ('' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.bytearrayinputstr...@908faf; line: 1, column: 2] When I try the same URL from my desktop, it works fine. Jeff On Fri, Feb 19, 2010 at 2:16 PM, Ikai L (Google) ika...@google.com wrote: The configuration changes have been made and should be live shortly if not immediately. Can you check and let me know if they are working? I'd give it about ~30 minutes if it doesn't work right away. On Fri, Feb 19, 2010 at 10:56 AM, Ikai L (Google) ika...@google.com wrote: I think there's a version in the main group. I'll post to that one first if it exists. On Fri, Feb 19, 2010 at 10:56 AM, Ikai L (Google) ika...@google.com wrote: Hey guys, I just wanted to let everyone know that I'm working on this. Stay tuned. I'll post to this thread when I have updates. On Fri, Feb 19, 2010 at 10:51 AM, Jeff Schnitzer j...@infohazard.org wrote: It helps to have some links... please star these issues! http://code.google.com/p/googleappengine/issues/detail?id=2806 http://code.google.com/p/gmaps-api-issues/issues/detail?id=2186 This problem is a really big deal, several features of my app depend on reverse geocodes. It looks like a simple whitelisting issue, shouldn't be too hard to fix! Jeff On Fri, Feb 19, 2010 at 12:26 AM, Anders anders.ny...@gmail.com wrote: Same problem here. No problems for 4 months with unchanged mapping code and as of the last day mostly 620 results. I am running on the python appengine but as previously said this is probably an issue with the geocoder IP limit. On 19 Feb, 07:21, Ivan Pardo trux...@gmail.com wrote: ive entered this is a bug on the maps api bug tracker. ive tried on 2 google apps accounts and ive asked others to confirm. it looks like geocoding is impossible from google apps servers. On Feb 18, 6:25 pm, Ivan Pardo trux...@gmail.com wrote: At least now I can be certain that it's not a problem with my code. I can only hope that Google can fix this problem ASAP, as my application is absolutely useless without a working geocoder. On Feb 18, 5:44 pm, Jeff Schnitzer j...@infohazard.org wrote: I'm also seeing 620 errors for most (possibly all) of my reverse geocode requests. Jeff -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send