Re: [appengine-java] Re: Is it possible to have collections of embedded objects?
Hi John, If you want to be able to query on the embedded instances then you will need to use one of the datastore specific persistence interfaces: ObjectDatastore from Twig and Objectify support this... not sure if others support embedded collections. Slim3 supports embedded collections as follows: @Attribute(lob = true) private ListEmbeddedChild Children; See http://sites.google.com/site/slim3appengine/slim3-datastore/defining-data-classes/serializable-objects Yasuo Higa -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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: Is it possible to have collections of embedded objects?
On 8 Apr 2010, at 13:51, Yasuo Higa wrote Slim3 supports embedded collections as follows: @Attribute(lob = true) private ListEmbeddedChild Children; See http://sites.google.com/site/slim3appengine/slim3-datastore/defining-data-classes/serializable-objects Serializing is a bit different to embedding instances because the Blob is opaque and not able to be queried. If you use @Embed in Twig or Objectify you can query for all Container instances by filtering on an embedded property. e.g. Find all Bands with Albums that have sold over a million copies class Band { @Embed ListAlbum albums } class Album { String name; int sold. } datastore.find() .type(Band.class) .addFilter(albums.sold, GREATER_THAN, 100) .returnResultsNow(); -- You received this message 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: Is it possible to have collections of embedded objects?
Hi John, thanks for your clarification. Current Slim3 does not support embedding instances like Twig/Objectify. Yasuo Higa Serializing is a bit different to embedding instances because the Blob is opaque and not able to be queried. If you use @Embed in Twig or Objectify you can query for all Container instances by filtering on an embedded property. e.g. Find all Bands with Albums that have sold over a million copies class Band { �...@embed ListAlbum albums } class Album { String name; int sold. } datastore.find() .type(Band.class) .addFilter(albums.sold, GREATER_THAN, 100) .returnResultsNow(); -- You received this message 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 ensure object synchronization when using the datastore
Hey, How do you ensure, once you have queried an object from the datastore, that another call to that object cannot be made? I basically have a bunch of objects with counters which get incremented during each call to that object. What I need to ensure is the object doesn't get called by two threads, each of which increment the counter by 1 and persist the object back to the datastore, only for the counter to be incremented by 1 and not by 2. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Is it possible to convert a user defined String key to a unique Long?
Hey, As the title of this post suggests, is it possible to get a unique Long id from a user defined String key? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Error message after updating AppEngine in my project
The same here, I have several non-jar files in WEB-INF/lib (*.txt, *.cmd) and see GAE fails to open them as ZIP. Why would it try to open non-jar files as zip? Isn't this a bug? This doesn't break development, but I get shocked when saw this first time. And now this really annoying starting up the app and see those stack traces. On 31 мар, 06:02, Rahul rahul.jun...@gmail.com wrote: Ikai, It doesn't break anything and neither does it stops from deploying but it just looks ugly and we might miss the real error if any during the deployment. Thanks, Rahul On Mar 30, 8:43 pm, Ikai L (Google) ika...@google.com wrote: Geo, what is the issue? Does it actually break anything? We'll investigate on our part, but if it doesn't actually prevent you from writing code there's absolutely no reason to downgrade. On Tue, Mar 30, 2010 at 2:19 PM, Geo gaki...@gmail.com wrote: Thanks Ikai, for looking into the root cause. I am confronting this issue, and I am relatively new to the GAE Eclipse plugin. One of the post before said that they were able to solve the issue by switching back to 1.3.1, since I got this update using the eclipse software manager, how do I switch back now? Thanks, Geo On Mar 30, 12:31 pm, Ikai L (Google) ika...@google.com wrote: I'll have to try to reproduce this. In the meantime, use svn export: http://svnbook.red-bean.com/en/1.0/re10.html http://svnbook.red-bean.com/en/1.0/re10.htmlIf it turns out the .metadata directory IS causing problems, we'll investigate what's causing this and either issue a fix or possibly document a better workaround. On Tue, Mar 30, 2010 at 12:09 AM, Spanishgringo freeman...@gmail.com wrote: Same problem for me as well. :( Back to 1.3.1 until someone can share a fix... On Mar 30, 12:28 am, julianc julian.coom...@googlemail.com wrote: Similar problem here. Upgraded to 1.3.2 error, switched back to 1.3.1 ... everything fine again. Mar 29, 2010 11:24:44 PM com.google.appengine.tools.info.LocalVersionFactory getVersion INFO: Could not find API version from ../project/war/WEB-INF/lib/.svn java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:114) at java.util.jar.JarFile.init(JarFile.java:133) at java.util.jar.JarFile.init(JarFile.java:97) at com.google.appengine.tools.util.ApiVersionFinder.findApiVersion(ApiVersionF inder.java: 37) at com.google.appengine.tools.info.LocalVersionFactory.getVersion(LocalVersion Factory.java: 65) at com.google.appengine.tools.info.UpdateCheck.getLocalVersion(UpdateCheck.jav a: 112) at com.google.appengine.tools.info.UpdateCheck.checkForUpdates(UpdateCheck.jav a: 91) at com.google.appengine.tools.info.UpdateCheck.doNagScreen(UpdateCheck.java: 164) at com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck .java: 132) at com.google.appengine.tools.development.DevAppServerMain $StartAction.apply(DevAppServerMain.java:150) at com.google.appengine.tools.util.Parser $ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.init(DevAppServer Main.java: 113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMa in.java: 89) Mar 29, 2010 11:24:44 PM com.google.apphosting.utils.jetty.JettyLogger info INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger Mar 29, 2010 11:24:44 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed ../project/war/WEB-INF/appengine-web.xml Mar 29, 2010 11:24:44 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml On Mar 29, 7:04 pm, Ikai L (Google) ika...@google.com wrote: Not sure why this should be happening as the deploy script should be ignoring this, but is it possible for you to do an svn export to another directory prior to a deploy? -- You received this message 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.comgoogle-appengine-java%252bunsubscr...@googlegroups.com . For more options, visit this group at
Re: [appengine-java] How to ensure object synchronization when using the datastore
You will need to read and update the object in a transaction which will throw an exception on commit if another thread updates the same entity. You can then refresh the object and try again. Also look into memcache which has an atomic counter increment method that is much faster than reading and writing to the datastore. The downside is that the counts could be reset so you may need to periodically store them in the datastore. On 8 Apr 2010, at 16:17, mscwd01 wrote: Hey, How do you ensure, once you have queried an object from the datastore, that another call to that object cannot be made? I basically have a bunch of objects with counters which get incremented during each call to that object. What I need to ensure is the object doesn't get called by two threads, each of which increment the counter by 1 and persist the object back to the datastore, only for the counter to be incremented by 1 and not by 2. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message 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 ensure object synchronization when using the datastore
Thanks John. So basically the process should be: - Query for the object inside a transaction - Update the object counter - Commit - If commit fails - re-query the datastore for the same object? Is it possible to just catch the exception and try committing the object again or will I have to query the datastore for the object again? Also will it work when you query for a parent object and then update the counter of a child object? Thanks again. On Apr 8, 10:33 am, John Patterson jdpatter...@gmail.com wrote: You will need to read and update the object in a transaction which will throw an exception on commit if another thread updates the same entity. You can then refresh the object and try again. Also look into memcache which has an atomic counter increment method that is much faster than reading and writing to the datastore. The downside is that the counts could be reset so you may need to periodically store them in the datastore. On 8 Apr 2010, at 16:17, mscwd01 wrote: Hey, How do you ensure, once you have queried an object from the datastore, that another call to that object cannot be made? I basically have a bunch of objects with counters which get incremented during each call to that object. What I need to ensure is the object doesn't get called by two threads, each of which increment the counter by 1 and persist the object back to the datastore, only for the counter to be incremented by 1 and not by 2. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group 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] Re: ANN: Firefox add-on for tracking GAE estimated cost
Does the X-AppEngine-Estimated-CPM-US-Dollars header appears only if the application is using Google Account authentication scheme? I have login as the administrator (developer of the web app), but have never seen this response header. -- You received this message 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: Adding Task-Queue Tasks in Batch?
I think the five limit still applies. If you want to run more than five you could run five tasks and structure them to enqueue further tasks once they run. On Apr 8, 4:41 am, Seth Ladd sethl...@gmail.com wrote: Thanks! If under a transaction, are tasks added via batch still constrained to 5 per txn? On Apr 6, 11:53 am, Keith dunelmt...@googlemail.com wrote: Fromhttp://code.google.com/appengine/docs/java/javadoc/com/google/appengi... add(java.lang.IterableTaskOptions taskOptions) Submits tasks to this queue. On Apr 6, 9:54 am, Seth Ladd sethl...@gmail.com wrote: Aloha, The docs for the Java implementation of the Task Queue mentions this: maximum number of tasks that can be added in a batch - 100 However, I can't find any reference to adding tasks in a batch. What does the above mean, and where can I find more information about it? I'd like to be able to add many tasks in a batch, if that's possible. I am aware of the 5 tasks per transaction limit. Thanks! Seth -- You received this message 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] Query returns unchanged data
Hello. I'm using JPA for the App Engine datastore. And I've got some problems. I've got an entity Container than contains entities Item(s). Here is my actions. I start transaction then update entity then flush updates to database. Then I get all entities of class Item(s) for a container which contains my updated Item. But the list of retrieved items contains Item that does not have my changes. What is wrong with my code??? I've modelled this problem. (see code) @Entity public class Container implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key key; @OneToMany(mappedBy = container, fetch = FetchType.LAZY) private ListItem items = new ArrayListItem(); public void setKey(Key key) { this.key = key; } public Key getKey() { return key; } public void setItems(ListItem items) { this.items = items; } public ListItem getItems() { return items; } } @Entity public class Item implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key key; @ManyToOne(fetch = FetchType.LAZY) private Container container; @Column private String value; public void setKey(Key key) { this.key = key; } public Key getKey() { return key; } public void setContainer(Container container) { this.container = container; } public Container getContainer() { return container; } public void setValue(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return Item [key= + key + , value= + value + ]; } } @Service(TestLocalService) public class LocalService { protected final Log logger = LogFactory.getLog(getClass()); public Key createContainer() { em.getTransaction().begin(); Container container = new Container(); em.persist(container); em.flush(); logger.fatal(new container + container.getKey()); em.getTransaction().commit(); return container.getKey(); } public Key generateItems(Key containerKey) { em.getTransaction().begin(); Container container = em.find(Container.class, containerKey); Key key = null; for (int i = 0; i 5; i++) { Item item = new Item(); item.setContainer(container); item.setValue(Integer.toString(i)); em.persist(item); em.flush(); key = item.getKey(); logger.fatal(new item + item); } em.getTransaction().commit(); return key; } public void changeItems(Key containerKey, Key itemKey) { em.getTransaction().begin(); Container container = em.find(Container.class, containerKey); Item changedItem = em.find(Item.class, itemKey); changedItem.setValue(xxx); // --- PROBLEM HERE em.flush(); logger.fatal(changed item: + changedItem); for (Item item : container.getItems()) { logger.fatal(list item: + item); // --- PROBLEM HERE (Item contains a stale value of the field value) } em.getTransaction().commit(); } public static void testListSync(LocalService service) { // MAIN TEST Key containerKey = service.createContainer(); Key itemKey = service.generateItems(containerKey); service.changeItems(containerKey, itemKey); } } EXECUTION LOG ### CALL createContainer datastore_v3.BeginTransaction datastore_v3.Put datastore_v3.Commit ## LOG createContainer SEVERE: new containerContainer(684) ### CALL generateItems datastore_v3.BeginTransaction datastore_v3.Get datastore_v3.Put datastore_v3.Put datastore_v3.Put datastore_v3.Put datastore_v3.Put datastore_v3.Commit ### LOG generateItems SEVERE: new itemItem [key=Container(684)/Item(685), value=0] SEVERE: new itemItem [key=Container(684)/Item(686), value=1] SEVERE: new itemItem [key=Container(684)/Item(687), value=2] SEVERE: new itemItem [key=Container(684)/Item(688), value=3] SEVERE: new itemItem [key=Container(684)/Item(689), value=4] ### CALL changeItems datastore_v3.BeginTransaction datastore_v3.Get datastore_v3.Get
[appengine-java] Re: ANN: Firefox add-on for tracking GAE estimated cost
Yes, as far as I'm aware, the header is available only with Google Account authentication. Even when your application uses custom authentication, I guess you could try providing an extra (hidden) login page for you (developer) that will authenticate your session and allow you to collect cost headers. On Apr 8, 11:54 am, Thomas mylee...@gmail.com wrote: Does the X-AppEngine-Estimated-CPM-US-Dollars header appears only if the application is using Google Account authentication scheme? I have login as the administrator (developer of the web app), but have never seen this response header. -- You received this message 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: Using app's ELResolver class
I tried all sorts of things -- implementing my own child-first classloader, then passing it around as Thread.getContextClassLoader, creating my listeners and servlets with it, but w/o success. The issue is, that JSF is already installed/deployed as part of custom Jetty/GAE initialization, hence my wrapped FacesServlet wasn't able to find proper factories -- breaking at initialization. Not wanting to go deeper into JSF, I stopped there. Even if we by-passed this factory lookup, my guess is we would encounter other EL related problems, as I would suspect that GAE's EL classes would sometimes leak into our code -- CCE. On Apr 7, 8:21 pm, Joel Weight digitalj...@gmail.com wrote: I ran into this a few months ago when first getting jsf 2 going. Unfortunately I didn't find a resolution and wound up on the old EL version, so if you figure something out, please let us know. Thanks, Joel On Wed, Apr 7, 2010 at 5:10 AM, alesj ales.jus...@gmail.com wrote: While this finds the right jar URL url = cl.getResource(META-INF/maven/javax.el/el-api/ pom.properties); String info = url.toExternalForm(); System.out.println(info = + info); // jar:file:/foobar/projects/foobar/trunk/server/target/ foobar-server-0.0.1-SNAPSHOT/WEB-INF/lib/el-api-2.2.jar!/META-INF/ maven/javax.el/el-api/pom.properties So we know the resources are there. -- You received this message 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] Object Manager has been closed on 2 synchronous requests
Hi, I'm getting an JDO/Nucleus exception when running 2 synchronous requests on different ids of an object: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed --- This is how my getById looks like: PersistenceManager pm = getPM(); Stream stream = null; try { Stream tmp = pm.getObjectById(Stream.class, id); stream = pm.detachCopy(tmp); } finally { pm.close(); // here the exception occurs } return stream; --- It works fine on single request, but fails on 2 or more. anyone know how to get around this? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: having trouble implementing gwt in existing gae app
On Thu, Apr 8, 2010 at 3:56 AM, zackmac zack.macom...@gmail.com wrote: Anybody have any thoughts on what I could be missing? On Apr 5, 9:24 pm, zackmac zack.macom...@gmail.com wrote: I'm using Eclipse 3.4.1, GAE 1.3.1 and trying to use GWT 2.0.3. I've been working on my GAE app some time and that's working well - just want to spice up the front-end a little. I added a new GWT module, entry point class and HTML page from File - New and then copied the appropriate js head include in my existing index.jsp page, but I'm still getting Missing required argument 'module[s]' Google Web Toolkit 2.0.3. When running the app, I right-click on my project and then go to Debug As and choose Java Application. Then I this is most likely wrong. there must be something like run as web application (did you install the google plugin correctly?). plus. this is a gwt question - most likely you will never get an answer here. try the GWT mailing instead. they will help. ra found the com.google.gwt.dev.DevMode app to run and then I get the Missing required argument 'module[s]' error. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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] Object Manager has been closed on 2 synchronous requests
hi, you should only close the persistence manager when your done. This error occurs because you try to close it a second time. Once you do the pm.close() all the data will be updated 2010/4/8 Arny arny...@googlemail.com Hi, I'm getting an JDO/Nucleus exception when running 2 synchronous requests on different ids of an object: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed --- This is how my getById looks like: PersistenceManager pm = getPM(); Stream stream = null; try { Stream tmp = pm.getObjectById(Stream.class, id); stream = pm.detachCopy(tmp); } finally { pm.close(); // here the exception occurs } return stream; --- It works fine on single request, but fails on 2 or more. anyone know how to get around this? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Object Manager has been closed on 2 synchronous requests
Hmm, does it really matter even when using detached objects? And aren't the persistence managers created individually on each request? I didn't know they are shared over many requests? What's the best way to update about 20 objects synchronously using 20 asynch urlfetches? It needs to be urlfetches, because the 20 objects are getting updates from an urlfetch again. Simple model: - call 20 urls with individual ids - each url gets an objects and gets its updates from another url Any good solution for that? Thanks On Apr 8, 3:13 pm, bimbo jones bimbojone...@gmail.com wrote: hi, you should only close the persistence manager when your done. This error occurs because you try to close it a second time. Once you do the pm.close() all the data will be updated 2010/4/8 Arny arny...@googlemail.com Hi, I'm getting an JDO/Nucleus exception when running 2 synchronous requests on different ids of an object: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed --- This is how my getById looks like: PersistenceManager pm = getPM(); Stream stream = null; try { Stream tmp = pm.getObjectById(Stream.class, id); stream = pm.detachCopy(tmp); } finally { pm.close(); // here the exception occurs } return stream; --- It works fine on single request, but fails on 2 or more. anyone know how to get around this? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Object Manager has been closed on 2 synchronous requests
I could find my mistake. Sorry for taking your time. Thanks anyway! On Apr 8, 3:24 pm, Arny arny...@googlemail.com wrote: Hmm, does it really matter even when using detached objects? And aren't the persistence managers created individually on each request? I didn't know they are shared over many requests? What's the best way to update about 20 objects synchronously using 20 asynch urlfetches? It needs to be urlfetches, because the 20 objects are getting updates from an urlfetch again. Simple model: - call 20 urls with individual ids - each url gets an objects and gets its updates from another url Any good solution for that? Thanks On Apr 8, 3:13 pm, bimbo jones bimbojone...@gmail.com wrote: hi, you should only close the persistence manager when your done. This error occurs because you try to close it a second time. Once you do the pm.close() all the data will be updated 2010/4/8 Arny arny...@googlemail.com Hi, I'm getting an JDO/Nucleus exception when running 2 synchronous requests on different ids of an object: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed --- This is how my getById looks like: PersistenceManager pm = getPM(); Stream stream = null; try { Stream tmp = pm.getObjectById(Stream.class, id); stream = pm.detachCopy(tmp); } finally { pm.close(); // here the exception occurs } return stream; --- It works fine on single request, but fails on 2 or more. anyone know how to get around this? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Filter on float value in JDO query
Hi, I'm trying to execute following query, which should return 3 values but returns 0. I think it's because pointsEarned is a float, but I don't know how to solve it. Query query = pm.newQuery(Answer.class); query.setFilter(pointsEarned 0); ListAnswer answers = (ListAnswer) query.execute(); There are 3 Answer entities in the datastore with pointsEarned = -1.0 Is there anyway to query like this on a float field? Regards -- You received this message 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] Safe Harbor DPA compliant incremental backups of datastore
I would welcome suggestions regarding ways of performing Safe Harbor and Data Protection Act compliant incremental backups of an app's datastore. Any ideas? -- You received this message 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] JPA: How to use a String as Primary Key?
I have tried to follow the documentation at http://code.google.com/intl/de-DE/appengine/docs/java/datastore/creatinggettinganddeletingdata.html but no matter what I try, I always get an error/an exception of different kinds. Already the simplest attempt comes up with an error. That's what i have: - - - - - public class Person { @Id private String id; - - - - - ... person.setId(stsch); EntityManager.persist(person); ... - - - - - == java.lang.IllegalArgumentException: Cannot parse: stsch=== at com.google.appengine.api.datastore.KeyFactory.stringToKey(KeyFactory.java: 192) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java: 201) at org.datanucleus.store.appengine.DatastoreFKListStoreSpecialization.updateElementFk(DatastoreFKListStoreSpecialization.java: 94) at org.datanucleus.store.mapped.scostore.FKListStore.updateElementFk(FKListStore.java: 254) ... Caused by: com.google.appengine.repackaged.com.google.common.util.Base64DecoderException: invalid padding byte '=' at byte offset 5 at com.google.appengine.repackaged.com.google.common.util.Base64.decode(Base64.java: 529) at com.google.appengine.repackaged.com.google.common.util.Base64.decodeWebSafe(Base64.java: 493) at com.google.appengine.api.datastore.KeyFactory.stringToKey(KeyFactory.java: 190) What is necessary to use a String as Primary Key? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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] Is it possible to convert a user defined String key to a unique Long?
You could probably change the characters to integer values and concatenate these, but you are going to get some BIG numbers. Better solution still is probably to use KeyFactory to generate a unique Key. What is it you are trying to do? On Thu, Apr 8, 2010 at 2:19 AM, mscwd01 mscw...@gmail.com wrote: Hey, As the title of this post suggests, is it possible to get a unique Long id from a user defined String key? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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.
Re: [appengine-java] Re: How to ensure object synchronization when using the datastore
Here's a blog post Max Ross wrote about optimistic locking using built in features of JDO/JPA On Thu, Apr 8, 2010 at 2:42 AM, mscwd01 mscw...@gmail.com wrote: Thanks John. So basically the process should be: - Query for the object inside a transaction - Update the object counter - Commit - If commit fails - re-query the datastore for the same object? Is it possible to just catch the exception and try committing the object again or will I have to query the datastore for the object again? Also will it work when you query for a parent object and then update the counter of a child object? Thanks again. On Apr 8, 10:33 am, John Patterson jdpatter...@gmail.com wrote: You will need to read and update the object in a transaction which will throw an exception on commit if another thread updates the same entity. You can then refresh the object and try again. Also look into memcache which has an atomic counter increment method that is much faster than reading and writing to the datastore. The downside is that the counts could be reset so you may need to periodically store them in the datastore. On 8 Apr 2010, at 16:17, mscwd01 wrote: Hey, How do you ensure, once you have queried an object from the datastore, that another call to that object cannot be made? I basically have a bunch of objects with counters which get incremented during each call to that object. What I need to ensure is the object doesn't get called by two threads, each of which increment the counter by 1 and persist the object back to the datastore, only for the counter to be incremented by 1 and not by 2. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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.
Re: [appengine-java] Re: How to ensure object synchronization when using the datastore
Oops. Link is here: http://gae-java-persistence.blogspot.com/2009/10/optimistic-locking-with-version.html On Thu, Apr 8, 2010 at 10:00 AM, Ikai L (Google) ika...@google.com wrote: Here's a blog post Max Ross wrote about optimistic locking using built in features of JDO/JPA On Thu, Apr 8, 2010 at 2:42 AM, mscwd01 mscw...@gmail.com wrote: Thanks John. So basically the process should be: - Query for the object inside a transaction - Update the object counter - Commit - If commit fails - re-query the datastore for the same object? Is it possible to just catch the exception and try committing the object again or will I have to query the datastore for the object again? Also will it work when you query for a parent object and then update the counter of a child object? Thanks again. On Apr 8, 10:33 am, John Patterson jdpatter...@gmail.com wrote: You will need to read and update the object in a transaction which will throw an exception on commit if another thread updates the same entity. You can then refresh the object and try again. Also look into memcache which has an atomic counter increment method that is much faster than reading and writing to the datastore. The downside is that the counts could be reset so you may need to periodically store them in the datastore. On 8 Apr 2010, at 16:17, mscwd01 wrote: Hey, How do you ensure, once you have queried an object from the datastore, that another call to that object cannot be made? I basically have a bunch of objects with counters which get incremented during each call to that object. What I need to ensure is the object doesn't get called by two threads, each of which increment the counter by 1 and persist the object back to the datastore, only for the counter to be incremented by 1 and not by 2. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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.
Re: [appengine-java] JPA: How to use a String as Primary Key?
Check out this set of Javadocs: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html Key yourKey = KeyFactory.stringToKey(yourStringHere); On Thu, Apr 8, 2010 at 3:26 AM, stsch77 stsc...@mailinator.com wrote: I have tried to follow the documentation at http://code.google.com/intl/de-DE/appengine/docs/java/datastore/creatinggettinganddeletingdata.html but no matter what I try, I always get an error/an exception of different kinds. Already the simplest attempt comes up with an error. That's what i have: - - - - - public class Person { @Id private String id; - - - - - ... person.setId(stsch); EntityManager.persist(person); ... - - - - - == java.lang.IllegalArgumentException: Cannot parse: stsch=== at com.google.appengine.api.datastore.KeyFactory.stringToKey(KeyFactory.java: 192) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java: 201) at org.datanucleus.store.appengine.DatastoreFKListStoreSpecialization.updateElementFk(DatastoreFKListStoreSpecialization.java: 94) at org.datanucleus.store.mapped.scostore.FKListStore.updateElementFk(FKListStore.java: 254) ... Caused by: com.google.appengine.repackaged.com.google.common.util.Base64DecoderException: invalid padding byte '=' at byte offset 5 at com.google.appengine.repackaged.com.google.common.util.Base64.decode(Base64.java: 529) at com.google.appengine.repackaged.com.google.common.util.Base64.decodeWebSafe(Base64.java: 493) at com.google.appengine.api.datastore.KeyFactory.stringToKey(KeyFactory.java: 190) What is necessary to use a String as Primary Key? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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: Java Mail Service
Hi I am not sure why the low-level API isn't working (or why the low- level api is using a high amount of CPU). As to your original question, can you take a look at http://code.google.com/p/googleappengine/issues/detail?id=1631 Also from http://code.google.com/appengine/docs/java/mail/usingjavamail.html : The low-level API includes a convenience method for sending mail to all of the application's administrators. To do this in JavaMail, use admins (with no at-symbol or domain) as a recipient Looks like regaular JavaMail should work with msg.addRecipient(Message.RecipientType.CC, new InternetAddress (admins)); ... Regards, Karthik On Apr 7, 5:56 am, moissinac jcmoissi...@gmail.com wrote: A trace on the code shows me that the line in the previous code ms.sendToAdmins(msg); fails So, my hypothesis is that a prerequisite is not fulfilled In the code, I use the Low Level API, which doesn't need a specific configuration (I believe it) In the log, I see 2585cpu_ms with a warning saying 'This request used a high amount of CPU and may soon exceed is quota' I don't see where my code use a such amount of CPU On 7 avr, 13:26, moissinac jcmoissi...@gmail.com wrote: Tried the following code MailService ms = MailServiceFactory.getMailService(); MailService.Message msg = new MailService.Message(); msg.setSubject(Tu as réussi cette étape); ms.sendToAdmins(msg); without more result. The code is executed in the development server (without sending email as specified by the documentation) And do nothing visible in the GAE server. On 2 avr, 18:12, KarthikR soumya.karth...@gmail.com wrote: Hi The java API javadoc athttp://code.google.com/appengine/docs/java/javadoc/com/google/appengi... provides send() and sendToAdmins() methods, Can you try using sendToAdmins() ? Regards, KarthikR On Apr 1, 7:17 am, moissinac jcmoissi...@gmail.com wrote: Hello I have servlet with a code copied from the documentation for sending an email with the mail service Each time I call the service, I see the trace in the quota count like this: Mail Mail API Calls 0% 0% 5 of 7000 Okay Recipients Emailed 0% 0% 5 of 2000 Okay Admins Emailed 0% 0% 0 of 5000 Okay ... The count for Mail API Calls and Recipients Emailed is incremented each time My code send an email from the admin of my domain to the admin of my admin, but the item Admins Emailed is never incremented The admin of my domain (me) never receive an email by that mean. If I send an email with gmail to the same address, it receive the email. Advice? help? Thank you inadvance- 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: List of sub entities does not obay list order
Hi, Can anybody help solve my problem? Gunnar Here is the testcode: package appengine.test; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; import java.util.ArrayList; import java.util.List; import javax.jdo.JDOHelper; import javax.jdo.ObjectState; import javax.jdo.PersistenceManager; import javax.jdo.Query; import javax.jdo.Transaction; import javax.jdo.spi.PersistenceCapable; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings(serial) public class ListordertestServlet extends HttpServlet { StringBuilder sb = new StringBuilder(); public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { sb = new StringBuilder(); resp.setContentType(text/plain); deleteAll(); MyEntity entity = persist(); entity = add(entity, one); query(); entity = add(entity, two); query(); entity = add(entity, three); query(); entity = reorder(entity); query(); resp.getWriter().println(sb.toString()); } private MyEntity persist() { MyEntity entity = new MyEntity(); // MyEntity detached = null; ArrayListSubEntity subEntities = new ArrayListSubEntity(); entity.setMyList(subEntities); PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); pm.setDetachAllOnCommit(true); try { tx.begin(); pm.makePersistent(entity); tx.commit(); // detached = pm.detachCopy(entity); sb.append(persisted entity: + entity.getId() + \n); // sb.append(detached object: + detached + \n); } catch (Exception e) { printStackTrace(e); } finally { if (tx.isActive()) tx.rollback(); pm.close(); } // return detached; return entity; } private MyEntity add(MyEntity entity, String name) { // MyEntity detached = null; sb.append(before add + entity.toString() + \n); PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); pm.setDetachAllOnCommit(true); try { tx.begin(); final SubEntity subEntity = new SubEntity(name); entity.getMyList().add(0,subEntity); entity = pm.makePersistent(entity); tx.commit(); // detached = pm.detachCopy(entity); // pm.detachCopy(entity); sb.append(added sub-entity + name + \n); // sb.append(detached object: + detached + \n); sb.append(after add: + entity + \n); } catch (Exception e) { printStackTrace(e); } finally { if (tx.isActive()) tx.rollback(); pm.close(); } // return detached; return entity; } private MyEntity reorder(MyEntity entity) { // MyEntity detached = null; sb.append(before reorder + entity.toString() + \n); PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); pm.setDetachAllOnCommit(true); try { tx.begin(); ArrayListSubEntity myList = entity.getMyList(); SubEntity first = myList.remove(0); myList.add(first); entity = pm.makePersistent(entity); tx.commit(); // detached = pm.detachCopy(entity); // sb.append(detached object: + detached + \n); sb.append(reordered object: + entity + \n); } catch (Exception e) { printStackTrace(e); } finally { if (tx.isActive()) tx.rollback(); pm.close(); } // return detached; return entity; } @SuppressWarnings(unchecked)
Re: [appengine-java] Re: Adding Task-Queue Tasks in Batch?
Exactly what I am doing now, thanks. :) On Thursday, April 8, 2010, Keith dunelmt...@googlemail.com wrote: I think the five limit still applies. If you want to run more than five you could run five tasks and structure them to enqueue further tasks once they run. On Apr 8, 4:41 am, Seth Ladd sethl...@gmail.com wrote: Thanks! If under a transaction, are tasks added via batch still constrained to 5 per txn? On Apr 6, 11:53 am, Keith dunelmt...@googlemail.com wrote: Fromhttp://code.google.com/appengine/docs/java/javadoc/com/google/appengi... add(java.lang.IterableTaskOptions taskOptions) Submits tasks to this queue. On Apr 6, 9:54 am, Seth Ladd sethl...@gmail.com wrote: Aloha, The docs for the Java implementation of the Task Queue mentions this: maximum number of tasks that can be added in a batch - 100 However, I can't find any reference to adding tasks in a batch. What does the above mean, and where can I find more information about it? I'd like to be able to add many tasks in a batch, if that's possible. I am aware of the 5 tasks per transaction limit. Thanks! Seth -- You received this message 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: AppstatsServlet not working in 1.3.2, redirects to /stats
I found the solution to this. The correct URL is /appstats/stats On Apr 7, 6:41 pm, Viðar Svansson vidarsv...@gmail.com wrote: Hi, I am trying out the now profiling stats in appengine using AppstatsServlet and AppstatsFilter. The filter seems to work just fine but the servlets mapped at /appstats/* just redirects to /stats. If I try to map it to /stats then it gets stuck in an infinite redirection loop. Also, what does an admin mean in this context? Is it an admin in the Google Apps domain or the App Engine admin (developer)? Thanks, Viðar -- You received this message 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: Safe Harbor DPA compliant incremental backups of datastore
Is this the kind of thing the Data Liberation Front[1] might be interested in helping with? Thanks. [1] http://www.dataliberation.org/google/app -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Eclipse plugin - prevent auto-copy of jars
Thanks Scott, Miguel. For now I am deploying manually and that seems to work. Miguel - thanks for the link to the FAQ. I overlooked the eclipse plugin googlecode website which, retrospectively thinking, should have been the most logical place to look for an answer :-). Krishna On Apr 5, 5:36 pm, Miguel Méndez mmen...@google.com wrote: By default the eclipse plugin will copy the default set of SDK jars that most applications will need into YOUR_WAR_DIRECTORY/WEB-INF/lib under the assumption that you will want to launch and deploy from it directly. If you want tighter control, you can navigate to the project properties and select Google Web Application and uncheck the Launch and deploy from this directory. This will treat the directory as input only (won't copy any jars into YOUR_WAR_DIRECTORY/WEB-INF/lib), but you will need to provide a staging war directory for launching and debugging. The feature was intended to facilitate integration with Eclipse J2EE projects and Maven -- perhaps it will be useful in this case. The FAQshttp://code.google.com/eclipse/docs/faq.htmlgo into more detail. On Sun, Apr 4, 2010 at 2:35 PM, Scott Hernandez scotthernan...@gmail.comwrote: There was recent discussion about dependencies (valid for Objectify or any datastore based impl.) but the eclipse plugin question has not been answered well. http://groups.google.com/group/objectify-appengine/browse_thread/thre... I suspect that if you enable the plugin, it will always copy the files into your lib dir :( You can disable it and use ant/command-line to deploy, as a last ditch option. On Sun, Apr 4, 2010 at 11:25 AM, Krishna shrikrishna.sh...@gmail.comwrote: Hi, I'm using Objectify for persistence and I'd really like to remove all jdo / jpa related jars from my lib directory but eclipse keeps transferring them back. I also tried modifying the contents of the com.google.appengine.eclipse.core file under the .setting directory but I guess eclipse overwrites my changes on startup and then copies over the jars anyway. I've seen discussions where people have used the appcfg tool to manually deploy instead of doing so from within eclipse but I'm hoping a better solution exists. This blogpost http://www.answercow.com/2010/03/google-app-engine-cold-start-guide-f... claims that startup times reduce by ~400ms by removing these jars and I really love speedups especially when they are free :-). Perhaps someone from Google can comment on whether removing these jars will actually speedup apps even if the app does not directly use them. Also, I am not sure which jars need to be retained for sure and I'd really appreciate it if someone could could give me a pointer regarding this. I am pretty new to Java so apologies if this is a naive question. Thanks so much, Krishna -- You received this message 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.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Miguel -- You received this message 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: Is it possible to convert a user defined String key to a unique Long?
I have objects which represent users, the key to each object is their email address encoded as a String. Having the email address as the key works well so i'd like to keep it that way rather than having an auto incrementing Long key. However, for reasons I wont go into here, I need a way of identifying user objects via a meaningless number rather than an personal email address. I assumed the datastore may hold a unique auto incrementing number for each object regardless of the key type used and if so I was wondering how one may access it? Thanks On Apr 8, 5:59 pm, Ikai L (Google) ika...@google.com wrote: You could probably change the characters to integer values and concatenate these, but you are going to get some BIG numbers. Better solution still is probably to use KeyFactory to generate a unique Key. What is it you are trying to do? On Thu, Apr 8, 2010 at 2:19 AM, mscwd01 mscw...@gmail.com wrote: Hey, As the title of this post suggests, is it possible to get a unique Long id from a user defined String key? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B 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 Enginehttp://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: How to ensure object synchronization when using the datastore
Thanks Ikai, that link was very helpful. On Apr 8, 6:01 pm, Ikai L (Google) ika...@google.com wrote: Oops. Link is here: http://gae-java-persistence.blogspot.com/2009/10/optimistic-locking-w... On Thu, Apr 8, 2010 at 10:00 AM, Ikai L (Google) ika...@google.com wrote: Here's a blog post Max Ross wrote about optimistic locking using built in features of JDO/JPA On Thu, Apr 8, 2010 at 2:42 AM, mscwd01 mscw...@gmail.com wrote: Thanks John. So basically the process should be: - Query for the object inside a transaction - Update the object counter - Commit - If commit fails - re-query the datastore for the same object? Is it possible to just catch the exception and try committing the object again or will I have to query the datastore for the object again? Also will it work when you query for a parent object and then update the counter of a child object? Thanks again. On Apr 8, 10:33 am, John Patterson jdpatter...@gmail.com wrote: You will need to read and update the object in a transaction which will throw an exception on commit if another thread updates the same entity. You can then refresh the object and try again. Also look into memcache which has an atomic counter increment method that is much faster than reading and writing to the datastore. The downside is that the counts could be reset so you may need to periodically store them in the datastore. On 8 Apr 2010, at 16:17, mscwd01 wrote: Hey, How do you ensure, once you have queried an object from the datastore, that another call to that object cannot be made? I basically have a bunch of objects with counters which get incremented during each call to that object. What I need to ensure is the object doesn't get called by two threads, each of which increment the counter by 1 and persist the object back to the datastore, only for the counter to be incremented by 1 and not by 2. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B 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.comgoogle-appengine-java%2B 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 http://googleappengine.blogspot.com|http://twitter.com/app_engine -- Ikai Lan Developer Programs Engineer, Google App Enginehttp://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] DataStore query without transaction - Spring 2.5 + JPA
I need to use query that fetches objects from multiple entity groups (which means I can't use transactions). Here's the method: @Override public CollectionItem findInactiveItems(Date endDate) { inactiveItems = em.createNamedQuery(findInactiveItems).setParameter(endDate, endDate).getResultList(); if(null == inactiveItems) inactiveItems = new ArrayListItem(); inactiveItems.size(); return inactiveItems; } However, calling getResultList() causes the following error: Caused by: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed at org.datanucleus.ObjectManagerImpl.assertIsOpen(ObjectManagerImpl.java: 3876) at org.datanucleus.ObjectManagerImpl.getTransaction(ObjectManagerImpl.java: 596) at org.datanucleus.jpa.EntityTransactionImpl.isActive(EntityTransactionImpl.java: 61) at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:158) I found here on groups the same error posted with suggestions that using OpenEntityManagerInViewFilter should keep entity manager throughout the request. Unforfunately, I can't get this filter working because it tries to create a new entity manager factory while gae allows to create only one of those. Here is part of my web.xml servlet servlet-namecontext/servlet-name servlet-class org.springframework.web.context.ContextLoaderServlet /servlet-class load-on-startup1/load-on-startup /servlet filter filter-nameOpenEntityManagerInViewFilter/filter-name filter- classorg.springframework.orm.jpa.support.OpenEntityManagerInViewFilter/ filter-class init-param param-nameentityManagerFactory/param-name param-valueentityManagerFactory/param-value /init-param /filter filter-mapping filter-nameOpenEntityManagerInViewFilter/filter-name url-pattern*.html/url-pattern /filter-mapping And part of applicationContext.xml: bean id=entityManagerFactory name=entityManagerFactory class=org.springframework.orm.jpa.LocalEntityManagerFactoryBean scope=singleton property name=persistenceUnitName value=transactions-optional / /bean bean id=transactionManager class=org.springframework.orm.jpa.JpaTransactionManager scope=singleton property name=entityManagerFactory ref=entityManagerFactory / /bean And here is the error caused by filter: org.springframework.web.servlet.FrameworkServlet initServletBean: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/allewidok-servlet.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Provider error. Provider: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider (...) Caused by: java.lang.IllegalStateException: Application code attempted to create a EntityManagerFactory named transactions-optional, but one with this name already exists! Instances of EntityManagerFactory are extremely slow to create and it is usually not necessary to create one with a given name more than once. Instead, create a singleton and share it throughout your code. If you really do need to create a duplicate EntityManagerFactory (such as for a unittest suite), set the appengine.orm.disable.duplicate.emf.exception system property to avoid this error. at org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.checkForRepeatedAllocation(DatastoreEntityManagerFactory.java: 136) at org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.init(DatastoreEntityManagerFactory.java: 64) at org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createEntityManagerFactory(DatastorePersistenceProvider.java: 35) at javax.persistence.Persistence.createFactory(Persistence.java:172) So, has anybody actually used OpenEntityManagerInViewFilter on GAE? -- You received this message 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] response.getOutputStream().write(byte[]) causes java.security.AccessControlException on GAE ?
Hi, I have groovy script that read an image from a Blob field, and write it to the response. It runs well on my local environment, but causes java.security.AccessControlException on the google app engine. Any idea why it happened and how to fix it? The script (image.groovy) looks like this: import com.google.appengine.api.datastore.* import com.google.appengine.api.images.* def k = KeyFactory.stringToKey( params.key ) def img = datastore.get(k).content.getBytes(); if ( img ){ def width = params.width; def height = params.height; if ( width height ){ Image oldImage = ImagesServiceFactory.makeImage(img); Transform resize = ImagesServiceFactory.makeResize(width.toInteger(), height.toInteger()); Image newImage = images.applyTransform(resize, oldImage); img = newImage.getImageData(); } response.getOutputStream().write(img) }else{ println failed to find img } And the error: 04-07 08:44PM 14.540 GroovyServlet Error: script: '/image.groovy': Script processing failed.access denied (java.lang.Runti 04-07 08:44PM 14.540 java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) 04-07 08:44PM 14.540 at com.google.appengine.runtime.Request.process-7950a73f1237deb5(Request.java) 04-07 08:44PM 14.540 at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.init(ClassLoaderForClassArtifacts.jav 04-07 08:44PM 14.540 at org.codehaus.groovy.runtime.callsite.CallSiteClassLoader.init(CallSiteClassLoader.java: 40) 04-07 08:44PM 14.541 at org.codehaus.groovy.reflection.CachedClass $5$1.run(CachedClass.java:144) 04-07 08:44PM 14.541 at org.codehaus.groovy.reflection.CachedClass $5$1.run(CachedClass.java:142) 04-07 08:44PM 14.541 at java.security.AccessController.doPrivileged(AccessController.java:34) 04-07 08:44PM 14.541 at org.codehaus.groovy.reflection.CachedClass $5.initValue(CachedClass.java:141) 04-07 08:44PM 14.541 at org.codehaus.groovy.reflection.CachedClass $5.initValue(CachedClass.java:139) 04-07 08:44PM 14.541 at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java: 33) 04-07 08:44PM 14.541 at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:20) 04-07 08:44PM 14.541 at org.codehaus.groovy.reflection.CachedClass.getCallSiteLoader(CachedClass.java: 464) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compilePojoMethod(CallSiteGenerator.java: 222 04-07 08:44PM 14.541 at org.codehaus.groovy.reflection.CachedMethod.createPojoMetaMethodSite(CachedMethod.java: 244) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createCachedMethodSite(PojoMetaMethodSite.j 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createPojoMetaMethodSite(PojoMetaMethodSite 04-07 08:44PM 14.541 at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:2987) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java: 114) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java: 148) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java: 40) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: 117) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: 125) 04-07 08:44PM 14.541 at image.run(image.groovy:18) 04-07 08:44PM 14.541 at groovy.util.GroovyScriptEngine.run(GroovyScriptEngine.java:464) 04-07 08:44PM 14.541 at groovy.servlet.GroovyServlet $1.call(GroovyServlet.java:120) 04-07 08:44PM 14.541 at org.codehaus.groovy.runtime.GroovyCategorySupport $ThreadCategoryInfo.use(GroovyCategorySupport.java 04-07 08:44PM 14.542 at org.codehaus.groovy.runtime.GroovyCategorySupport $ThreadCategoryInfo.access$200(GroovyCategorySuppo 04-07 08:44PM 14.542 at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java: 201) 04-07 08:44PM 14.542 at groovy.servlet.GroovyServlet.service(GroovyServlet.java:129) 04-07 08:44PM 14.542 at groovyx.gaelyk.GaelykServlet.super $5$service(GaelykServlet.groovy) 04-07 08:44PM 14.542 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 04-07 08:44PM 14.542 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 04-07 08:44PM 14.542 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 04-07 08:44PM 14.542 at java.lang.reflect.Method.invoke(Method.java: 43) 04-07 08:44PM 14.542 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java: 88) 04-07 08:44PM 14.542 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) 04-07 08:44PM 14.542 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) 04-07 08:44PM 14.542 at
[appengine-java] Re: Delay between Load Request and Filter Init
Ok, now this is getting silly :) My application gets a page request that contains some images. My application has some specialized logic that mounts images with different states on a custom URL that is stored in the applications memory - that URL is returned in the HTML. The web browser then, obviously, requests the image at the custom URL. Unfortunately, in the 3 seconds between the request for the page and the request for the image, the application restarted and lost the custom URL. Thoughts? Is there no way to ensure that the application stays alive during a complete page request? Now that I think about it, I guess there's nothing that differentiates a complete set of page requests from a single image request - either of which can be a loading request. To date, this has happened at least 3-4 times - I just didn't see it as a problem until an image was requested. I'm the only traffic for the time being. Thanks! Jake On Apr 7, 2:52 pm, Jake jbrooko...@cast.org wrote: Hello, I'm currently using the Wicket Framework which is simply a javax.servlet.Filter. I have a quick little logging statement in the init() method of the filter which, I believe, is the absolute first thing that should run on a loading request. I've been working hard to minimize the startup time for my application, but now I've discovered a delay between the initial GET request and the log statement in the init() function that is anywhere between 2 seconds and 15 seconds. I suppose I can live with the 2 seconds, but 15 seconds is pushing it :) 04-07 11:41AM 41.583 75.150.73.225 - - [07/Apr/2010:11:42:14 -0700] GET / HTTP/1.1 500 0 - Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3,gzip(gfe) jacob-brookover.appspot.com D 04-07 11:41AM 53.341 org.cast.google.TestFilter init: Initializing Filter I've been fuddling around with a lot of things, so I'm far from a standard implementation at this point. I'm hoping someone can tell me what I can do to remove such a delay. Thanks! Jake -- You received this message 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] Delay between Load Request and Filter Init
On 8 Apr 2010, at 01:52, Jake wrote: Hello, I'm currently using the Wicket Framework which is simply a javax.servlet.Filter. I have a quick little logging statement in the init() method of the filter which, I believe, is the absolute first thing that should run on a loading request. Hi Jake, do you have a lot of dependancies in your WEB-INF/lib folder? I am not sure how much time is required per MB but perhaps you could experiment with shrinking your jars into a single combined dependancy. Some tools to look into that might help in this regard: http://www.yworks.com/en/products_yguard_about. http://proguard.sourceforge.net/ http://pmd.sourceforge.net/ I've been meaning to experiment with these myself. It would be crazy to *not* use frameworks and external libraries if the jar size problem can be solved another way. Also, I think I remember there are some settings in Wicket to make it not scan for i18n resource files when it starts up. If you are using Guice with Wicket you can save a few seconds by using the non-AOP version that does not enhance classes. John -- You received this message 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: Trying a clean compile gives The parameter is incorrect
As you said, when Enhance classes is little ,there is OK, but when Enhance classes has many many(ex: 200 classes) ,the same problem is appear. how to do with 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: Issue with google plugin for eclipse
I created a web application project, without web toolkit sdk (just gae sdk), thx for the thread, I'll try it. On 6 abr, 19:00, Ikai L (Google) ika...@google.com wrote: What kind of project have you created? This looks like the issue filed here: http://code.google.com/p/googleappengine/issues/detail?id=2306 http://code.google.com/p/googleappengine/issues/detail?id=2306You'll have to provide more detail, though. How are you creating the project? On Tue, Apr 6, 2010 at 5:31 AM, joradom jora...@gmail.com wrote: The plugin doesn't allow me to create a new Servlet, when calling the create servlet wizard the project field appears greyed and empty. I can create a class, or any file, but of course, much more things to write are needed. just curious to know if it's a normal behaviour or some bug? I'm using Ubuntu karmic and eclipse ganimedes for java EE, with latests google plugin and sdks (just made a fresh install 3 days ago.) thx -- You received this message 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 Enginehttp://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.
[google-appengine] Re: Filter by Collection property issue
So, if I need to filter MyEntity by myStrCollection property would it affect efficiency?? For example if I have 500 values in myStrCollection. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Accessing the datastore remotely with remote_api
Nick, We had touched on this in another thread and the page you posted is what prompted me to start this new thread. The link you mentioned above has this tip: Tip: If you have a Java app, you can use the Python bulkloader.py tool by installing the Java version of the remote_api handler, which is included with the Java runtime environment. The handler servlet class is com.google.apphosting.utils.remoteapi.RemoteApiServlet. I understand i need to add the java remote api to my server app, and use the python sdk tools on my desktop to upload and download data. I'm just confused on how to set up the remote api in my java app. I'm sorry if i'm being obtuse. i'm trying to find guidence on install the java remote_api in my app. On Apr 3, 7:16 am, Nick Johnson (Google) nick.john...@google.com wrote: That post is actually somewhat out of date, as there's now a native Java remote_api client:http://code.google.com/appengine/docs/python/tools/uploadingdata.html... the tip in that section for details). Apologies for being misleading. :) -Nick Johnson On Fri, Apr 2, 2010 at 4:25 PM, Eli Jones eli.jo...@gmail.com wrote: Not sure what's so dismaying. The nice man you mention, Nick Johnson, has a post about exactly what you need to do (use bulkloader against a Java app): http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loadi... http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loadi... On Fri, Apr 2, 2010 at 11:13 AM, Benjamin bsaut...@gmail.com wrote: I suppose i'm looking at this thread with a little dismay http://groups.google.com/group/google-appengine/browse_thread/thread/... is it true that if i want to download all of my data, massage it, and re-upload it i need to make a small python app and upload it as a new version to my production system in order to use the remote api and bulk upload / download features? On Apr 2, 10:03 am, Benjamin bsaut...@gmail.com wrote: It's very important that I solve the task of downloading my data from an existing production data store and bulk load a modified version. My App is built in the Java SDK. So far I understand I needed to download the python SDK in order to use the bulk loader python scripts. They run just fine on the command line. It seems that i need to now publish a new version of my app to production that has the Remote_API available. I need some help understanding what I need to change. Based on Nick's great blog posting :http://code.google.com/appengine/articles/remote_api.htmlI don't see any problem creating a remote client on my pc - i just need to understand how to install the remote api on the server side for java. How do i configure Remote_API on a java app and how do i set up security so my client app can access the data store? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Accessing the datastore remotely with remote_api
Hi Benjamin, you need to define a servlet and servlet mapping for that handler as you would any other. For example: servlet servlet-nameremote-api/servlet-name servlet-classcom.google.apphosting.utils.remoteapi.RemoteApiServlet/servlet-class /servlet servlet-mapping servlet-nameremote-api/servlet-name url-pattern/remote_api/url-pattern /servlet-mapping -Nick Johnson On Thu, Apr 8, 2010 at 5:06 PM, Benjamin bsaut...@gmail.com wrote: Nick, We had touched on this in another thread and the page you posted is what prompted me to start this new thread. The link you mentioned above has this tip: Tip: If you have a Java app, you can use the Python bulkloader.py tool by installing the Java version of the remote_api handler, which is included with the Java runtime environment. The handler servlet class is com.google.apphosting.utils.remoteapi.RemoteApiServlet. I understand i need to add the java remote api to my server app, and use the python sdk tools on my desktop to upload and download data. I'm just confused on how to set up the remote api in my java app. I'm sorry if i'm being obtuse. i'm trying to find guidence on install the java remote_api in my app. On Apr 3, 7:16 am, Nick Johnson (Google) nick.john...@google.com wrote: That post is actually somewhat out of date, as there's now a native Java remote_api client: http://code.google.com/appengine/docs/python/tools/uploadingdata.html... the tip in that section for details). Apologies for being misleading. :) -Nick Johnson On Fri, Apr 2, 2010 at 4:25 PM, Eli Jones eli.jo...@gmail.com wrote: Not sure what's so dismaying. The nice man you mention, Nick Johnson, has a post about exactly what you need to do (use bulkloader against a Java app): http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loadi. .. http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loadi... On Fri, Apr 2, 2010 at 11:13 AM, Benjamin bsaut...@gmail.com wrote: I suppose i'm looking at this thread with a little dismay http://groups.google.com/group/google-appengine/browse_thread/thread/. .. is it true that if i want to download all of my data, massage it, and re-upload it i need to make a small python app and upload it as a new version to my production system in order to use the remote api and bulk upload / download features? On Apr 2, 10:03 am, Benjamin bsaut...@gmail.com wrote: It's very important that I solve the task of downloading my data from an existing production data store and bulk load a modified version. My App is built in the Java SDK. So far I understand I needed to download the python SDK in order to use the bulk loader python scripts. They run just fine on the command line. It seems that i need to now publish a new version of my app to production that has the Remote_API available. I need some help understanding what I need to change. Based on Nick's great blog posting :http://code.google.com/appengine/articles/remote_api.htmlI don't see any problem creating a remote client on my pc - i just need to understand how to install the remote api on the server side for java. How do i configure Remote_API on a java app and how do i set up security so my client app can access the data store? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this
Re: [google-appengine] Plead: help me download my app code
Hi, I will have to let you know of a possibility of a loophole, so that it can be fixed my Google App Engine developers - which has been of concern to me for some time now. This thread here talks about uploading a part of the application.. http://groups.google.com/group/google-appengine/browse_thread/thread/3bf636ee0010d80?pli=1 *djidjadji *writes *:* * * *appcfg.py will only upload the changed files. * *It first collects hash-md5 values for all files that are part of the * *application. * *Sends these hash values to the server, in filename-hash combos. * *The server returns the filenames it does not have, in any of the * *versions of the app. * *Then appcfg.py uploads these files. * ** *thanhnv *says *:* *...So, I have edited a * *little code of appcfg.py to solve this issue* Reading this, I believe it should be possible to hack with appcfg.py (under google/appengine/tools/appcfg.py) and make it upload part of the file - specifically a new version of app.yaml with just the code to enable the downloading of source files - either in the approach Nick Johnson has mentioned in the StackOverFlow article or if you search around, you should be able to find request handler code to do that specifically. After this partial deployment, you should have the version with the old files residing along with the new set of files to download the source files and with the new app.yaml to trigger that download code. Now you can execute the new code to get a back up of your old files. This is just theory, I did not have the time to test it out. I suggest you to deploy a test app with some simulate this first before you attempt this on your existing app. If it works, let this group know. For if it works, it goes against the notion that GAE allows source protection for developers when they upload their code to third-parties. The scenario is : typically 3rd parties can signup for App Engine and grant developer access to the person who wrote the code (or owns it) to upload it to their application instance. Not having the option to download code protects the rights of the developer / code-owner. But if this approach works, then the 3rd party can in theory download that code using this approach, if they want to. So why am I exposing this possibility.. in the hope that it helps you for now and that Google App Engine folks will somehow plug this loophole soon. Plugging this loop-hole can mean that.. smart update feature of uploading changed files will have to go, (or) smart update will be disabled by default for all apps and can be enabled, if required (or) better measures to check that the smart update feature has not been misused - a bit difficult, if not impossible. If the loop-hole exists and is not fixed -- then it is equivalent of having a download code option in the administrative console and developers can think about source code licensing options. GAE folks, feel free to correct me if my assumptions on the possibility are wrong. I will be glad to hear that. Thanks Regards, R.Rajkumar 2010/4/8 Ricardo Sánchez-Sáez agentr...@gmail.com Hello, I reckon this has been asked many times, and the general answer is that we should use a code revision or backup tool. I recently got my laptop stolen, and hadn't been careful enough with my backups. Can somebody at Google help me recover my code? I found a tricky way to do this, but I am afraid I did not have the remote api handlers installed. - http://stackoverflow.com/questions/2479087/can-i-restore-my-source-code-that-has-been-uploaded-into-google-appengine/ How does one install remote api handlers? Is there a way I can install the remote api handler without overwriting my app code? I tried to create a new empty version of my app and added handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py login: admin to app.yaml, as instructed in - http://code.google.com/appengine/articles/remote_api.html but I get 404 error when trying to use remote_api_shell.py Thank you for your help. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- http://crm.ifreetools.com -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Plead: help me download my app code
Hi Rajkumar, On Thu, Apr 8, 2010 at 5:14 PM, Rajkumar Radhakrishnan r.rajku...@gmail.com wrote: Hi, I will have to let you know of a possibility of a loophole, so that it can be fixed my Google App Engine developers - which has been of concern to me for some time now. This thread here talks about uploading a part of the application.. http://groups.google.com/group/google-appengine/browse_thread/thread/3bf636ee0010d80?pli=1 *djidjadji *writes *:* * * *appcfg.py will only upload the changed files. * *It first collects hash-md5 values for all files that are part of the * *application. * *Sends these hash values to the server, in filename-hash combos. * *The server returns the filenames it does not have, in any of the * *versions of the app. * *Then appcfg.py uploads these files. * ** *thanhnv *says *:* *...So, I have edited a * *little code of appcfg.py to solve this issue* Reading this, I believe it should be possible to hack with appcfg.py (under google/appengine/tools/appcfg.py) and make it upload part of the file - specifically a new version of app.yaml with just the code to enable the downloading of source files - either in the approach Nick Johnson has mentioned in the StackOverFlow article or if you search around, you should be able to find request handler code to do that specifically. After this partial deployment, you should have the version with the old files residing along with the new set of files to download the source files and with the new app.yaml to trigger that download code. The deployment process requires appcfg to provide a manifest of the names and SHA1 hashes of all the files being uploaded. Thus, modifying appcfg to do a 'partial update' such as you describe would require you to have the SHA1 hashes and filepaths of all the files in the app - and acquiring those hashes is likely to require having the source code in the first place! -Nick Johnson Now you can execute the new code to get a back up of your old files. This is just theory, I did not have the time to test it out. I suggest you to deploy a test app with some simulate this first before you attempt this on your existing app. If it works, let this group know. For if it works, it goes against the notion that GAE allows source protection for developers when they upload their code to third-parties. The scenario is : typically 3rd parties can signup for App Engine and grant developer access to the person who wrote the code (or owns it) to upload it to their application instance. Not having the option to download code protects the rights of the developer / code-owner. But if this approach works, then the 3rd party can in theory download that code using this approach, if they want to. So why am I exposing this possibility.. in the hope that it helps you for now and that Google App Engine folks will somehow plug this loophole soon. Plugging this loop-hole can mean that.. smart update feature of uploading changed files will have to go, (or) smart update will be disabled by default for all apps and can be enabled, if required (or) better measures to check that the smart update feature has not been misused - a bit difficult, if not impossible. If the loop-hole exists and is not fixed -- then it is equivalent of having a download code option in the administrative console and developers can think about source code licensing options. GAE folks, feel free to correct me if my assumptions on the possibility are wrong. I will be glad to hear that. Thanks Regards, R.Rajkumar 2010/4/8 Ricardo Sánchez-Sáez agentr...@gmail.com Hello, I reckon this has been asked many times, and the general answer is that we should use a code revision or backup tool. I recently got my laptop stolen, and hadn't been careful enough with my backups. Can somebody at Google help me recover my code? I found a tricky way to do this, but I am afraid I did not have the remote api handlers installed. - http://stackoverflow.com/questions/2479087/can-i-restore-my-source-code-that-has-been-uploaded-into-google-appengine/ How does one install remote api handlers? Is there a way I can install the remote api handler without overwriting my app code? I tried to create a new empty version of my app and added handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py login: admin to app.yaml, as instructed in - http://code.google.com/appengine/articles/remote_api.html but I get 404 error when trying to use remote_api_shell.py Thank you for your help. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at
Re: [google-appengine] Plead: help me download my app code
Glad to hear that, Nick Johnson, now I can sleep peacefully. And, sorry Ricardo Sánchez-Sáez, that might not be useful. Regards, R.Rajkumar On Thu, Apr 8, 2010 at 9:49 PM, Nick Johnson (Google) nick.john...@google.com wrote: Hi Rajkumar, On Thu, Apr 8, 2010 at 5:14 PM, Rajkumar Radhakrishnan r.rajku...@gmail.com wrote: Hi, I will have to let you know of a possibility of a loophole, so that it can be fixed my Google App Engine developers - which has been of concern to me for some time now. This thread here talks about uploading a part of the application.. http://groups.google.com/group/google-appengine/browse_thread/thread/3bf636ee0010d80?pli=1 *djidjadji *writes *:* * * *appcfg.py will only upload the changed files. * *It first collects hash-md5 values for all files that are part of the * *application. * *Sends these hash values to the server, in filename-hash combos. * *The server returns the filenames it does not have, in any of the * *versions of the app. * *Then appcfg.py uploads these files. * ** *thanhnv *says *:* *...So, I have edited a * *little code of appcfg.py to solve this issue* Reading this, I believe it should be possible to hack with appcfg.py (under google/appengine/tools/appcfg.py) and make it upload part of the file - specifically a new version of app.yaml with just the code to enable the downloading of source files - either in the approach Nick Johnson has mentioned in the StackOverFlow article or if you search around, you should be able to find request handler code to do that specifically. After this partial deployment, you should have the version with the old files residing along with the new set of files to download the source files and with the new app.yaml to trigger that download code. The deployment process requires appcfg to provide a manifest of the names and SHA1 hashes of all the files being uploaded. Thus, modifying appcfg to do a 'partial update' such as you describe would require you to have the SHA1 hashes and filepaths of all the files in the app - and acquiring those hashes is likely to require having the source code in the first place! -Nick Johnson Now you can execute the new code to get a back up of your old files. This is just theory, I did not have the time to test it out. I suggest you to deploy a test app with some simulate this first before you attempt this on your existing app. If it works, let this group know. For if it works, it goes against the notion that GAE allows source protection for developers when they upload their code to third-parties. The scenario is : typically 3rd parties can signup for App Engine and grant developer access to the person who wrote the code (or owns it) to upload it to their application instance. Not having the option to download code protects the rights of the developer / code-owner. But if this approach works, then the 3rd party can in theory download that code using this approach, if they want to. So why am I exposing this possibility.. in the hope that it helps you for now and that Google App Engine folks will somehow plug this loophole soon. Plugging this loop-hole can mean that.. smart update feature of uploading changed files will have to go, (or) smart update will be disabled by default for all apps and can be enabled, if required (or) better measures to check that the smart update feature has not been misused - a bit difficult, if not impossible. If the loop-hole exists and is not fixed -- then it is equivalent of having a download code option in the administrative console and developers can think about source code licensing options. GAE folks, feel free to correct me if my assumptions on the possibility are wrong. I will be glad to hear that. Thanks Regards, R.Rajkumar 2010/4/8 Ricardo Sánchez-Sáez agentr...@gmail.com Hello, I reckon this has been asked many times, and the general answer is that we should use a code revision or backup tool. I recently got my laptop stolen, and hadn't been careful enough with my backups. Can somebody at Google help me recover my code? I found a tricky way to do this, but I am afraid I did not have the remote api handlers installed. - http://stackoverflow.com/questions/2479087/can-i-restore-my-source-code-that-has-been-uploaded-into-google-appengine/ How does one install remote api handlers? Is there a way I can install the remote api handler without overwriting my app code? I tried to create a new empty version of my app and added handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py login: admin to app.yaml, as instructed in - http://code.google.com/appengine/articles/remote_api.html but I get 404 error when trying to use remote_api_shell.py Thank you for your help. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send
[google-appengine] I want to connect freesql database via google app engine application
How can i acess the data which im having in freesqldatabase(i mean in my sql database provided by another site). will i able to connect? if yes may i know the procedure.? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Accessing the datastore remotely with remote_api
Thanks Nick, i was just coming back to this post to post that that just occurred to me. Doing that worked just fine and i'm downloading everything now. Thanks so much for your help! On Apr 8, 12:12 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi Benjamin, you need to define a servlet and servlet mapping for that handler as you would any other. For example: servlet servlet-nameremote-api/servlet-name servlet-classcom.google.apphosting.utils.remoteapi.RemoteApiServlet/serv let-class /servlet servlet-mapping servlet-nameremote-api/servlet-name url-pattern/remote_api/url-pattern /servlet-mapping -Nick Johnson On Thu, Apr 8, 2010 at 5:06 PM, Benjamin bsaut...@gmail.com wrote: Nick, We had touched on this in another thread and the page you posted is what prompted me to start this new thread. The link you mentioned above has this tip: Tip: If you have a Java app, you can use the Python bulkloader.py tool by installing the Java version of the remote_api handler, which is included with the Java runtime environment. The handler servlet class is com.google.apphosting.utils.remoteapi.RemoteApiServlet. I understand i need to add the java remote api to my server app, and use the python sdk tools on my desktop to upload and download data. I'm just confused on how to set up the remote api in my java app. I'm sorry if i'm being obtuse. i'm trying to find guidence on install the java remote_api in my app. On Apr 3, 7:16 am, Nick Johnson (Google) nick.john...@google.com wrote: That post is actually somewhat out of date, as there's now a native Java remote_api client: http://code.google.com/appengine/docs/python/tools/uploadingdata.html... the tip in that section for details). Apologies for being misleading. :) -Nick Johnson On Fri, Apr 2, 2010 at 4:25 PM, Eli Jones eli.jo...@gmail.com wrote: Not sure what's so dismaying. The nice man you mention, Nick Johnson, has a post about exactly what you need to do (use bulkloader against a Java app): http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loadi. .. http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loadi... On Fri, Apr 2, 2010 at 11:13 AM, Benjamin bsaut...@gmail.com wrote: I suppose i'm looking at this thread with a little dismay http://groups.google.com/group/google-appengine/browse_thread/thread/. .. is it true that if i want to download all of my data, massage it, and re-upload it i need to make a small python app and upload it as a new version to my production system in order to use the remote api and bulk upload / download features? On Apr 2, 10:03 am, Benjamin bsaut...@gmail.com wrote: It's very important that I solve the task of downloading my data from an existing production data store and bulk load a modified version. My App is built in the Java SDK. So far I understand I needed to download the python SDK in order to use the bulk loader python scripts. They run just fine on the command line. It seems that i need to now publish a new version of my app to production that has the Remote_API available. I need some help understanding what I need to change. Based on Nick's great blog posting :http://code.google.com/appengine/articles/remote_api.htmlI don't see any problem creating a remote client on my pc - i just need to understand how to install the remote api on the server side for java. How do i configure Remote_API on a java app and how do i set up security so my client app can access the data store? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047- Hide quoted text - - Show quoted text -
Re: [google-appengine] Not authorized to deploy an app or create a new one
That's very possible. Can you describe exactly what you did? On Wed, Apr 7, 2010 at 8:26 PM, Raleigh Cross _...@raleigh.vg wrote: I have created an application from the Applications Overview page but when I try to deploy the Hello World app to it I get an error that I don't have permission. The app name in app.yaml matches my application name on the Applications Overview page. Also, when I try to create a new app I get an error about not having authorization to do it. Anyone have an idea how I might fix this? Thanks in advance. BTW, I changed the primary email address for my account at some point after I created the one app I have... Could that be part of the problem? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?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 group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Filter by Collection property issue
It shouldn't, but it really depends. Here's a video you should check out about how indexes work: http://www.youtube.com/watch?v=tx5gdoNpcZM On Thu, Apr 8, 2010 at 1:06 AM, Petrov Aleksander ass.pet...@gmail.comwrote: So, if I need to filter MyEntity by myStrCollection property would it affect efficiency?? For example if I have 500 values in myStrCollection. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?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 group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] I want to connect freesql database via google app engine application
If you can expose the database through a REST API (or if you are really brave: XMPP), you will be able to use UrlFetch to retrieve the data programmatically from App Engine. On Thu, Apr 8, 2010 at 6:14 AM, Muthu Kumaran smkumaran...@gmail.comwrote: How can i acess the data which im having in freesqldatabase(i mean in my sql database provided by another site). will i able to connect? if yes may i know the procedure.? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?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 group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Not authorized to deploy an app or create a new one
It's been a few months ago, but best I remember, I registered for App Engine when my Google account still used my old email. I got the SMS verification and created one app, but I never tried to deploy anything to it. Later on, I created a new email account (using Gmail on my own domain, if that matters) and once I'd done that I changed my Google account to use that new email as my primary one. It wasn't until I had the new email address that I actually tried to deploy an application. On Apr 8, 12:56 pm, Ikai L (Google) ika...@google.com wrote: That's very possible. Can you describe exactly what you did? On Wed, Apr 7, 2010 at 8:26 PM, Raleigh Cross _...@raleigh.vg wrote: I have created an application from the Applications Overview page but when I try to deploy the Hello World app to it I get an error that I don't have permission. The app name in app.yaml matches my application name on the Applications Overview page. Also, when I try to create a new app I get an error about not having authorization to do it. Anyone have an idea how I might fix this? Thanks in advance. BTW, I changed the primary email address for my account at some point after I created the one app I have... Could that be part of the problem? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Enginehttp://googleappengine.blogspot.com|http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Am I allowed to do this?
I want to use 2 apps for my website. The first app would run the website, and second app would be a bunch of random functions exposed by an api. The reason I don't want to lump it into one app is because I want to cleanly separate the code of the random functions and the code that runs the website. Also I plan to very rarely update the first app, but update the random functions relatively frequently, and I don't want to have to worry about breaking something in the website when I update the functions. The first app's software is like a wiki website, and the second app provides widgets that can be embedded in the wiki pages. I'm not doing this to try to get more free quota, I'm completely fine with paying. Is this allowed? Since two apps are basically being used for just one website? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Backup datastore and use on localhost
Can someone please let me what is the process to backup the live datastore, and use the resulting file on localhost. I have tried using this option - http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_Data_from_App_Engine - to download data. Data does get downloaded, but when i try to use it on localhost nothing shows up in the local admin console. Does the backup filename needs to have a particular extension? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Filter by Collection property issue
Ikai Lan, thanks a lot.. very usefull video. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Is it possible to use GAE while disabling the appspot.com URL?
Thanks for your replies! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Use Of Deprecated Code
Hello, This post is directed to the appengine developers who work for Google. In the past I have, on my local appengine server, fixed source code to eliminate use of deprecated code. But going forward I see it is much better if the fix is made at the source of the distribution. I am running Ubuntu 9.10 on my desktop system where I run the local appengine server and I get the message below when I start the server. /home/joe/google_appengine_1.3.2/google/appengine/tools/appcfg.py:41: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha /home/joe/google_appengine_1.3.2/google/appengine/tools/ dev_appserver_login.py:33: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 Joe -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] How to download a JSON object from my app engine server?
Hi, I would like to have my application return a JSON object for download. I'm trying to simulate the behavior that happens when I access the page: http://search.twitter.com/trends/current.json?exclude=hashtags; in which the Chrome browser automatically downloads a file current.json . I've tried to print the JSON string into the output or through a JSP but it doesn't work (I need to return this JSON file into an XMLHttpRequest object). I've copied the current.json file I downloaded from the twitter link above into my WAR folder, but when I access it through Chrome it just opens its contents in the browser, and I would like to be able to download it, as in the twitter link. Can anyone direct me how to force this download to happen? Thank you Sherry. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Recieving emails with invalid email addresses
Hello! I have written a temporary email app using Google App Engine, in python. My app works fine, but I have one complaint. While testing my deployed app I sent an email to one of the addresses, from my gmail. It was processed fine, but it appears the sender address string is in the following format: sharpblade sharpbla...@gmail.com. I am not worried about this because my production app will handle automatically sent emails I imagine, which proberbly won't have this issue. I also have a feeling it is a gmail specific problem. Is there any workaround to get the real senders address? ~Tom -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Counting query results 1000
I'm trying to figure out a way to count entities matching a certain criteria. I was thinking of doing a key-only query and using PreparedQuery.countEntities() (Java). However, when I do that, it always returns a value no higher than 1000. Is there a way to get an accurate count of all entities matching a query without having to do something like int count = datastore.prepare( query.setKeysOnly() ).asList(FetchOptions.Builder.limit(Integer.MAX_VALUE)).size() ? Thanks, Patrick. -- Patrick H. Twohig. Namazu Studios P.O. Box 34161 San Diego, CA 92163-4161 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] How to download a JSON object from my app engine server?
http://www.google.com/search?q=content+disposition On 8 April 2010 18:13, Sherry mywacco...@gmail.com wrote: Hi, I would like to have my application return a JSON object for download. I'm trying to simulate the behavior that happens when I access the page: http://search.twitter.com/trends/current.json?exclude=hashtags; in which the Chrome browser automatically downloads a file current.json . I've tried to print the JSON string into the output or through a JSP but it doesn't work (I need to return this JSON file into an XMLHttpRequest object). I've copied the current.json file I downloaded from the twitter link above into my WAR folder, but when I access it through Chrome it just opens its contents in the browser, and I would like to be able to download it, as in the twitter link. Can anyone direct me how to force this download to happen? Thank you Sherry. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Error while downloading data
I am getting the following error while downloading data from live app using the bulkloader.py --dump util: * [INFO] Downloading kinds: [u'Load', u'Product', u'Contact', u'Location', u'Summary'] [INFO] Load: No descending index on __key__, performing serial download [INFO] Contact: No descending index on __key__, performing serial download [INFO] Product: No descending index on __key__, performing serial download ...[ERROR ] [Thread-3] WorkerThread: Traceback (most recent call last): File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/adaptive_thread_pool.py, line 110, in run self.WorkOnItems() File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/adaptive_thread_pool.py, line 131, in WorkOnItems self.__thread_gate.StartWork() File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/adaptive_thread_pool.py, line 389, in StartWork (self.threading.currentThread().getName(), AttributeError: 'ThreadGate' object has no attribute 'threading' [INFO] An error occurred. Shutting down... [ERROR ] Error in Thread-3: 'ThreadGate' object has no attribute 'threading' [INFO] Have 1809 entities, 0 previously transferred [INFO] 1809 entities (1189715 bytes) transferred in 93.2 seconds * Anyone has an idea as to what might be the issue here? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Just started getting OverQuotaError . I'm not over quota
This started about 20 minutes ago at 6:23pm. A lot of my requests are failing with google.appengine.runtime.apiproxy_errors.OverQuotaError However, the dashboard and the Quota Details page show that everything is normal. app id is networkedblogs. I'd appreciate your quick response. Waleed -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Use Of Deprecated Code
App Engine runs on python 2.5, where md5 is not deprecated. It's unlikely google will fix this, since the error is caused by you using an unsupported python version. On Apr 8, 4:13 pm, JoeM joe.mansig...@gmail.com wrote: Hello, This post is directed to the appengine developers who work for Google. In the past I have, on my local appengine server, fixed source code to eliminate use of deprecated code. But going forward I see it is much better if the fix is made at the source of the distribution. I am running Ubuntu 9.10 on my desktop system where I run the local appengine server and I get the message below when I start the server. /home/joe/google_appengine_1.3.2/google/appengine/tools/appcfg.py:41: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha /home/joe/google_appengine_1.3.2/google/appengine/tools/ dev_appserver_login.py:33: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 Joe -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Beginner question
thanks Ikai, I failed to see it on the html page, so my problem is solved thanks again Vik On Apr 8, 10:42 am, Ikai L (Google) ika...@google.com wrote: Looks like you're working with GWT and not App Engine. You'll want to ask on the Google Web Toolkit groups: https://groups.google.com/group/Google-Web-Toolkit?pli=1 On Wed, Apr 7, 2010 at 1:57 AM, Vik_Sintus miskintapisomb...@yahoo.comwrote: sorry if I post this in the wrong place just starting to learn GWT using 'Glassfish Bundle For Eclipse' using step by step tutorials from GWT homepage and so far I manage to deploy the first simple sample app athttp://bahasa-java.appspot.com/ during the last couple of days I manage to associate what seen on the web page in relation to it source code but so far I can't find the word Web Application Starter Project in any source code of my first app athttp://bahasa-java.appspot.com/ Thank you for your help Regards Vik -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Enginehttp://googleappengine.blogspot.com|http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Accessing Amazon SimpleDB from Google App Engine
Is there any elegant way to access data stored in Amazon's Simple DB from a Google Appspot application? I tried using URLfetch, but failed. Any ideas? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.