[appengine-java] Re: Relation Index Entities: Best practice for getting the keys of the parent
I'm a newbie so I don't know if this would be a good way to do it, but what about using the extension that sets the parent's key in a field in the child: @Persistent(defaultFetchGroup = true) @Extension(vendorName = datanucleus, key = gae.parent-pk, value = true) private Key parentId; Then your first query is select parentId from ... a.maza wrote: hi, my question refers to the relation index entities pattern presented by Brett Slatkin at the Google I/O (cf. http://code.google.com/events/io/2009/sessions/BuildingScalableComplexApps.html, slide 23-28). I implemented this pattern and the two queries to the datastore work really fast. However, I experienced that looping through the index entities in order to retrieve the keys of the parents takes about 5 times longer then a single query to the datastore. The code is quite straightforward as you see below: Query q = getPersistenceManager().newQuery(select key from + MessageIndex.class.getName() + where receiverId == :receiverId); ListKey messageIndexKeys = (ListKey) q.execute(receiverId); ListKey messageKeys = new ArrayListKey(messageIndexKeys.size()); for(Key k : messageIndexKeys) { messageKeys.add(k.getParent()); } Query q1 = getPersistenceManager().newQuery(select from + Message.class.getName() + where key == :messageKeys); ListMessage messages = (ListMessage)q1.execute(messageKeys); Is there any possibility to speed up or even avoid the looping to get the parent keys? I would envision something like (don't know if it is feasible): Query q1 = getPersistenceManager().newQuery(select from + Message.class.getName() + where key.child == :messageIndexKeys); ListMessage messages = (ListMessage)q1.execute(messageIndexKeys); thanks and regards, andr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Querying for entities by filtering by key
I'm having a problem writing a query to get a list of objects by filtering for a another entities key. Object A has many object Bs. Object A @PersistenceCapable(identityType=IdentityType.APPLICATION, detachable = true) public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent(mappedBy = A) private ListKey Bs; Object B @PersistenceCapable(identityType=IdentityType.APPLICATION, detachable = true) public class B { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Key A; I know the id key for object A and I want to query object B and return all Bs that have object A. I have tried... 1) ListKey B = A.getBs(); but this has returned me null 2) String query = select from + B.class.getName() + WHERE A == + A.getKey().getId() + order by creationDate asc; but this returns no results I know i have valid data in the datastore since i am viewing A's data and i know that A's key is 5, yet no matter how i query for it.. i get no results. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Enhancing issue with single int primary key
I've been trying to work out what I'm doing wrong with the following code. It was working last night, and as far as i can remember I haven't changed it. I have search for hours for a solution but i only seem to find the error in relation to compound keys online. Here's the code: package my.syncdroidserver; import java.util.ArrayList; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Box { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private final int boxID; @Persistent private final AppUser owner; @Persistent private final String boxName; @Persistent private ArrayListAppUser readers; public int getBoxID() { return boxID; } public AppUser getOwner() { return owner; } public ArrayListAppUser getReaders() { return readers; } public Box(AppUser owner, String boxName) { this.boxID = BoxUtils.getNextBoxId(); this.owner = owner; this.boxName = boxName; readers = new ArrayListAppUser(); readers.add(owner); } public void addReader(AppUser user) { readers.add(user); } public String getBoxName() { return boxName; } // getBoxName; } The error is: DataNucleus Enhancer (version 1.1.4) : Enhancement of classes Nov 5, 2009 9:48:21 AM org.datanucleus.metadata.MetaDataManager initialiseFileMetaDataForUse Errors were encountered when initialising the specified MetaData. See the nested exceptions for details SEVERE: Class my.syncdroidserver.Box has been specified with an object- id class javax.jdo.identity.IntIdentity yet no fields have been identified as primary key fields. Please notate using the primary- key tag against the fields that should be considered part of the primary key. org.datanucleus.metadata.InvalidMetaDataException: Class my.syncdroidserver.Box has been specified with an object-id class javax.jdo.identity.IntIdentity yet no fields have been identified as primary key fields. Please notate using the primary-key tag against the fields that should be considered part of the primary key. at org.datanucleus.metadata.AbstractClassMetaData.initialiseMemberPositionInformation (AbstractClassMetaData.java:1216) at org.datanucleus.metadata.ClassMetaData.initialise (ClassMetaData.java:664) at org.datanucleus.metadata.MetaDataManager$2.run (MetaDataManager.java:2351) at java.security.AccessController.doPrivileged(Native Method) at org.datanucleus.metadata.MetaDataManager.initialiseAbstractClassMetaData (MetaDataManager.java:2345) at org.datanucleus.metadata.MetaDataManager.initialiseClassMetaData (MetaDataManager.java:2228) at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaData (MetaDataManager.java:2176) at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse (MetaDataManager.java:881) at org.datanucleus.metadata.MetaDataManager.loadClasses (MetaDataManager.java:433) at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput (DataNucleusEnhancer.java:743) at org.datanucleus.enhancer.DataNucleusEnhancer.enhance (DataNucleusEnhancer.java:545) at org.datanucleus.enhancer.DataNucleusEnhancer.main (DataNucleusEnhancer.java:1252) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java: 57) at com.google.appengine.tools.enhancer.Enhance.init(Enhance.java: 60) at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41) Nov 5, 2009 9:48:21 AM org.datanucleus.enhancer.DataNucleusEnhancer main SEVERE: DataNucleus Enhancer completed with an error. Please review the enhancer log for full details. Some classes may have been enhanced but some caused errors Errors were encountered when initialising the specified MetaData. See the nested exceptions for details org.datanucleus.exceptions.NucleusUserException: Errors were encountered when initialising the specified MetaData. See the nested exceptions for details at org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse (MetaDataManager.java:892) at org.datanucleus.metadata.MetaDataManager.loadClasses (MetaDataManager.java:433) at
[appengine-java] Re: Master/Detail relations and redundant data handling
Good points. In my case, so far, the copied objects are small and not complicated, which is why my method appealed to me. I feel like there's some fundamental concept that I'm not getting and it has to do with how objects are mapped onto the Big Table data store. Watching the videos from Google I/O, those guys just wave their hands and make it sound like it's all so easy, if you know what you're doing. bryce cottam wrote: I don't think that duplicating the whole Department object as a child of a Person is all that good of an idea. First off, if the Department object gets complicated and has it's own child objects all that data will be living on the Person, which isn't really needed. The whole reason for the FK style classes is to pull over only those fields you would want to query on when selecting a Person object like: select from Person where department.name == ABC (which is something you cannot do otherwise) So, I've found that either having a list of Key (or encoded string ids) on a Person instance is usefull (when you are not wanting to query on fields of the Department when selecting a Person, Or having a list of lightweight copies of a Department (as opposed to the whole Department object) It seems very natural to me to determine equality of two persisted objects by comparing their Key instance, rather than simply their name. For one reason; it's somewhat difficult to ensure uniqueness for arbitrary fields on an object in the GAE unless that fields is being used to create the key (like an email address or something), if you are using auto-generated Keys, this isn't really an option. So, assuming you have the lightweight FK style object as a child of the Person class, then when the source of truth changes (i.e. the real Department instance), you'd need to find all lightweight FK style copies of that instance and update them accordingly. This is part of the whole root of this discussion: how do you do this in a way that minimized code duplication and boilerplate code blocks (like constructors that manually copy fields from getters to setters etc.) The solution I've been working with is the ligthweight FK style copy of the real instance of an object, and some simple reflection to map fields from the real object to the lightweight FK copy. As far as detachable=true|false my main concern with that right now is how the GWT RPC serializer handles detachable entities (i.e. it doesn't handle them well). There are certainly advantages to detaching an object, however, if the updates to the object are happening on the server, then there is no need to detach the object. On Thu, Nov 5, 2009 at 1:09 AM, Rusty Wright rwright.li...@gmail.com wrote: I think this is an important point. The light bulb went off over my head after watching this video. This is what he calls a property list. For me it was also a good example of how to think about denormalizing, which comes up repeatedly. So instead of the usual OO way of thinking of a department etc. aggregating people, turn it on its head and look at it as a person has a property, which is their department, and in this example, they can be in multiple departments so it's a list of departments, a property list. As you point out, the queries for this are slick. And it sounds like you don't even need the list of people in the department; it's redundant. I'm still puzzled about what to do when a property value changes; for example, suppose the department named the Ministry of Propaganda changes its name to the Ministry of Disinformation. Does the property list on Person contain a list of Department objects, or a list of Department Key objects? I'm thinking the former, Department objects. If we have the Department class configured with detachable=false, each time you fetch a Department object (matching on its name let's say), you get a new unparented Department object, which you add to the Person's department list, whereupon it becomes parented by Person. The fetched Department object is essentially a clone. (That's assuming I understand how it works when you have detachable=false; it's sort of like the singleton pattern.) As part of fetching the cloned Department object, the Department class has a masterKey field, type Key, which you set to the Key of the Department in the table, the one it was cloned from. So whe n the Department's name changes, the query to get all its cloned Departments could be simple and quick. But now I'm fuzzy on how you change the master Department's name; since it's detachable=false we can't fetch it and update it and save it back, so I guess we have to replace it in the master table and then replace all of its clones in all Person lists? bryce cottam wrote: ah, gottcha, well there is actually a really good google i/o talk on using list/collections and how to optimize them. I generally am using owned lists for
[appengine-java] the question in ubuntu9.10 and eclipse 3.5
when I run the app in ubuntu9.10 and eclipse 3.5,the console view the info : ** Unable to load Mozilla for hosted mode ** java.lang.UnsatisfiedLinkError: /home/jamesyoung/eclipse/plugins/ com.google.gwt.eclipse.sdkbundle.linux_1.7.1.v200909221731/gwt- linux-1.7.1/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open shared object file: No such file or directory But ubuntu 9.10 has install libstdc++6, oh, god ,what I should do next ? Thank you ,everyone! I don't like windows, and if nobody could help me, I have to put up with windows. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
I'm now thinking that instead of using detachable=false, set it to true so that it can be easily updated. To create new unparented objects, use a constructor that takes a template object you got from the data store; Department fetchedDepartment = departmentDao.findById(id); Department addedDepartment = new Department(fetchedDepartment); person.addDepartment(addedDepartment); personDao.makePersistent(person); The constructor copies stuff that stays the same and sets up whatever else needs setting up. James H wrote: I'll listen to the video today. Right, I agree with your natural key philosophy Rusty. So, a regular auto-generated type of Key would always fit the bill. The only use of Encoded Key would be when you need to construct the key before the actual Insert occurs. I guess that's the exception and I only ever see that as a requirement for tasks like batch loads, not transactions from a UI. On Nov 5, 2:19 am, Rusty Wright rwright.li...@gmail.com wrote: I'm of the school of thought that says natural keys are never a good idea. Whatever natural key you're thinking of using, just make it a property on the class. One of the things they keep saying is that storage is free/cheap, so don't worry about that. Using your example, if you were to use the email address as part of the key, how would you be able to search on the email address since it would be embedded and encoded in the key? James H wrote: Bryce, double-check me on my Nov 4, 1:45pm post. Bryce/Rusty, I'm getting the sense that if I don't need a natural key like email address then I should just use plain Key as the type and let GAE generate the full value including parent key for entity group objects. Otherwise, if I choose to use a natural key like an email address then I would use the encoded Key. Regardless of approach, the type Key can be converted to/from String using keyToString() and stringToKey() for stuffing into html form hidden fields, etc. Rusty, I skimmed the blog but it was too deep for me at this hour...I'll try again tomorrow! On Nov 4, 11:39 pm, bryce cottam bcot...@gmail.com wrote: Yeah, I've been re-considering my detachable=true configuration and thinking that i may want to go for detachable=false for gwt reasons. Using detachable=true creates a field that is of type Object[] (which makes the gwt RPC raise fits). Currently, I find that having the actual Key object is handy (for getting the type, any parent key references etc.) but that is mainly stuff I do on the server side, so the client could probably live just fine and dandy with an encoded String. On Wed, Nov 4, 2009 at 9:10 PM, Rusty Wright rwright.li...@gmail.com wrote: Did you see this? This article has been referenced a couple of times today: http://timepedia.blogspot.com/2009/04/google-appengine-and-gwt-now-ma... The part about using detachable = false is interesting. James H wrote: Datanucleus, both suggestions worked but I like the embeddedOnly best in order to avoid a dummy key on every FK class! Bryce, I no longer get the error above...I just added embeddedOnly=true to the PersistanceCapable tag in BookFk class. You're right, I could use the collection technique on the FKs but I wonder the pros/cons of such collections on what could be very large collections. For example, say Baylor with 25,000 members? Guess its a matter of using owned for small Sets versus unowned for large Sets of data. Regardless, your FK pattern will save a whole lot of code management!!! Any further feedback welcome...I'll continue testing! On Nov 4, 12:12 pm, datanucleus andy_jeffer...@yahoo.com wrote: Needs a PK either way. Pick a field, any field. Or just set embeddedOnly as true ... if you really never want to persist one of those in its own right- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Enhancing issue with single int primary key
All docs state that final/static fields aren't persisted/persistent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
here's a really good talk about how objects are mapped into the BigTable datastore and how relationships are actually represented in the system: http://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore this sort of highlites how relationships actually work in BigTable (which is quite different than they work in an RDB). here is another one from Max Ross where he advocates denormalization for query optimization: http://code.google.com/events/io/2009/sessions/SofterSideofSchemas.html he kind of goes into how the BigTable datastore is simply schema-less. Very interesting stuff. hope that helps. -bryce On Thu, Nov 5, 2009 at 12:34 PM, Rusty Wright rwright.li...@gmail.com wrote: Good points. In my case, so far, the copied objects are small and not complicated, which is why my method appealed to me. I feel like there's some fundamental concept that I'm not getting and it has to do with how objects are mapped onto the Big Table data store. Watching the videos from Google I/O, those guys just wave their hands and make it sound like it's all so easy, if you know what you're doing. bryce cottam wrote: I don't think that duplicating the whole Department object as a child of a Person is all that good of an idea. First off, if the Department object gets complicated and has it's own child objects all that data will be living on the Person, which isn't really needed. The whole reason for the FK style classes is to pull over only those fields you would want to query on when selecting a Person object like: select from Person where department.name == ABC (which is something you cannot do otherwise) So, I've found that either having a list of Key (or encoded string ids) on a Person instance is usefull (when you are not wanting to query on fields of the Department when selecting a Person, Or having a list of lightweight copies of a Department (as opposed to the whole Department object) It seems very natural to me to determine equality of two persisted objects by comparing their Key instance, rather than simply their name. For one reason; it's somewhat difficult to ensure uniqueness for arbitrary fields on an object in the GAE unless that fields is being used to create the key (like an email address or something), if you are using auto-generated Keys, this isn't really an option. So, assuming you have the lightweight FK style object as a child of the Person class, then when the source of truth changes (i.e. the real Department instance), you'd need to find all lightweight FK style copies of that instance and update them accordingly. This is part of the whole root of this discussion: how do you do this in a way that minimized code duplication and boilerplate code blocks (like constructors that manually copy fields from getters to setters etc.) The solution I've been working with is the ligthweight FK style copy of the real instance of an object, and some simple reflection to map fields from the real object to the lightweight FK copy. As far as detachable=true|false my main concern with that right now is how the GWT RPC serializer handles detachable entities (i.e. it doesn't handle them well). There are certainly advantages to detaching an object, however, if the updates to the object are happening on the server, then there is no need to detach the object. On Thu, Nov 5, 2009 at 1:09 AM, Rusty Wright rwright.li...@gmail.com wrote: I think this is an important point. The light bulb went off over my head after watching this video. This is what he calls a property list. For me it was also a good example of how to think about denormalizing, which comes up repeatedly. So instead of the usual OO way of thinking of a department etc. aggregating people, turn it on its head and look at it as a person has a property, which is their department, and in this example, they can be in multiple departments so it's a list of departments, a property list. As you point out, the queries for this are slick. And it sounds like you don't even need the list of people in the department; it's redundant. I'm still puzzled about what to do when a property value changes; for example, suppose the department named the Ministry of Propaganda changes its name to the Ministry of Disinformation. Does the property list on Person contain a list of Department objects, or a list of Department Key objects? I'm thinking the former, Department objects. If we have the Department class configured with detachable=false, each time you fetch a Department object (matching on its name let's say), you get a new unparented Department object, which you add to the Person's department list, whereupon it becomes parented by Person. The fetched Department object is essentially a clone. (That's assuming I understand how it works when you have detachable=false; it's sort of like the singleton pattern.) As part of fetching the cloned
[appengine-java] Re: Inequality operator is !=, but can we add
Thanks for the reply Max. I pretty much came to the same conclusion. Any ETA on when the support will be released for general use? dave On Nov 4, 5:05 am, Max Ross (Google) maxr+appeng...@google.com wrote: not-equal filters are not supported in the current SDK unless you're doing not equal null, in which case we just turn it into null because the datastore considers null to be smaller than any non-null value. You can read about the supported filter types here:http://code.google.com/appengine/docs/java/datastore/queriesandindexe... In the forthcoming SDK not-equal filters will be supported (along with IN filters). Max On Sat, Oct 31, 2009 at 8:34 AM, Dave Cheong d...@davecheong.com wrote: And public void myMethod2() { Query query = entityManager.createQuery(select o from Myclass o where o.title = :p1 and o.myProperty :p2); // bind params query.getResultList(); // exception thrown unexpectedly also } On Nov 1, 3:32 am, Dave Cheong d...@davecheong.com wrote: The relevant code snippets are: In MyServiceImpl - @Repository @Transactional public MyServiceImpl ... { protected EntityManager entityManager; public void myMethod() { Query query = entityManager.createQuery(select o from Myclass o where o.title = :p1 and o.myProperty != :p2); // bind params query.getResultList(); // exception thrown unexpectedly } @PersistenceContext public void setEntityManager(EntityManager entityManager) { this.entityManager = entityManager; } } In applicationContext.xml - !-- JPA EntityManagerFactory -- bean id=entityManagerFactory class=org.springframework.orm.jpa.LocalEntityManagerFactoryBean p:persistenceUnitName=main/ !-- Transaction manager for a single JPA EntityManagerFactory (alternative to JTA) -- bean id=transactionManager class=org.springframework.orm.jpa.JpaTransactionManager p:entityManagerFactory-ref=entityManagerFactory/ In persistence.xml - persistence-unit name=main providerorg.datanucleus.store.appengine.jpa.DatastorePersistenceProvider / provider properties property name=datanucleus.NontransactionalRead value=true/ property name=datanucleus.NontransactionalWrite value=true/ property name=datanucleus.ConnectionURL value=appengine/ /properties /persistence-unit Any help you provide is appreciated. thanks, dave On Nov 1, 3:23 am, Dave Cheong d...@davecheong.com wrote: What I'm saying is I'm using EMF and writing JPQL and is not working, which it should since it is the valid operator for inequality. Are you saying it works for you? dave On Nov 1, 12:27 am, datanucleus andy_jeffer...@yahoo.com wrote: 1). I can't seem to get != working either. I have no such problems with JDOQL, but then you're using it in GAE/J with an old version of DataNucleus. 2) If I have mapped my objects using JPA annotations, will the query engine default to JDOQL vs JPQL? The type of metadata specification ... JDO XML, JDO Annotations, JPA XML, JPA Annotations ... has nothing to do with the persistence API being used (in DataNucleus). If you create a PMF then you use JDO API, if you create an EMF then you use JPA API. JPA API only allows JPQL queries (you can't use JDOQL). JDO API allows JDOQL or JPQL queries, using the API to define what you're using; see the JDO javadocs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Inequality operator is !=, but can we add
The next SDK (1.2.8) is working its way through QA right now so hopefully it will be available in the next week or two. On Thu, Nov 5, 2009 at 12:58 PM, Dave Cheong d...@davecheong.com wrote: Thanks for the reply Max. I pretty much came to the same conclusion. Any ETA on when the support will be released for general use? dave On Nov 4, 5:05 am, Max Ross (Google) maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: not-equal filters are not supported in the current SDK unless you're doing not equal null, in which case we just turn it into null because the datastore considers null to be smaller than any non-null value. You can read about the supported filter types here: http://code.google.com/appengine/docs/java/datastore/queriesandindexe... In the forthcoming SDK not-equal filters will be supported (along with IN filters). Max On Sat, Oct 31, 2009 at 8:34 AM, Dave Cheong d...@davecheong.com wrote: And public void myMethod2() { Query query = entityManager.createQuery(select o from Myclass o where o.title = :p1 and o.myProperty :p2); // bind params query.getResultList(); // exception thrown unexpectedly also } On Nov 1, 3:32 am, Dave Cheong d...@davecheong.com wrote: The relevant code snippets are: In MyServiceImpl - @Repository @Transactional public MyServiceImpl ... { protected EntityManager entityManager; public void myMethod() { Query query = entityManager.createQuery(select o from Myclass o where o.title = :p1 and o.myProperty != :p2); // bind params query.getResultList(); // exception thrown unexpectedly } @PersistenceContext public void setEntityManager(EntityManager entityManager) { this.entityManager = entityManager; } } In applicationContext.xml - !-- JPA EntityManagerFactory -- bean id=entityManagerFactory class=org.springframework.orm.jpa.LocalEntityManagerFactoryBean p:persistenceUnitName=main/ !-- Transaction manager for a single JPA EntityManagerFactory (alternative to JTA) -- bean id=transactionManager class=org.springframework.orm.jpa.JpaTransactionManager p:entityManagerFactory-ref=entityManagerFactory/ In persistence.xml - persistence-unit name=main providerorg.datanucleus.store.appengine.jpa.DatastorePersistenceProvider / provider properties property name=datanucleus.NontransactionalRead value=true/ property name=datanucleus.NontransactionalWrite value=true/ property name=datanucleus.ConnectionURL value=appengine/ /properties /persistence-unit Any help you provide is appreciated. thanks, dave On Nov 1, 3:23 am, Dave Cheong d...@davecheong.com wrote: What I'm saying is I'm using EMF and writing JPQL and is not working, which it should since it is the valid operator for inequality. Are you saying it works for you? dave On Nov 1, 12:27 am, datanucleus andy_jeffer...@yahoo.com wrote: 1). I can't seem to get != working either. I have no such problems with JDOQL, but then you're using it in GAE/J with an old version of DataNucleus. 2) If I have mapped my objects using JPA annotations, will the query engine default to JDOQL vs JPQL? The type of metadata specification ... JDO XML, JDO Annotations, JPA XML, JPA Annotations ... has nothing to do with the persistence API being used (in DataNucleus). If you create a PMF then you use JDO API, if you create an EMF then you use JPA API. JPA API only allows JPQL queries (you can't use JDOQL). JDO API allows JDOQL or JPQL queries, using the API to define what you're using; see the JDO javadocs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Querying for entities by filtering by key
The mappedBy on your ListKey Bs is throwing me off. It looks like you're declaring a relationship that is managed by JDO but the type of your List is Key, not B. I think the real problem you're running into is that you're trying to match on the id field of the Key when you should really be matching on the entire Key. The id does not uniquely identify a Key, you need the whole thing: String query = select from + B.class.getName() + WHERE A == :p order by creationDate asc; Then when you execute the query pass in the Key object: query.execute(A.getKey()); Hope this helps, Max On Thu, Nov 5, 2009 at 11:06 AM, IlyaE ilyaelk...@gmail.com wrote: I'm having a problem writing a query to get a list of objects by filtering for a another entities key. Object A has many object Bs. Object A @PersistenceCapable(identityType=IdentityType.APPLICATION, detachable = true) public class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent(mappedBy = A) private ListKey Bs; Object B @PersistenceCapable(identityType=IdentityType.APPLICATION, detachable = true) public class B { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Key A; I know the id key for object A and I want to query object B and return all Bs that have object A. I have tried... 1) ListKey B = A.getBs(); but this has returned me null 2) String query = select from + B.class.getName() + WHERE A == + A.getKey().getId() + order by creationDate asc; but this returns no results I know i have valid data in the datastore since i am viewing A's data and i know that A's key is 5, yet no matter how i query for it.. i get no results. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Querying Owned Child Objects by Key.getId()
You should still be able to do the following: mysite.com/rest?key=someencodedkey The advantage of doing this is that you don't have to expose the internal structure of your entity groups, and that you will be able to fetch your object like so: Team team = pm.getObjectById(Team.class, someencodedkey); You can change a Key into a String by doing the following: String keyString = KeyFactory.keyToString(Team.getKey()); getObjectById will figure out how to construct a key based on the Team's entity parent and do the query for you. This is documented here: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html Ikai On Nov 5, 6:50 am, nwall...@cox.net nwall...@cox.net wrote: Is there any way to look up a owned child object using the numeric 'id' being stored on the Key object? I have a owned child object called Team that I would like to be able to look up with a numeric ID besides the Key object. The reason for this is I am implementing a service that would take a URL like the following: mysite.com/rest?id=1234 I would use the id to look up a unique Team. The problem is since the Team object is a child of a User object I am forced to use the Key object as a Primary Key. I don't want to put some long string like User(567)/Team(1234) in my URL in order to look up the object, instead I would like to store just the teams numeric ID and then look up the object with that. I see in the datastore that every Team has a unique numeric ID so I would assume there is some way to look up the object using that. I also see that each Key object has access to that ID (Key.getId()). I tried a few different queries and had no luck. First of all is this possible? If it is can someone show me an example of what that query would look like? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: error 500 from server when starting the guestbook demo app
Yes it was the command search path that needed manual updating. Found help here: http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html Keep up the good work !! /Tomas On Nov 5, 3:23 pm, Tomas tomasep...@gmail.com wrote: Hi Jason ! The java files are there all right, it seems, and I very recently downloaded from SUN. The javac.exe file is located here on my system: C:\Program\Java \jdk1.6.0_16\bin However, opening the properties tab for the javac.exe file, and reading at 'location' it says: C:\Program Files\Java\jdk1.6.0_16\bin Difference is 'Program' versus' Program files' I guess it is all about search paths. I just don't know how to update/ change it. My OS version is Vista SP2 I ran the dev_appserver.cmd command from the command prompt (awaiting getting involved with Eclipse and any hang-ups from there) , and the server started up, but javac apparently didn't I also ran java commands from the command prompt: C:\Users\Tomasjava -version java version 1.6.0_16 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) C:\Users\Tomasjavac - version javac är inte ett internt kommando, externt kommando, program eller kommandofil. The swedish mumbo-jumbo translates into ~ Javac is not an internal command, external command, program, or command file Am I on the right track? If so, where do I learn how to fix search paths /Jumping up and down for an answer...Tomas = C:\Program Files\Java\jdk1.6.0_16\bin\javac.exe On Nov 4, 8:42 pm, Jason (Google) apija...@google.com wrote: It looks like your system may not have Java configured correctly or otherwise can't invoke the javac compiler needed to compile your application. java.io.IOException: Cannot run program javac.exe: CreateProcess error=2 You may want to search the web for similar error messages, which might help you determine the source of the issue. Are you using the Eclipse plugin or the command line to start your app? - Jason On Mon, Nov 2, 2009 at 11:18 AM, Tomas tomasep...@gmail.com wrote: Hi I'm Tomas - a newbe. I get error 500 from server when trying a demo application to according to instructions: http://code.google.com/appengine/docs/java/gettingstarted/installing Response from localserver:8080 look here: http://docs.google.com/Doc?docid=0Afhb3u6SCF24ZGN2cjN2cTNfM2ZwODkyN2Y... what' wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Key of parameter value does not have a parent
Um, please disregard this previous post. I figured out my mistake. I was treating the relationship as I would a foreign-key relationship in an RDBMS solution. Including the refernce to the Event object (as a owned on-to-many relatioship) fixed my problem. This does beg a question, however: How does GAE handle scaling of the objects stored in the Parent objects list. If, for instance, one user creates 10,000 records, building a Profile object on log in would imply that it was stuffed with all these objects as well. This seems potentiall very resource intensive. How can this kind of relationship/query structure be optimized? Thanks, Corey On Nov 5, 12:54 pm, Corey corey.kre...@gmail.com wrote: Hello, I have just started working with the GAE's Java implementation and have quicly run into problems attempting to run rather simple queries, I am hoping I can find some clarification as to what I may be doing wrong here. Here is the scenario: I have two persistent JDOs: Profile, which stores a users profile information and Event which is a posting that a user has created. This represents a one-to-many relationship (users can create many events). I have created this as and un-owned one-to-many releationship. This is actually a one-to-zero-or-more relationship as users are able to create a profile with out having to create a cooresponding event. This has been done so that I can query for events seperately from retrieving profile information. It seems overkill to return all events everytime I request a user profile. Here is the Profile object: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Profile{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Email email; @Persistent private ShortBlob password; @Persistent private Date created; @Persistent(mappedBy = profile) private ListLocation locations; @Persistent private Blob logo; @Persistent private PhoneNumber phone; @Persistent private String phoneid; @Persistent private String twitterid; //Followed by appropriate getters and setters. Here is the Event Object: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Event { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Profile author; @Persistent private String title; @Persistent private Text description; @Persistent private Location location; @Persistent private Date created; @Persistent private Date start; @Persistent private Date end; @Persistent private Text promomsg; //followed by appropriate getters and setters. I am attempting to perform the following steps: 1. User registers with email and a profile object is persisted. This appears to be workign with all other fields persisted as null. I have left the key field null as well and allowed the system to generate an id (which appears to be workign correctly). 2. The profile object is stored in a session and a profile.jsp page is displayed. 3. The profile.jsp calls a class which performs various queries on behalf of the jsp. In this case a query to return the total count of events created by the user. In this use case the correct number should be 0 as the user has not created any events. The method which is called is: public Integer EventCount(Profile p) { Query query = pm.newQuery(Event.class); query.setFilter(author == authorParam); query.declareParameters(Profile authorParam); query.setResult(count(this)); int count = 0; try { count = (Integer) query.execute(p); return count; } finally { pm.close(); } } during the execution of query.execute(p) the following exception is thrown: ov 5, 2009 8:37:40 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: Nested in org.apache.jasper.JasperException: javax.jdo.JDOFatalUserException: SELECT count(this) FROM apps.youzat.server.Event WHERE author == authorParam PARAMETERS Profile authorParam: Key of parameter value does not have a parent. NestedThrowables: org.datanucleus.exceptions.NucleusUserException: SELECT count(this) FROM apps.youzat.server.Event WHERE author == authorParam PARAMETERS Profile authorParam: Key of parameter value does not have a parent.: javax.jdo.JDOFatalUserException: SELECT count(this) FROM apps.youzat.server.Event WHERE author == authorParam PARAMETERS Profile authorParam: Key of parameter value does not have a parent. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException (NucleusJDOHelper.java:354) at
[appengine-java] Re: any plans for deferred.defer in Java?
I just committed an update to this to remove the static DatastoreService instance. Vince On Sat, Oct 31, 2009 at 2:08 PM, Vince Bonfanti vbonfa...@gmail.com wrote: This looked like an interesting problem, and I already had most of the pieces in place, so here's my first attempt, which is implemented in a single class (also attached, along with some test files): http://code.google.com/p/gaevfs/source/browse/trunk/src/com/newatlanta/appengine/taskqueue/Deferred.java I'm more than happy to contribute this for inclusion in the SDK. Some caveats: 1) Because of issue #2097 (http://code.google.com/p/googleappengine/issues/detail?id=2097), this doesn't work on the development server (it does work in production). So go star that issue! 2) I've only done minimal testing on the production server (see the attached test files). 3) This post is the only documentation that's currently available. First, add the following your your web.xml: servlet servlet-nameDeferred/servlet-name servlet-classcom.newatlanta.appengine.taskqueue.Deferred/servlet-class /servlet servlet-mapping servlet-nameDeferred/servlet-name url-pattern/_ah/queue/deferred/url-pattern /servlet-mapping Second, define the deferred queue within queue.xml (use whatever rate you want): queue namedeferred/name rate10/s/rate /queue Next, create a class that implements the com.newatlanta.appengine.taskqueue.Deferred.Deferrable interface; the doTask() method of this class is where you implement your task logic. Then, invoke the com.newatlanta.appengine.taskqueue.Deferred.defer() method to queue up your task: TestDeferred testDeferred = new TestDeferred(); // implements Deferrable Deferred.defer( testDeferred, one, two, three, 1, 2, 3 ); (Note that it would be possible to pass arguments as attributes to your Deferrable instance, rather than using varargs; I'm not sure it makes much difference which you choose). Just as for the Python implementation, if the arguments size exceeds 10KB, the arguments are stored in a datastore entity, which is then deleted when the task is executed. Also, your doTask() method can throw a PermanentTaskFailure exception to halt retries; any other exceptions cause the task to be retried. Let me know if you find this useful, have any questions or encounter any problems. Vince On Fri, Oct 30, 2009 at 6:13 PM, Jason (Google) apija...@google.com wrote: Hi David. This may be coming to Java eventually, but it hasn't been started yet. If you or anyone else is interested in contributing, let me know. - Jason On Wed, Oct 28, 2009 at 7:52 AM, David Chandler turboman...@gmail.com wrote: Re: http://code.google.com/appengine/articles/deferred.html Will this be coming to AppEngine for Java? David Chandler http://turbomanage.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: the question in ubuntu9.10 and eclipse 3.5
oh, I need install libstdc++6,, I don't know it don't conflict with libstdc++5, Now everything is all right. On Thu, Nov 5, 2009 at 11:57 PM, zhurizhe zhurizh...@gmail.com wrote: when I run the app in ubuntu9.10 and eclipse 3.5,the console view the info : ** Unable to load Mozilla for hosted mode ** java.lang.UnsatisfiedLinkError: /home/jamesyoung/eclipse/plugins/ com.google.gwt.eclipse.sdkbundle.linux_1.7.1.v200909221731/gwt- linux-1.7.1/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open shared object file: No such file or directory But ubuntu 9.10 has install libstdc++6, oh, god ,what I should do next ? Thank you ,everyone! I don't like windows, and if nobody could help me, I have to put up with windows. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: I broke something using Eclipse plugin
Hi Romeo: This problem was reported here http://code.google.com/p/googleappengine/issues/detail?id=2280 . You can vote for it so it gets fixed asap (there's also a workaround explained). Regards, Esteban On Thu, Nov 5, 2009 at 9:04 PM, RSN romeo.sanc...@gmail.com wrote: I had the same problem. But, after adding the jars to the build path as external jars, it complains about not finding the following: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent (InstrumentationImpl.java:323) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain (InstrumentationImpl.java:338) Caused by: java.lang.RuntimeException: Unable to find appengine- agentimpl.jar in C:\eclipse-jee-ganymede-SR2-win32\eclipse\plugins \com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine- java-sdk-1.2.6\lib\impl at com.google.appengine.tools.development.agent.AppEngineDevAgent.findAgentImplLib (AppEngineDevAgent.java:97) at com.google.appengine.tools.development.agent.AppEngineDevAgent.premain (AppEngineDevAgent.java:48) ... 6 more Exception in thread main FATAL ERROR in native method: processing of -javaagent failed It does not find the appengine-agentimpl.jar. I add this library also as an external jar, and it keeps getting the same error. Any help is greatly appreciated. As I side note, since I included the other libraries as external jars, I get the following type of warning: The following classpath entry 'C:\eclipse-jee-ganymede-SR2- win32\eclipse\plugins \com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine- java-sdk-1.2.6\lib\agent\appengine-agentimpl.jar' will not be available on the server's classpath TIE21 so, aren't they supposed to be under Lib? Any suggestions? ROMEO On Sep 17, 4:30 am, Clay Lenhart c...@lenharts.net wrote: That did it!! Thanks Jason! On Sep 16, 11:24 pm, Jason (Google) apija...@google.com wrote: Try adding the JARs to your build path without copying them to your lib directory. Just use Add external JARs in the Eclipse Build Path dialog. - Jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Inequality operator is !=, but can we add
On Thu, Nov 5, 2009 at 9:17 PM, Max Ross (Google) maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: The next SDK (1.2.8) is working its way through QA right now so hopefully it will be available in the next week or two. Please can we get a bit more notice on the changes and the make-live date than we did with 1.2.6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Inequality operator is !=, but can we add
Hi Roy, I don't have a firm date to give you on the next release because we're going to test it until we're satisfied with the quality. The release will be backwards compatible with the current release. What sorts of decisions are you looking to make based on the release date? Maybe there's some other way I can help you with them. Max On Thu, Nov 5, 2009 at 6:09 PM, Roy Smith roy.smith@googlemail.comwrote: On Thu, Nov 5, 2009 at 9:17 PM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: The next SDK (1.2.8) is working its way through QA right now so hopefully it will be available in the next week or two. Please can we get a bit more notice on the changes and the make-live date than we did with 1.2.6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Inequality operator is !=, but can we add
1.2.6 broke a few items based on the posts in this group and was implemented with no prior notice. Had we known what the changes were, and were given a couple of day's notice, we could have been monitoring our live apps and reviewing our code for incompatibilities, implemented some contingencies, downloaded the new SDK and locally regression tested our apps, etc. As it happened, the first that many of us knew of any problems was when live users complained to us. We then waste a bunch of time looking for problems, only to subsequently learn that a new SDK/API had been deployed. So my concern is operational rather than around any design/development decisions. I'm not asking for a firm date, just a couple of day's notice Having said that a roadmap would be extremely welcome :-) best Roy On Fri, Nov 6, 2009 at 3:36 AM, Max Ross (Google) maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: Hi Roy, I don't have a firm date to give you on the next release because we're going to test it until we're satisfied with the quality. The release will be backwards compatible with the current release. What sorts of decisions are you looking to make based on the release date? Maybe there's some other way I can help you with them. Max On Thu, Nov 5, 2009 at 6:09 PM, Roy Smith roy.smith@googlemail.comwrote: On Thu, Nov 5, 2009 at 9:17 PM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: The next SDK (1.2.8) is working its way through QA right now so hopefully it will be available in the next week or two. Please can we get a bit more notice on the changes and the make-live date than we did with 1.2.6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] GWT Vs JQuery
Hie My App is currently writen and hosted on GAE which used conventional MVC1 pattern and using jsps for views layer. I am looking forward to enhance the UI layer. So which one is more recommended GWT or JQuery or anything else that works with GAE? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: GWT Vs JQuery
Horses for courses. Do you know Javascript? Does GWT-RPC work for you, or do you prefer REST, DWR or your home-grown c-s protocol? Will you be using other APIs such as Gdata? Do you require any particular widgets from either GWT or Jquery? ...the list goes on GAE is agnostic. The biggest issue you will face with either approach is authentication. Right now GAE authentication is a pretty blunt instrument. On Fri, Nov 6, 2009 at 3:56 AM, Vik vik@gmail.com wrote: Hie My App is currently writen and hosted on GAE which used conventional MVC1 pattern and using jsps for views layer. I am looking forward to enhance the UI layer. So which one is more recommended GWT or JQuery or anything else that works with GAE? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Inequality operator is !=, but can we add
Thx for taking the issue on board. I have seen the roadmap page, but ideally I'd like the next level of detail in terms of planned releases and feature sets. Think Trac milestones. Of course these things change, but we can live with that. As an example, I'm currently wrestling with authentication. I can't decide whether I need to roll my own, or do you guys have anything in the pipeline to natively support OAUTH, or OpenId. Honestly I love your notifications so promise never to tune them out :-) Pre-releasing the SDK with deploy-disabled seems a pretty easy thing to do. If it's only advertised here, along with some release notes, a couple of days before live, that would help us and possibly help you with your regression testing. On Fri, Nov 6, 2009 at 4:02 AM, Max Ross (Google) maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: Have you seen this? http://code.google.com/appengine/docs/roadmap.html I understand the operational difficulties you're describing. Ideally we would have a way to let early adopters try out the new runtime before we roll it out to all our servers, thus giving us the opportunity to learn about incompatibilities before they became widespread. We've talked about this quite a bit but we don't have anything coming in the near term. As for notification of new server-side deployments, the reality is that we push new code into production all the time. The vast majority of the time nobody notices because we didn't break anything and we didn't introduce any user visible features. If we sent out notifications every time we did this I'm pretty sure you would tune these notifications out within a week or two. Still, if you're running a real service with real users it makes sense that you would want to know about periods of increased risk ahead of time. I'm just not sure how we would identify those for you. The trick with a new SDK is that we can't release it until we've updated our servers with new code that is prepared to handle the new SDK, and by that time, if we've goofed and introduced an incompatibility, your app has already run into it. I suppose we could make the SDK available ahead of time in some form where it can only be run locally, but I can imagine it being pretty confusing to have an SDK that is only half-functional. What do you think? Max On Thu, Nov 5, 2009 at 7:44 PM, Roy Smith roy.smith@googlemail.comwrote: 1.2.6 broke a few items based on the posts in this group and was implemented with no prior notice. Had we known what the changes were, and were given a couple of day's notice, we could have been monitoring our live apps and reviewing our code for incompatibilities, implemented some contingencies, downloaded the new SDK and locally regression tested our apps, etc. As it happened, the first that many of us knew of any problems was when live users complained to us. We then waste a bunch of time looking for problems, only to subsequently learn that a new SDK/API had been deployed. So my concern is operational rather than around any design/development decisions. I'm not asking for a firm date, just a couple of day's notice Having said that a roadmap would be extremely welcome :-) best Roy On Fri, Nov 6, 2009 at 3:36 AM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: Hi Roy, I don't have a firm date to give you on the next release because we're going to test it until we're satisfied with the quality. The release will be backwards compatible with the current release. What sorts of decisions are you looking to make based on the release date? Maybe there's some other way I can help you with them. Max On Thu, Nov 5, 2009 at 6:09 PM, Roy Smith roy.smith@googlemail.comwrote: On Thu, Nov 5, 2009 at 9:17 PM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: The next SDK (1.2.8) is working its way through QA right now so hopefully it will be available in the next week or two. Please can we get a bit more notice on the changes and the make-live date than we did with 1.2.6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Timeout using GData API
Recently I've started getting timeouts fetching a spreadsheet using the Gdata API library. How do I increase the timeout? Stack trace follows:- java.io.IOException: Timeout while fetching: http://spreadsheets.google.com/feeds/worksheets/tPigPq5454wZIlYT_Vy7jY-ewerb2XQ/private/full/defaultjava.io.IOException: Timeout while fetching: http://spreadsheets.google.com/feeds/worksheets/tPigPqwZIlYT_Vy7jY-b2XQ/private/full/default com.google.appengine.api.urlfetch.URLFetchServiceImpl.handleApplicationException (URLFetchServiceImpl.java:69) com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch (URLFetchServiceImpl.java:42) com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler $Connection.fetchResponse(URLFetchServiceStreamHandler.java:408) com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler $Connection.getInputStream(URLFetchServiceStreamHandler.java:290) com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler $Connection.getResponseCode(URLFetchServiceStreamHandler.java:131) com.google.gdata.client.http.HttpGDataRequest.checkResponse (HttpGDataRequest.java:535) com.google.gdata.client.http.HttpGDataRequest.execute (HttpGDataRequest.java:515) com.google.gdata.client.http.GoogleGDataRequest.execute (GoogleGDataRequest.java:515) com.google.gdata.client.Service.getEntry(Service.java:1270) com.google.gdata.client.GoogleService.getEntry(GoogleService.java:567) com.google.gdata.client.Service.getEntry(Service.java:1196) com.google.gdata.data.spreadsheet.SpreadsheetEntry.getDefaultWorksheet (SpreadsheetEntry.java:143) couk.cleverthinking.cc.server.google.GoogleDoc.fetchSpreadsheetContents (GoogleDoc.java:225) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[google-appengine] choosing appengine.
Hi, We are in the process of designing a new web site, we are inspecting the language and platform usage alternatives for our application. We have looked over the interface and the API of appengine amon the alternatives and they seem to perfectly match our requirements and the underlying technology seems very promising. The ease of design seems to make learning curve very short. Maintenance and scalability are not our responsibility, that is perfect, too. However, we still have some doubts/conscerns on the following areas: - We have previously designed web sites and they faced substantial amount of DDoS. As I read through the appengine FAQ, I see that google is giving guarantee on refund if a site experiences a DDoS attack. But, there is no explanation on what are the terms for an traffic for to be identified and approved as a DoS attack by Google? Any experiences on this? - The other thing is with uploading/downloading/managing application data. It is very good to see that only a single deploy button does everything. But we will currently work with 3 people on this project and as the limitation of downloading the current release in the web forces us to use some kind of a SVN program. We don't want to do that. Update svn and then update the web application. We will need frequent updates to the site, especially statically(changing the design) which will require to upload all the static files, templates all the project together to the web again. At least somehow, please let us download our own code from the server automatically. I think there should be a very good reason to limit that functionality. Or maybe I am missing some functionality in appcfg? - Also, it would be very nice to have a small/rough statistic about the pricing. How much a typical web site will cost us? Any estimation or experience should be shared about this. Only saying that it is competetive is not enough, IMHO. - Last question is: Is the database allocated for our application will be used internally by Google. I cannot see any text/reference for that but just asking curiosity. Regards, Sumer Cip --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Authentication Code from Argentina
Hi, If you are having trouble with SMS verification, or want an additional account activated, please fill out the following form: http://appengine.google.com/waitlist/sms_issues (This is from the following FAQ http://code.google.com/appengine/kb/sms .html#error ) Once you fill out this form, you should receive access within a day or two. (hooray for copy-paste) On Nov 4, 11:18 pm, Sebastian trogs...@gmail.com wrote: Hi, I am from Argentina. I've tried to verify my appengine account but I never received the sms. I used +54 (country code) 911 (area code for mobiles) I get the msg: An Authentication Code Has Been Sent to +54911 Tried several times but still haven't received the SMS. What can I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: I am unable to update my cron.yaml
Wooble, Thank you for your kind reply. I have even tried update_cron, but in vain. Nevertheless, why is not updating even with appcfg.py. On Nov 4, 7:34 pm, Wooble geoffsp...@gmail.com wrote: the command is update_cron, not update-cron, although a normal appcfg.py update should work too. On Nov 3, 3:57 pm, SK shanmu...@gmail.com wrote: Hi, I wrote the following cron.yaml file, but it is not being updated to the server. I have updated the folder with appcfg.py update foldername. I have also tried appcfg.py update-cron, but it has failed by saying 'unknown action'. Could some one please help me with this. cron.yaml: cron: - description: update the datastrore url: /newPuddle schedule: every 1 min app.yaml: application: appid version: 1 runtime: python api_version: 1 handlers: - url: /favicon.ico static_files: favicon.ico upload: favicon.ico - url: /.* script: pu.py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Beginner Question - Data Store Insertion is not working
You cannot use sockets on app engine. On Nov 5, 2:26 am, Felix felix1...@gmail.com wrote: Hi, This is my first question in the forum :) I am trying to insert a data but it is not working. I verified the code locally and it works in the localhost but it does not actually works in the domain. I have pasted the code .Can someone please correct me, if im doing something incorrectly. import socket import sys from google.appengine.ext import db host = localhost port = 8082 size = 1024 serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serverSocket.bind((host,port)) serverSocket.listen(backlog) class UserData(db.Model): email = db.EmailProperty(required=True) city = db.StringProperty(required=True) state = db.StringProperty(required=True) while 1: client, address = serverSocket.accept() userObject = UserData (email=felix1...@gmail.com,city=chennai,state=TN) db.put(userObject) client.close() Yes, it is an infinite loop. Just for the testing purposes. After this, when I try to see the data viewer in the domain, it says no results for the query Select * from UserData But for the same code, when i queried in the localhost, it returned data in the interactive data viewer... Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Facebook app HTTP-200 but no data
I have a Facebook application running on GAE and it's working well. Can you post some of your code in the forum? On Nov 5, 7:22 pm, Lynge como...@gmail.com wrote: Hi, I am building a facebook app... or I am trying to. Being unable to make it work with their iframe option I have since followed this guide:http://dollarmani-facebook.blogspot.com/2008/09/facebook-applications... To do it in FBML. Should anyone not know this, then the FBML approach requires GAE to accept the POST request from the facebook servers and send a response. It just isn't working. Facebook tells me that GAE has responded with HTTP-200, but with no data. If I change the method to get instead of post and view it in a browser, then it returns content just fine. And if I leave it on get and try to use it via facebook, I get a 405. Just as I expected. No errors relating to this is showing op in my logs on the dashboard and it works just fine on the dev-server. Unfortunately I cannot test it via facebook using the dev-server and I have no idea how to fake the facebook post request. So it is in utter desperation that I am writing this. Someone please point to some kind of testing-tool or tell me if this approach no longer is possible on GAE. Many thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] creating a secure login page
Hi, I have created an admin table in the datastore.Now I have to give access to the other tables in the datastore by checking whether the users are registered in the admin or not.How can I do this.How would I create a session in python for GAE datastore... please suggest meits emergency... Thanking you, With regards, Vaishnav --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: frame/object control with login
+ another 1 User testing showed the Google login experience to be extremely confusing for users (so we switched to Facebook Connect ... don't get me started on the problems with Facebook, but at least their Connect Experience doesn't confuse users). Would be wonderful if we could use our own custom look on the front- end for a Google account, or if Google developed a similar awareness as Facebook has done with Connect so that people understand what's going on. On Nov 4, 11:06 am, Joshua Smith joshuaesm...@charter.net wrote: +1. We've abandoned using google's user authentication for exactly this reason. It confused the hell out of all our users. When we started using google apps for our email, it started confusing the hell out of us. -Joshua On Nov 4, 2009, at 1:44 PM, ryan baldwin wrote: Nick, I think you're overestimating the proverbial average user. In fact, in user testing our own application, users are almost unanimously tripped up when they are redirected to Google to login. We frequently heard the user say this: Okay, now I click here to login and... oh... why am I asked to login to Google? I'm just pointing this out so that we don't all get stuck in a belief set that may not be accurate. Personally, I think Google needs to come up with an API (whether it be javascript or otherwise) for AppEngine apps to authenticate users more naturally. It's very jarring and, dare I say, short sited to force all users of all apps away from an application to an unbranded login screen. - ryan. On Wed, Nov 4, 2009 at 2:40 AM, Nick Johnson (Google) nick.john...@google.com wrote: Hi, Framing the login page is strongly discouraged, and may in fact be contrary to the TOS. The only way for the user to determine that a login page for a Google account is legitimate is to check if it's being served off the google.com domain, and this is not possible inside a frame. -Nick Johnson On Mon, Nov 2, 2009 at 10:36 PM, reyelts reye...@gmail.com wrote: I apologize if I'm posting to the wrong place, I don't know if this is a basic HTML question, a Python question, a GAE question, or some combination of the set... Since we can't have much impact on the use login window for Google App Engine (ie to change the language or add an image), I'm looking at embedding the login page, like so: from google.appengine.ext import webapp from google.appengine.api import users class main(webapp.RequestHandler): def get(self): user = users.get_current_user() if user == None: self.response.out.write('html\nbody\n') self.response.out.write('pMy intro text/p\n') self.response.out.write('hr\n') self.response.out.write('object\n') self.response.out.write(' data=' + users.create_login_url (self.request.uri) + '\n') self.response.out.write(' type=text/html\n') self.response.out.write(' width=100% height=50%\n') self.response.out.write('/object') self.response.out.write('hr\n') self.response.out.write('/body\n/html\n') else: self.response.out.write('html\nbody\n') self.response.out.write('p' + user.nickname() + 'is logged in!/p\n') self.response.out.write('/body\n/html\n') This works fine: I get My intro text at the top of the window followed by a pane with the login. However, when I login, the result (user is logged in) is written to the pane where the login occurred, vs. replacing the whole window. I tried this with the older iframe, and get the same result. Is there a way to re-take over the complete window (ie make the frame I created go away) on the redirect? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Facebook app HTTP-200 but no data
I most certainly can :D http://python.pastebin.com/m35cb3e63 The is the helloworld.py from the Getting Started Guide It is modified according to the guide in the link. I have also factored in the suggestions in the comments below. I really cant figure out why it wont work. Prior to this I have tried doing it with django, app-engine-patch and pyfacebook. The best I got was the auth-token-loop, but that was in an iframe so I decided to try with FBML and webapp instead. But if you have something running it must be possible. Let me know if you need anything else. On 5 Nov., 21:17, Claude Vedovini cla...@vedovini.net wrote: I have a Facebook application running on GAE and it's working well. Can you post some of your code in the forum? On Nov 5, 7:22 pm, Lynge como...@gmail.com wrote: Hi, I am building a facebook app... or I am trying to. Being unable to make it work with their iframe option I have since followed this guide:http://dollarmani-facebook.blogspot.com/2008/09/facebook-applications... To do it in FBML. Should anyone not know this, then the FBML approach requires GAE to accept the POST request from the facebook servers and send a response. It just isn't working. Facebook tells me that GAE has responded with HTTP-200, but with no data. If I change the method to get instead of post and view it in a browser, then it returns content just fine. And if I leave it on get and try to use it via facebook, I get a 405. Just as I expected. No errors relating to this is showing op in my logs on the dashboard and it works just fine on the dev-server. Unfortunately I cannot test it via facebook using the dev-server and I have no idea how to fake the facebook post request. So it is in utter desperation that I am writing this. Someone please point to some kind of testing-tool or tell me if this approach no longer is possible on GAE. Many thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How can i query the system time?
Or System.currentTimeMillis() - That will return the current time in milliseconds since 1/1/1970. On Nov 5, 8:49 am, Jorge athenas...@gmail.com wrote: Create a new object of type Date and it will have the current system time (GMT) with millisecond resolution. private currentDateTime = new Date(); Jorge Gonzalez On Nov 5, 3:38 am, Devraj Mukherjee dev...@gmail.com wrote: http://code.google.com/appengine/docs/java/datastore/creatinggettinga... On Wed, Nov 4, 2009 at 7:16 PM, Tito George tito...@gmail.com wrote: How can i query like this JDO select sysdate from dual ? -- The secret impresses no-one, the trick you use it for is everything - Alfred Borden (The Prestiege) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] SMS Verification troubles
Hi I'm from Argentina i'm having a lot of troubles getting started on App Engine. At my work they givme a week (this week) to test the framework and evaluate how usefull can be to develop here our future applications. It was very frustating to realize that on monday none of the cell phone i ve tryed (from 3 differents carriers present here in Argentina) receive any of thoses activation codes. on Thuesday my hope get pumped when I saw a link to post a message telling my problem (http://appengine.google.com/waitlist/sms_issues ) and supposely it will be answered in one or two days. On thursday (2 days afters) I'm realising that i have no answer yet and I 'm affraid to get friday without any response... that will be broke completly the previous schedule we have made... I understand that app engine is in beta testing and you need some control to avoid an explosive growing... but you can do a very simple criteria, enabling little (on trafic / processors) applications to work without any registration and put the SMS telefone activating sistem to bigger projects. please... I need to be activated as soon is possible! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Verification
Bernardo, I've gone ahead and verified your account. Can you give it a try now? *Ikai* * * On Thu, Nov 5, 2009 at 8:31 AM, Bernardo Heynemann heynem...@gmail.comwrote: I tried a couple times to verify my account using my phone number. I'm trying with a friend's phone number now, but it says I tried too many times and as such can't try again. What should I do? Cheers, Bernardo Heynemann --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: frame/object control with login
The same issue creates a very difficult problem for iGoogle gadgets hosted within GAE apps that use google auth. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: frame/object control with login
On Wed, Nov 4, 2009 at 8:34 PM, reyelts reye...@gmail.com wrote: I admit to not having been through all of the Java documentation on http://code.google.com/appengine/docs/. I have, however, been through the Python stuff extensively and never came across anything that suggests framing the login page is strongly discouraged. In fact, some information on recommended HTML usage would be a very welcome addition to the Google App Engine Docs. I also was unable to find anything to suggest there was a problem with the TOS. I'm not modifying anything from Google nor am I usurping or reverse engineering or bypassing any Google interfaces. In fact, I am trying desperately to use a Google interface as-is and in such a manner as is not confusing to my user population. The frame/object *is* being served from the google.com domain. I have no desire to nor have I made any attempt to bypass that. In your case, yes it is. However, there's no reliable visual cue to the user that this is the case, and thus no way for the user to easily tell your legitimate iframed login page from a Phishing site's fake iframed login form. For that reason, putting the login form in an iframe is very strongly discouraged - you're essentially teaching your users to be susceptible to phishing for their Google account details. For the same reason, it's extremely unlikely any API to allow you to take Google user credentials yourself will be offered. Depending on the browser, there are multiple ways of verifying the source of the frame. For example, IE's Properties and Chrome's Inspect Element clearly show the source address. It would be unreasonable to expect even a 'power user' to do this on every login, let alone everyone else. Finally, if you have alternatives to suggest, I welcome them. How about showing the login form in a popup? That way, the google.com URL is fully visible, without navigating away from your site. This is the approach Google Friend Connect takes. I'm just trying to do what's best for my users while staying within the limits of the tools you provide. I would humbly point out that offering your users a login form that is a hallmark of phishing sites is not best for your users. -Nick Johnson As evidenced by other contributors to this thread, you can see that I am not alone in this endeavor. On Nov 4, 1:40 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi, Framing the login page is strongly discouraged, and may in fact be contrary to the TOS. The only way for the user to determine that a login page for a Google account is legitimate is to check if it's being served off the google.com domain, and this is not possible inside a frame. -Nick Johnson On Mon, Nov 2, 2009 at 10:36 PM, reyelts reye...@gmail.com wrote: I apologize if I'm posting to the wrong place, I don't know if this is a basic HTML question, a Python question, a GAE question, or some combination of the set... Since we can't have much impact on the use login window for Google App Engine (ie to change the language or add an image), I'm looking at embedding the login page, like so: from google.appengine.extimport webapp from google.appengine.apiimport users class main(webapp.RequestHandler): def get(self): user = users.get_current_user() if user == None: self.response.out.write('html\nbody\n') self.response.out.write('pMy intro text/p\n') self.response.out.write('hr\n') self.response.out.write('object\n') self.response.out.write(' data=' + users.create_login_url (self.request.uri) + '\n') self.response.out.write(' type=text/html\n') self.response.out.write(' width=100% height=50%\n') self.response.out.write('/object') self.response.out.write('hr\n') self.response.out.write('/body\n/html\n') else: self.response.out.write('html\nbody\n') self.response.out.write('p' + user.nickname() + 'is logged in!/p\n') self.response.out.write('/body\n/html\n') This works fine: I get My intro text at the top of the window followed by a pane with the login. However, when I login, the result (user is logged in) is written to the pane where the login occurred, vs. replacing the whole window. I tried this with the older iframe, and get the same result. Is there a way to re-take over the complete window (ie make the frame I created go away) on the redirect? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to
[google-appengine] hashmap losing references over time
I have a hashmap on app engine that loses its contents after 5-10 minutes. Does app engine release unused objects after a timeout? I couldn't find any relevant documentation. My caching class (code below) holds references to uploaded objects and also stores a serialized version of the uploaded object in the datastore. When a client requests an object, the cache is checked first. If the object isn't in the cache, the object is retrieved from the datastore. When the cache is empty, remote retrieval of an object (1k in size) takes about 6-7 seconds, I assume for the fetch from datastore and deserialization. When the object is in cache it takes around 160ms. (#s are from Firebug.) I confirmed with debug code that my hashmap is indeed being emptied after a while and that it's not client caching or other code issues. I cannot reproduce this locally with the app engine plugin for eclipse. Is there a way to make the app engine leave my hashmap alone? Thanks for any help, Peter - private static ConfiguratorStorage storage = new ConfiguratorStorage(); private HashMapConfiguratorID, Configurator idToConfiguratorMap; private ConfiguratorStorage() { idToConfiguratorMap = new HashMapConfiguratorID, Configurator (); } public static ConfiguratorStorage getInstance() { return storage; } public Configurator getConfigurator(ConfiguratorID id) { Configurator configurator = idToConfiguratorMap.get(id); if (configurator == null) { PersistenceManager persistenceManager = Persistence.getPersistenceManagerFactory().getPersistenceManager(); try { ConfiguratorDAO wrapper = persistenceManager.getObjectById(ConfiguratorDAO.class, id.toString ()); configurator = wrapper.getConfigurator(); idToConfiguratorMap.put(configurator.getConfiguratorID (), configurator); } catch (JDOObjectNotFoundException nfe) { // do nothing } finally { persistenceManager.close(); } } return configurator; } public void saveConfigurator(Configurator configurator, String xml) throws IOException { idToConfiguratorMap.put(configurator.getConfiguratorID(), configurator); PersistenceManager persistenceManager = Persistence.getPersistenceManagerFactory().getPersistenceManager(); ConfiguratorDAO wrapper = new ConfiguratorDAO(configurator); try { persistenceManager.makePersistent(wrapper); } finally { persistenceManager.close(); } } - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Adding MultiUserChat to the all new XMPP support :)
Oups sorry :s Thank you Jeff for taking my request into consideration, Looks like i forgot to create the issue, thanks victor ! Well, i have a MultiUserChat client running on android and got a chatbot on appengine, Now i'm trying to make this bot talk to everyone within a room. Hope Google will release MultiUserChat support for GAE soon :) On Oct 1, 11:27 am, Viktor Bresan viktor.bre...@gmail.com wrote: I couldn't find this issue opened, so I have created one. It's here: http://code.google.com/p/googleappengine/issues/detail?id=2189 Meanwhile, does anyone have any suggestions regarding some kind of workaround? I would like to implement multi-user XMPP chat on app engine and I don't know where to move from single user example. Many thanks, Viktor. On Sep 9, 11:54 pm, Jeff S (Google) j...@google.com wrote: Hello nah0y, Sounds like a good feature request. Would you mind adding it here? http://code.google.com/p/googleappengine/issues/list Thank you, Jeff On Fri, Sep 4, 2009 at 1:55 AM, nah0y hadjedjyo...@gmail.com wrote: In order to respond to the article on your blog : http://googleappengine.blogspot.com/2009/09/app-engine-sdk-125-releas... I have a particular request :) Can you implement the MultiUserChat protocol on future updates ? http://xmpp.org/extensions/xep-0045.html This would be very very usefull ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Godaddy + Domain name mapping
So id thought Id mention this: adding a subdomain mapping of anything other than www works for me. For example I tried calendar.mydomainname.com and voila it works. www.mydomainname.com still doesn't work however. This makes me think that this is a built in restriction. See my post on stackoverflow for details http://stackoverflow.com/questions/1684142/google-app-engine-domain-name-mapping-godaddy-domain-name On Nov 5, 2:30 pm, Saliem than.sal...@gmail.com wrote: Hello, Right now I have no aname records set in Godaddy. I read something that said I should set it to 64.202.189.170, but I think thats for the case of domain name forwarding, NOT mapping, and thats not what I want. I already added my domain name to GAE and confirmed my ownership of the domain name I also already added www to GAE and added a cname record of www pointing to ghs.google.com Then I tried accesswww.mydomain.combut it keeps forwarding to myappname.appspot.com Does anyone any any suggestions about what to do other than wait 48 hours? Should I have an an name record set? If so what should I set it to? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Deleting indexes in my application.
Hi Prawyn, I'm wondering if this app is getting close to the default limit of 100 indexes. How many indexes does it have and does this app need a higher limit? Thank you, Jeff On Wed, Nov 4, 2009 at 11:42 PM, Prawyn prawyn.mo...@gmail.com wrote: Hi, There are lot of indexes that are in building state for more than an hour now. Can you please mark that indexes as error so that I can vacuum that indexes.. My app id is : prawyn-test Thanks, Prawyn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Godaddy + Domain name mapping
hi Saliem, in the Google Apps dashboard for your domain, by default, the www url mapping is used by Google sites or .. You have to remove the www mapping from the Google sites then add www url to your appengine service. Cheemeng On Nov 6, 9:27 am, Saliem than.sal...@gmail.com wrote: So id thought Id mention this: adding a subdomain mapping of anything other than www works for me. For example I tried calendar.mydomainname.com and voila it works.www.mydomainname.comstill doesn't work however. This makes me think that this is a built in restriction. See my post on stackoverflow for details http://stackoverflow.com/questions/1684142/google-app-engine-domain-n... On Nov 5, 2:30 pm, Saliem than.sal...@gmail.com wrote: Hello, Right now I have no aname records set in Godaddy. I read something that said I should set it to 64.202.189.170, but I think thats for the case of domain name forwarding, NOT mapping, and thats not what I want. I already added my domain name to GAE and confirmed my ownership of the domain name I also already added www to GAE and added a cname record of www pointing to ghs.google.com Then I tried accesswww.mydomain.combutit keeps forwarding to myappname.appspot.com Does anyone any any suggestions about what to do other than wait 48 hours? Should I have an an name record set? If so what should I set it to? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: hashmap losing references over time
If you cache is in memory (ie not stored memcache or the datastore) then if the instance holding the hashmap is shutdown from inactivity (oftern in less than two minutes) you will lose everything. Stuff in memcache will dissappear too, though for other reasons (memory pressure, time ...) but will tend to stay around longer than instance memory, and is shared between all instances. However it will dissapear too at some point so you need to deal with that as well. The only thing guarunteed to hand around is data you persist in the data store When you say remote retrieval takes 6-7 secs I assume you don't mean from the datastore? T On Nov 6, 7:48 am, Peter Warren pe...@nomad.org wrote: I have a hashmap on app engine that loses its contents after 5-10 minutes. Does app engine release unused objects after a timeout? I couldn't find any relevant documentation. My caching class (code below) holds references to uploaded objects and also stores a serialized version of the uploaded object in the datastore. When a client requests an object, the cache is checked first. If the object isn't in the cache, the object is retrieved from the datastore. When the cache is empty, remote retrieval of an object (1k in size) takes about 6-7 seconds, I assume for the fetch from datastore and deserialization. When the object is in cache it takes around 160ms. (#s are from Firebug.) I confirmed with debug code that my hashmap is indeed being emptied after a while and that it's not client caching or other code issues. I cannot reproduce this locally with the app engine plugin for eclipse. Is there a way to make the app engine leave my hashmap alone? Thanks for any help, Peter - private static ConfiguratorStorage storage = new ConfiguratorStorage(); private HashMapConfiguratorID, Configurator idToConfiguratorMap; private ConfiguratorStorage() { idToConfiguratorMap = new HashMapConfiguratorID, Configurator (); } public static ConfiguratorStorage getInstance() { return storage; } public Configurator getConfigurator(ConfiguratorID id) { Configurator configurator = idToConfiguratorMap.get(id); if (configurator == null) { PersistenceManager persistenceManager = Persistence.getPersistenceManagerFactory().getPersistenceManager(); try { ConfiguratorDAO wrapper = persistenceManager.getObjectById(ConfiguratorDAO.class, id.toString ()); configurator = wrapper.getConfigurator(); idToConfiguratorMap.put(configurator.getConfiguratorID (), configurator); } catch (JDOObjectNotFoundException nfe) { // do nothing } finally { persistenceManager.close(); } } return configurator; } public void saveConfigurator(Configurator configurator, String xml) throws IOException { idToConfiguratorMap.put(configurator.getConfiguratorID(), configurator); PersistenceManager persistenceManager = Persistence.getPersistenceManagerFactory().getPersistenceManager(); ConfiguratorDAO wrapper = new ConfiguratorDAO(configurator); try { persistenceManager.makePersistent(wrapper); } finally { persistenceManager.close(); } } - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: choosing appengine.
On Thu, Nov 5, 2009 at 6:32 PM, k3xji sum...@gmail.com wrote: everything. But we will currently work with 3 people on this project and as the limitation of downloading the current release in the web forces us to use some kind of a SVN program. We don't want to do that. Why not? That's what everybody else does. If your issue is that you don't have the expertise to set up an SVN repository try using one of the online ones such a Google Code (although do check the Terms that your project qualifies for free hosting). Another alternative is to use a distributed SCCS such as git or mercurial. We use mercurial as it has good Eclipse integration. It's not reasonable to ask Google to turn AppEngine into a SCCS. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: drop table?
thanks for the keys_only tip. I removed ~30K records from the datastore, which used most of my daily CPU quota. Is deleting meant to be this expensive? Yes; in the datastore deletes and puts are very expensive (since they need to alter all of your indexes), and reads are very cheap. It's definitely designed for applications where reads far outnumber writes. Ah OK - thought I must be doing something wrong to burn my quota so easily. To reduce CPU usage is it possible to delay rebuilding the index until all the data is uploaded? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Is deployment times limited?
I open Quota Details, and see my Deployments is 6 of 1000. Is the deployment times limited? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Is deployment times limited?
yes 2009/11/6 Nguyễn Kim Kha nkim...@gmail.com I open Quota Details, and see my Deployments is 6 of 1000. Is the deployment times limited? -- gae-django-cms (GD-cms) a multi-user CMS running on GAE sample http://gae-django-cms.appspot.com/ projects http://code.google.com/p/gae-django-cms/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Is deployment times limited?
A better answer might be yes, but this is a daily limit so not too much to worry about On Fri, Nov 6, 2009 at 6:45 AM, ego008 ego...@gmail.com wrote: yes 2009/11/6 Nguyễn Kim Kha nkim...@gmail.com I open Quota Details, and see my Deployments is 6 of 1000. Is the deployment times limited? projects http://code.google.com/p/gae-django-cms/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Is deployment times limited?
Oh... Thanks... On Nov 6, 1:56 pm, Roy Smith roy.smith@googlemail.com wrote: A better answer might be yes, but this is a daily limit so not too much to worry about On Fri, Nov 6, 2009 at 6:45 AM, ego008 ego...@gmail.com wrote: yes 2009/11/6 Nguyễn Kim Kha nkim...@gmail.com I open Quota Details, and see my Deployments is 6 of 1000. Is the deployment times limited? projectshttp://code.google.com/p/gae-django-cms/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How can i query the system time?
Great Thanks! How can i compare sysdate in DB level. Like in Oracle Select * from action_event a where a.ACTION_CODE='LOGIN' and to_char (a.EVENT_DATE,'dd/mm/') = to_char(sysdate-1,'dd/mm/') The above query will give all LOGIN events recorded yesterday. Is there any way to get sysdate inside query in GAE. Tito On Nov 6, 1:00 am, WMS willmso...@gmail.com wrote: Or System.currentTimeMillis() - That will return the current time in milliseconds since 1/1/1970. On Nov 5, 8:49 am, Jorge athenas...@gmail.com wrote: Create a new object of type Date and it will have the current system time (GMT) with millisecond resolution. private currentDateTime = new Date(); Jorge Gonzalez On Nov 5, 3:38 am, Devraj Mukherjee dev...@gmail.com wrote: http://code.google.com/appengine/docs/java/datastore/creatinggettinga... On Wed, Nov 4, 2009 at 7:16 PM, Tito George tito...@gmail.com wrote: How can i query like this JDO select sysdate from dual ? -- The secret impresses no-one, the trick you use it for is everything - Alfred Borden (The Prestiege) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---