Re: [appengine-java] Generating Keys
You could use DatastoreService.allocateIds() But why would you want to do this? If its to make the ids look nice then you could just add and remove the string yourself before looking up the key. Probably better to have a date property rather than include it in the key. On 8 Feb 2010, at 14:54, Manny S wrote: First off thanks for your time. I would like to generate a key that is a concatenation of a string with an datastore generated key. Is there anyway to do that? I want my keys to be appname + datastore generated key or say generate a key that is currentdate + datastore generated key Any suggestions as to how I should go about this? A simple example would be greatly appreciated. Manny -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: how to share local_db.bin to others
Hello, Is there a way to see the data of the WEB-INf/appengine-generated/local_db.bin from Eclipse? Thanks. 2010/2/8 dreamy dreamy2c...@gmail.com: We have no success to implement gae junit test. We use spring 2.5.6 and follow the http://code.google.com/appengine/docs/java/howto/unittesting.html . public class BaseTestCase extends AbstractDependencyInjectionSpringContextTests { @Override public void onSetUp() throws Exception { ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment()); ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(D:/work/ drp/src/drp/war)){}); super.onSetUp(); } �...@override public void onTearDown() throws Exception { super.onTearDown(); // not strictly necessary to null these out but there's no harm either ApiProxy.setDelegate(null); ApiProxy.setEnvironmentForCurrentThread(null); } public String[] getConfigLocations() { String[] configLocations = { file:war/WEB-INF/ applicationContext.xml }; return configLocations; } } but when run junit test. the exception is throw Failed to load from the backing store, D:\work\drp\src\drp\war\WEB-INF \appengine-generated\local_db.bin java.io.InvalidClassException: com.google.appengine.api.datastore.dev.LocalDatastoreService$Profile; local class incompatible: stream classdesc serialVersionUID = -6517584213397327068, local class serialVersionUID = -5383535353082918279 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java: 1583) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java: 1496) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 1732) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java: 974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java: 1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java: 1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java: 1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at com.google.appengine.api.datastore.dev.LocalDatastoreService.load(LocalDatastoreService.java: 949) at com.google.appengine.api.datastore.dev.LocalDatastoreService.start_(LocalDatastoreService.java: 281) at com.google.appengine.api.datastore.dev.LocalDatastoreService.access $300(LocalDatastoreService.java:90) at com.google.appengine.api.datastore.dev.LocalDatastoreService $1.run(LocalDatastoreService.java:273) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.api.datastore.dev.LocalDatastoreService.start(LocalDatastoreService.java: 271) at com.google.appengine.tools.development.ApiProxyLocalImpl.startServices(ApiProxyLocalImpl.java: 373) at com.google.appengine.tools.development.ApiProxyLocalImpl.access $500(ApiProxyLocalImpl.java:42) at com.google.appengine.tools.development.ApiProxyLocalImpl $2.run(ApiProxyLocalImpl.java:356) at com.google.appengine.tools.development.ApiProxyLocalImpl $2.run(ApiProxyLocalImpl.java:354) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.ApiProxyLocalImpl.getService(ApiProxyLocalImpl.java: 353) at com.google.appengine.tools.development.ApiProxyLocalImpl.makeSyncCall(ApiProxyLocalImpl.java: 100) at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:83) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java: 52) at com.google.appengine.api.datastore.DatastoreServiceImpl.beginTransaction(DatastoreServiceImpl.java: 516) at
Re: [appengine-java] Generating Keys
John, Thanks a bunch. Here is the reason why I need to add a prefix to the key. The scenario - I will be implementing pagination (of the data returned) as described in and for the sort order I wanted to use the Key. However, if the key also has the date of creation embedded in it then the sort will be on the date as well. I do not want to generate an unique key in my application. I want the data store to do it. I just want my app to piggyback on the datastore's ability to generate unique keys. Does this make sense or am I missing something here? Thanks again, Manny On Mon, Feb 8, 2010 at 1:44 PM, John Patterson jdpatter...@gmail.comwrote: You could use DatastoreService.allocateIds() But why would you want to do this? If its to make the ids look nice then you could just add and remove the string yourself before looking up the key. Probably better to have a date property rather than include it in the key. On 8 Feb 2010, at 14:54, Manny S wrote: First off thanks for your time. I would like to generate a key that is a concatenation of a string with an datastore generated key. Is there anyway to do that? I want my keys to be appname + datastore generated key or say generate a key that is currentdate + datastore generated key Any suggestions as to how I should go about this? A simple example would be greatly appreciated. Manny -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] write too frequent ,datastore contention timeout
I read app engine wiki, on datastore contention if too frequent write more than 5 times in 1 seconds. The wiki introduced use shard approach as workaround. May i know if we use spring @transactional on this, this can prevent datastore contention timeout right since writing in done concurrently ? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: getNextID
Getnextid was referred to by max ross in his google io talk in april 2009 On Feb 7, 11:48 am, datanucleus andy_jeffer...@yahoo.com wrote: What getNextID feature on JDO ? i.e please make reference to the JDO API and which particular API Method you're referring to -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: getNextID
Getnextid was referred to by max ross in his google io talk in april 2009 Which is not a JDO API call. Perhaps he's referring to low-level API. JDO allows sequences, and provides an API for those, which AFAIK Google haven't implemented. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: App Engine cold starts and overly aggressive cycling
Hey all, Since Ikai's post on January 22nd, I haven't had much trouble with my instance rebooting unexpectedly. However, today the problem has returned. I'm getting instance restarts within a minute or two of each other on a somewhat regular basis - sometimes even within a few seconds of each other, caused by my first request. Jake On Jan 30, 3:06 pm, Edwin Hautus ehau...@gmail.com wrote: I am having this problem for the last week or two after months of good performance and very little recycling. As my app start up time is around 15 seconds this is really hitting my user experience in a negative way. On Jan 16, 12:32 am, Ikai Lan i...@google.com wrote: Hey everybody, We've been seeing more and more reports of applications being cycled out overly aggressively, resulting in some folks implementing (discouraged) workarounds to keep their application from being cycled out. - What is your application ID? salsa-amsterdam - How do you know it is being cycled out? You'll need to insert some code that only gets called when the app cold starts. I have some logging which is executed on startup - How much time of inactivity does it take before your application is cycled out? Can be as little as a minute. - What time or days does this seem to happen? Seems to happen all the time. - What frameworks or libraries are you loading? Just the plain Servlet API and Groovy. Any other information you can provide would be helpful. Start up time of the app is about 10 seconds and involves some on the fly compilation of Groovy scripts. Ikai Lan Developer Programs Engineer, Google App Engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] What is Specs Features supported by GAE for Java?
I need a brief listed answer in a professional manner for subject question (As an example, pls see listing under point entitled Java EE 5 platform support that lists GlassFish Specs under this link: http://docs.sun.com/app/docs/doc/821-0188/gidij?l=ena=view). -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Dynamic properties (Expando model) possible with Java?
I have been searching through the JDO and JPA docs, but I can't find info about adding and removing properties at runtime. The Python interface has the Expando model for this: http://code.google.com/appengine/docs/python/datastore/expandoclass.html If I want to read and write my Expando models from Java, do I need to use the low-level datastore API rather than JDO or JPA? Thanks, Johann -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Getting the client's timezone
Hi, Any ideas on how to get the user's timezone (i.e., the timezone the client is working in)? The closest I've come so far to an answer is: http://j2eecookbook.blogspot.com/2007/06/formatting-date-to-client-timezone.html Does anybody have a better way of accomplishing this? I'd prefer to avoid asking the client to set their timezone as a preference because: * Sign-ups should be as fast as possible. * What if the client is temporarily working from a different timezone? Regards, Harshdeep -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] JDO Inheritance and new table strategy
Hello everybody ! I am using appengine for a personal project in order to create a professional application. I find Appengine really powerful but i do not understand why the new table inheritance strategy is not available even if it would not be really efficient. In the documentation it is said that the new table strategy may cause efficiency troubles due to the non supported join queries. But in concrete development if we need to store an inherited object using multiple tables due to the hierarchy and the sense of the application, we have to add a tier in the code to emulate the inheritance. I explain myself : I've got a server data hierarchy in a package called models that is synchronized with the client data hierarchy. Because of the non supported new-table strategy I had to create a tier in a package entities where I implemented all my persistable entities without inheritance. When an operation needs to access the stored datas, the models objects play with the entities to retrieve the needed datas and reassemble them so that the client app can ignore this kind of operation and have its development perennial. I assume that it is really not beautiful but I still not understand why the new-table is not available even if it would require a remote procedure call for each level of inheritance, because in the hand this is what we have to do when we are needing the new-table strategy, and in the other hand it could be a temporary implementation while waiting for the join queries. Thanks for answers ! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Persistence with JPA + GAE
Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter(idDistrito)); response.setContentType(text/html); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery(SELECT d FROM distritos d WHERE d.id = :codigo); q.setParameter(codigo,id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write(ok); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! Johan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Close PersistenceManager every time?
Should the PersistenceManager be closed after every query? I have a utility class that handles querying the datastore. This class then returns results which are used by JSP pages to show output. AFAIK, these are my options: * Make all my data objects detachable (what is the extra cost of doing this? Don't they have to be copied when detaching? ) * Make a second call on the utility class to close the PM (defeats the purpose of having the utility class) * Leave my PM unclosed (what is/are the implications of this?) I am referring to a case where I am only doing reads from the data store. Regards, Harshdeep -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] persistence with JPA
Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter("idDistrito")); response.setContentType("text/html"); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery("SELECT d FROM distritos d WHERE d.id = :codigo"); q.setParameter("codigo",id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write("ok"); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Persistence in JPA
Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter("idDistrito")); response.setContentType("text/html"); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery("SELECT d FROM distritos d WHERE d.id = :codigo"); q.setParameter("codigo",id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write("ok"); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! -- Atentamente, Johan Vallejo Elias Soluflex ERP Nextel : 827*239 Celular : 998270239 Oficina : 434-2649 anexo 102 Skype : soporte_soluflex Web : www.guiadecalles.pe Blog 1 : www.vnperu.com/blog Blog 2 : www.rfid.com.pe -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] JDO model issue
Hello, I am very new to appengine, and I am trying a very basic model exemple: A Race class is linked to a Runner class through a Result class When I am running the folloging code (the full code is attached): Race race = new Race(Paris, new Date(), 10); Runner runner1 = new Runner(Smith); Runner runner2 = new Runner(John); Result result1 = new Result(race, runner1, 1); Result result2 = new Result(race, runner2, 2); PersistenceManager pm = PMF.get().getPersistenceManager(); try { race = pm.makePersistent(race); runner1 = pm.makePersistent(runner1); runner2 = pm.makePersistent(runner2); pm.makePersistent(result1); pm.makePersistent(result2); } finally { pm.close(); } I get the following error: Detected attempt to establish Result(4) as the parent of Runner(2) but the entity identified by Runner(2) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. org.datanucleus.store.appengine.FatalNucleusUserException: Detected attempt to establish Result(4) as the parent of Runner(2) but the entity identified by Runner(2) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. at org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:204) at org.datanucleus.store.appengine.DatastoreRelationFieldManager$1.setObjectViaMapping(DatastoreRelationFieldManager.java:125) at org.datanucleus.store.appengine.DatastoreRelationFieldManager$1.apply(DatastoreRelationFieldManager.java:104) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:78) at org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:812) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProcess(DatastorePersistenceHandler.java:288) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:241) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:225) at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:3185) at org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java:3161) at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1298) at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) at race.TestRace.test2(TestRace.java:58) Any idea how I could solve this ? Thank you in advance Rodolphe -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. TestRace.java Description: Binary data Race.java Description: Binary data Result.java Description: Binary data Runner.java Description: Binary data
[appengine-java] Google App Engine for Java: Specs is needed
Hi All, I am now trying to take an architrecture descision to go for Google App Engine for Java or not but I did not find a topic that gathers all Specs regarding it in one place. What I am looking for is the usual Standard Server Application Server Arch. Specs like JSF, EJB JPA support for instance. Anyone can help? Google App Engine Team, The more formal professional announcement reg. your work would be greatly appreciated by IT community. Pls help. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Generic type in GAE JDO. Howto?
As java.util.Map isn't supported by GAE, I'm trying to create a class @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable=true) public class DAOMapK extends Object, V extends Object implements MapK,V { ... however, got such exception in Eclipse console DataNucleus Enhancer (version 1.1.4) : Enhancement of classes Errors were encountered when loading the specified MetaData files and classes. See the nested exceptions for details DataNucleus Enhancer completed with an error. Please review the enhancer log for full details. Some classes may have been enhanced but some caused errors Feb 8, 2010 2:55:53 PM 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 loading the specified MetaData files and classes. See the nested exceptions for details org.datanucleus.exceptions.NucleusUserException: Errors were encountered when loading the specified MetaData files and classes. See the nested exceptions for details at org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java: 426) 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) Caused by: java.lang.IllegalStateException: Unknown type: K at org.datanucleus.jdo.metadata.JDOAnnotationReader.processMemberAnnotations(JDOAnnotationReader.java: 1748) at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataForClass(AbstractAnnotationReader.java: 169) at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(AnnotationManagerImpl.java: 136) at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(MetaDataManager.java: 2278) at org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java: 385) ... 10 more Nested Throwables StackTrace: java.lang.IllegalStateException: Unknown type: K at org.datanucleus.jdo.metadata.JDOAnnotationReader.processMemberAnnotations(JDOAnnotationReader.java: 1748) at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataForClass(AbstractAnnotationReader.java: 169) at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(AnnotationManagerImpl.java: 136) at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(MetaDataManager.java: 2278) at org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java: 385) 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) DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details Any idea? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Getting Started : Eclipse, GWT, App Engine - Unable to resolve
What is need to get Eclipse to compile AppEngine functions: import com.google.appengine.api.users.User; -- Unable to resolve - source code unavailable. One suggestion was to create a super class to fool the GWT compiler but that only gets you so far. I have even gone back to basic and worked through the turorial http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html but the same things happens: ERROR] StockWatcher/src/com/google/gwt/sample/stockwatcher/client/ StockWatcher.java' [ERROR] Line 36: UserService cannot be resolved to a type [ERROR] Line 36: No source code is available for type UserService; did you forget to inherit a required module? [ERROR] Line 36: UserServiceFactory cannot be resolved I know this is a common problem, since there is plenty of refreances to it, but no soloution. This is particularly fustrating as it fails on a basic tutorial. Any Help? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Error while uploading the App - Unable to update
Hi, I just tried to upload my first App to the Google App Engine. I tried the Eclipse Plugin and appengine-java-sdk-1.3.0/bin/appcfg.sh. I have Suse Linux 10.3 and jdk1.6.0_18 installed. Each time I tried, I got the following error: -- Reading application configuration data... Beginning server interaction for ... 0% Creating staging directory 5% Scanning for jsp files. 20% Scanning files on local disk. 25% Initiating update. Email: ...@xxx.xx Password for ...@xxx.xx: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl) Unable to update app: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl) Please see the logs [/tmp/appcfg55133.log] for further information. Has anybody an idea? On my pc, the App is running. Best regards, Michael -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] cloud based teaching system
Hi, am jeevan dongre.I am final year engineering student from computer science and engineering. I am doing a project on cloud computing called cloud based teaching system using google app engine. Iam utilizing google resources like blog,group,docs and also gmail.Since i am new to this programming environment i need more information about how java application is developed and deployed on GAE,what are concepts we need to be aware of before we start developing the application. I am collabrating blogs,groups,gmail,channels and docs all together.I dont know how to make use of the google api's. so help me in this regard -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] DELETE HTTP Method not working on Google Chrome
Francisco send your code for help you El 08/02/2010 10:55 a.m., Francisco Gonzalez escribió: Hi. I'm developing an application that receives AJAX requests to perform some actions. I'm using jQuery to send the requests from the client. One of those requests is of type HTTP DELETE. The problem is that this request does not work when using Google Chrome on the deployed app. It gets a 400 error (bad request) as response. It works fine on my local SDK though. Firefox works well on both SDK and the deployed app. Anyone having the same trouble? Any ideas? Thank you in advance! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: App Engine cold starts and overly aggressive cycling
Thanks for the info, Jake. Has anyone else experienced this? That is, has anyone else noticed improvement which has since degraded? On Mon, Feb 8, 2010 at 9:10 AM, Jake jbrooko...@cast.org wrote: Hey all, Since Ikai's post on January 22nd, I haven't had much trouble with my instance rebooting unexpectedly. However, today the problem has returned. I'm getting instance restarts within a minute or two of each other on a somewhat regular basis - sometimes even within a few seconds of each other, caused by my first request. Jake On Jan 30, 3:06 pm, Edwin Hautus ehau...@gmail.com wrote: I am having this problem for the last week or two after months of good performance and very little recycling. As my app start up time is around 15 seconds this is really hitting my user experience in a negative way. On Jan 16, 12:32 am, Ikai Lan i...@google.com wrote: Hey everybody, We've been seeing more and more reports of applications being cycled out overly aggressively, resulting in some folks implementing (discouraged) workarounds to keep their application from being cycled out. - What is your application ID? salsa-amsterdam - How do you know it is being cycled out? You'll need to insert some code that only gets called when the app cold starts. I have some logging which is executed on startup - How much time of inactivity does it take before your application is cycled out? Can be as little as a minute. - What time or days does this seem to happen? Seems to happen all the time. - What frameworks or libraries are you loading? Just the plain Servlet API and Groovy. Any other information you can provide would be helpful. Start up time of the app is about 10 seconds and involves some on the fly compilation of Groovy scripts. Ikai Lan Developer Programs Engineer, Google App Engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JDO model issue
Hey, Relationships in GAE are a bit picky. It is my understanding that you can only persist children by way of persisting their parents. So, in your case, both Race and Runner are children of Result and you would only persist the two result objects - the dependent children would be persisted automatically. I'm willing to bet, though, that a single race object cannot be the child of two different parent objects, though I'm not certain. The details are all here: http://code.google.com/appengine/docs/java/datastore/relationships.html For the most part, I've found that parent/child relationships are only useful when the two are highly related - usually when I'm extending a class to provide more data. (e.g. Race - RaceDetails). The easy way to get around this is to store the objects in unowned relationships, referencing other objects by IDs as described in http://code.google.com/appengine/docs/java/datastore/relationships.html#Unowned_Relationships. Then, with some fancy getters/setters that automatically query the Datastore, you end up with the same result. See my example below. If anyone has any other advice, though, please contribute. I haven't found a great way to handle this and I'm trying to avoid using GAE specific libraries to help. Jake public class Race { private Key id; ... } public class Result { private Key id; private Key raceId; public Race getRace() { //query datastore with getObjectById(Race.class, raceId); } } On Feb 6, 7:15 pm, Rodolphe rde...@gmail.com wrote: Hello, I am very new to appengine, and I am trying a very basic model exemple: A Race class is linked to a Runner class through a Result class When I am running the folloging code (the full code is attached): Race race = new Race(Paris, new Date(), 10); Runner runner1 = new Runner(Smith); Runner runner2 = new Runner(John); Result result1 = new Result(race, runner1, 1); Result result2 = new Result(race, runner2, 2); PersistenceManager pm = PMF.get().getPersistenceManager(); try { race = pm.makePersistent(race); runner1 = pm.makePersistent(runner1); runner2 = pm.makePersistent(runner2); pm.makePersistent(result1); pm.makePersistent(result2); } finally { pm.close(); } I get the following error: Detected attempt to establish Result(4) as the parent of Runner(2) but the entity identified by Runner(2) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. org.datanucleus.store.appengine.FatalNucleusUserException: Detected attempt to establish Result(4) as the parent of Runner(2) but the entity identified by Runner(2) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. at org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:204) at org.datanucleus.store.appengine.DatastoreRelationFieldManager$1.setObjectViaMapping(DatastoreRelationFieldManager.java:125) at org.datanucleus.store.appengine.DatastoreRelationFieldManager$1.apply(DatastoreRelationFieldManager.java:104) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:78) at org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:812) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProcess(DatastorePersistenceHandler.java:288) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:241) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:225) at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:3185) at org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java:3161) at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1298) at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694) at race.TestRace.test2(TestRace.java:58) Any idea how I could solve this ? Thank you in advance Rodolphe TestRace.java 3KViewDownload Race.java 1KViewDownload Result.java 1KViewDownload Runner.java 1KViewDownload -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to
[appengine-java] Question on request duration / quota / HardDeadlineExceededError
Hello everyone, in my application I have a scheduled task that runs every 5 minutes to update the cache. Currently it is a brute force implementation, that runs through all entities and computes all permutations required. This task usually takes longer than 30 seconds - and fails almost every time with a HardDeadlineExceededError. My problem is, that all available information currently is not clear about how to handle these errors. Maybe I missed it, but: - The documentation is only about bandwidth, number of requests, API calls etc. - The API provides methods to measure number of CPU cycles (getCpuTimeInMegaCycles()), but doesn't warn about reaching the limit - In the discussion group I find some information such as maximum duration of 30 seconds for each request, but that is actually quite unspecific. - HardDeadlineExceededError is not documented in the API docs. Somewhere I read that a DeadlineExceededException should be thrown before - but I catch any Exception and still produce a HardDeadlineExceededError Of course, I could now just use a timer to run my job and terminate it gracefully shortly before 30 seconds are reached. But I'd prefer a better, more predictable and reliable option. Any suggestions? Thanx, Moritz -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Google Plugin for Eclipse 1.3 plans
I'm hoping for a good way to resolve workspace dependencies in Eclipse. The m2eclipse plugin does this well, but that doesn't play nicely with the maven-war-plugin, so it doesn't work for GAE. Running a Maven Install on each workspace dependency before deploying, however, is still nicer than having to manually generate/copy jar files. I'm pretty new to Eclipse/Maven/GAE, so I don't know if it's possible, but I'm hopeful! :) Jake On Feb 6, 12:40 pm, 杨浩 skzr@gmail.com wrote: Where's the lastest plugin update sites for GAE Plugin? I will to test it! 2010/2/6 Philippe Marschall philippe.marsch...@gmail.com Sounds like a good start. Ideally the maven eclipse plugin [1] could be configured to automatically generate the configuration for the Google Plugin and M2Eclipse [2] picking that up as well. Also an archetype would help quick starting. I assume you're aware that you get the most benefit out of that only when there are up to date Maven artifacts wit good metadata in a publicly available repo, preferably Maven central. [1]http://maven.apache.org/eclipse-plugin.html [2]http://m2eclipse.sonatype.org/ Cheers Philippe -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Question on request duration / quota / HardDeadlineExceededError
You should be able to catch a DeadlineExceededException and have ~400ms in which to return from your request before a HardDeadlineExceededError is thrown. Are you sure that you are not catching and ignoring the DeadlineExceededException? If so, can you create a small reproducible test case for this? On Mon, Feb 8, 2010 at 12:22 PM, Moritz mor...@cloudme.org wrote: Hello everyone, in my application I have a scheduled task that runs every 5 minutes to update the cache. Currently it is a brute force implementation, that runs through all entities and computes all permutations required. This task usually takes longer than 30 seconds - and fails almost every time with a HardDeadlineExceededError. My problem is, that all available information currently is not clear about how to handle these errors. Maybe I missed it, but: - The documentation is only about bandwidth, number of requests, API calls etc. - The API provides methods to measure number of CPU cycles (getCpuTimeInMegaCycles()), but doesn't warn about reaching the limit - In the discussion group I find some information such as maximum duration of 30 seconds for each request, but that is actually quite unspecific. - HardDeadlineExceededError is not documented in the API docs. Somewhere I read that a DeadlineExceededException should be thrown before - but I catch any Exception and still produce a HardDeadlineExceededError Of course, I could now just use a timer to run my job and terminate it gracefully shortly before 30 seconds are reached. But I'd prefer a better, more predictable and reliable option. Any suggestions? Thanx, Moritz -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Question on request duration / quota / HardDeadlineExceededError
HDEEs can be thrown without a DEE if it happens in your own code. Usually the most time consuming thing is waiting for API calls to return so a timeout here will result in the API call stopping with a DEE. So if you do not call the API often you can hit HDEE directly. I also have long running tasks that iterate through data processing and storing results. I use an Iterator that stops returning results after 20 seconds and saves the last object processed and then kicks off a new task to continue processing. My original solution caught the DEE and then cleaned up but this stopped working reliably. On 9 Feb 2010, at 01:22, Moritz wrote: Hello everyone, in my application I have a scheduled task that runs every 5 minutes to update the cache. Currently it is a brute force implementation, that runs through all entities and computes all permutations required. This task usually takes longer than 30 seconds - and fails almost every time with a HardDeadlineExceededError. My problem is, that all available information currently is not clear about how to handle these errors. Maybe I missed it, but: - The documentation is only about bandwidth, number of requests, API calls etc. - The API provides methods to measure number of CPU cycles (getCpuTimeInMegaCycles()), but doesn't warn about reaching the limit - In the discussion group I find some information such as maximum duration of 30 seconds for each request, but that is actually quite unspecific. - HardDeadlineExceededError is not documented in the API docs. Somewhere I read that a DeadlineExceededException should be thrown before - but I catch any Exception and still produce a HardDeadlineExceededError Of course, I could now just use a timer to run my job and terminate it gracefully shortly before 30 seconds are reached. But I'd prefer a better, more predictable and reliable option. Any suggestions? Thanx, Moritz -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Dynamic properties (Expando model) possible with Java?
To add properties to classes at runtime, you need to build your classes dynamically, and then enhance them, and define the metadata for them dynamically too. All been done before, see this link http://www.jpox.org/servlet/wiki/pages/viewpage.action?pageId=6619188 -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Image API Transparency cut
Hey all, I'm trying to take a PNG that has all pixels filled with nothing transparent, and cut out part of that image along a predefined mask. So I would end up with an image that is part transparent and part filled. Is this possible with the Image API? The only way I'm able to punch out pixels of an originating image appears to be with a full color value not a transparent pixel. Thanks, -Casey -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] What is the most optimal way to delete and create objects in the datastore?
Hi, I am kind of new to GAE, and I was wondering if someone has statistics or data that shows what are the most optimal (efficient) ways for deleting and creating objects in the Datastore. I did some small experiments in order to identify a more efficient mechanism to delete and create objects in the datastore. In these tests, I have a single persistent object that contains 8 persistent fields. In the first test, I have a loop of 150 instances, and at each iteration I create the persistent object, and I call the makePersistent function to add the single instance to the datastore. This should take much longer, and it does. It takes on average 16-17 seconds. In the second test, the loop only creates the 150 objects, and then outside the loop, I call the makePersistentAll function, passing all my collection of objects. As it is mentioned in the documentation, this is supposed to be faster, and it is. It takes on average 1-2 seconds. I have experimented only with one way for deleting objects. Basically, I make a query to retrieve ONLY the keys of my objects. Query query = pm.newQuery(select objectKey from + objectClass.getName()); keys = (ListKey) query.execute(); Then, once all keys have been retrieved, I call the following service method: DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); ds.delete(keys); To delete the objects. It takes on average 2-4 seconds to delete 150 instances. I was just wondering if I am missing something, and if there is a more efficient way for deleting (or creating) objects in the datastore. I see also that there is a higher variance in deleting objects than in creating them. For example, the fastest run in my test took 1.6 seconds to delete the 150 instances, while the slowest run took almost 8 seconds. I do not see this variability when I create the objects (i.e., when I add them to GAE). Any advice or suggestions on alternative methods for doing these kinds of operations in GAE is GREATLY APPRECIATED. Or, If I am in the right track, please let me know. THANKS A LOT. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Seeing owned/child entities in the datastore viewer
Sounds like a pretty cool feature. Go ahead and add it to our feature request list: http://code.google.com/p/googleappengine/issues/list?can=2q=datastore+viewer On Tue, Feb 2, 2010 at 8:10 PM, Daniel Benamy dben...@gmail.com wrote: Hi, I'm trying to find a way to see the relationships between entities in the data store viewer. If I have: class A { B foo; } and I'm looking at an instance of A in the data store viewer, is there any way for me to find its B? I feel like this should be pretty simple and maybe I'm just missing something dumb but I've searched a bunch and can't figure this out. I know I can work backwards and find a parent from its child by decoding its key. But my app can obviously go the other way and it would make my life easier if I could too. Can anyone help? Thanks, Dan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: JDO model issue
I agree with Jake; relationships are tricky. Likewise with his pointing out that having race be in two Results will be a problem; that won't fly. Another way would be to have a ListResult in Race, and add your Results to that. But you're still going to have parenting problems when you have the same runner in different races; that's where I'd store the Runner's Key in the Result. Having the Result query the datastore seems odd to me; I was thinking of doing that but it seems to me that these persistent objects ought to be fairly simple data transfer objects and shouldn't be doing that. The DAO does the datastore interactions. If you were doing the fully layered way, with domain objects (that is, these data transfer objects), DAOs, and a service layer, I could see the service layer calling the DAOs, and then it calls the setters on the domain objects to fill in the missing stuff, like the Race in the Result here. But that seems dirty to me; shouldn't the ORM be doing this for us? Jake wrote: Hey, Relationships in GAE are a bit picky. It is my understanding that you can only persist children by way of persisting their parents. So, in your case, both Race and Runner are children of Result and you would only persist the two result objects - the dependent children would be persisted automatically. I'm willing to bet, though, that a single race object cannot be the child of two different parent objects, though I'm not certain. The details are all here: http://code.google.com/appengine/docs/java/datastore/relationships.html For the most part, I've found that parent/child relationships are only useful when the two are highly related - usually when I'm extending a class to provide more data. (e.g. Race - RaceDetails). The easy way to get around this is to store the objects in unowned relationships, referencing other objects by IDs as described in http://code.google.com/appengine/docs/java/datastore/relationships.html#Unowned_Relationships. Then, with some fancy getters/setters that automatically query the Datastore, you end up with the same result. See my example below. If anyone has any other advice, though, please contribute. I haven't found a great way to handle this and I'm trying to avoid using GAE specific libraries to help. Jake public class Race { private Key id; ... } public class Result { private Key id; private Key raceId; public Race getRace() { //query datastore with getObjectById(Race.class, raceId); } } On Feb 6, 7:15 pm, Rodolphe rde...@gmail.com wrote: Hello, I am very new to appengine, and I am trying a very basic model exemple: A Race class is linked to a Runner class through a Result class When I am running the folloging code (the full code is attached): Race race = new Race(Paris, new Date(), 10); Runner runner1 = new Runner(Smith); Runner runner2 = new Runner(John); Result result1 = new Result(race, runner1, 1); Result result2 = new Result(race, runner2, 2); PersistenceManager pm = PMF.get().getPersistenceManager(); try { race = pm.makePersistent(race); runner1 = pm.makePersistent(runner1); runner2 = pm.makePersistent(runner2); pm.makePersistent(result1); pm.makePersistent(result2); } finally { pm.close(); } I get the following error: Detected attempt to establish Result(4) as the parent of Runner(2) but the entity identified by Runner(2) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. org.datanucleus.store.appengine.FatalNucleusUserException: Detected attempt to establish Result(4) as the parent of Runner(2) but the entity identified by Runner(2) has already been persisted without a parent. A parent cannot be established or changed once an object has been persisted. at org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:204) at org.datanucleus.store.appengine.DatastoreRelationFieldManager$1.setObjectViaMapping(DatastoreRelationFieldManager.java:125) at org.datanucleus.store.appengine.DatastoreRelationFieldManager$1.apply(DatastoreRelationFieldManager.java:104) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:78) at org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:812) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProcess(DatastorePersistenceHandler.java:288) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:241) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:225) at
[appengine-java] Re: Persistence with JPA + GAE
Hello, The Google Datastore has four ways that you can store a Primary Key ID: String, Long, and two variations on Google's own Key object. If you want to create a parent/child relationship between two persisted objects (in your case, evento is the parent and distritos is the child), then you need to use Google's Key object as the primary ID. See: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys If the class is used as a child class in a relationship, the key field must be of a type capable of representing an entity group parent: either a Key instance, or a Key value encoded as a string. So, you have two options: 1. Change your Long id values to Key id values. 2. Instead of storing private distritos distrito directly in your evento object, store a reference to the id: private Long distrito_id Jake On Feb 6, 4:06 pm, chevelle jvall...@vnperu.com wrote: Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter(idDistrito)); response.setContentType(text/html); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery(SELECT d FROM distritos d WHERE d.id = :codigo); q.setParameter(codigo,id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write(ok); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! Johan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Persistence with JPA + GAE
hi jake, thank for you answer i will try you suggestion and i will tell later El 08/02/2010 03:37 p.m., Jake escribió: Hello, The Google Datastore has four ways that you can store a Primary Key ID: String, Long, and two variations on Google's own Key object. If you want to create a parent/child relationship between two persisted objects (in your case, evento is the parent and distritos is the child), then you need to use Google's Key object as the primary ID. See: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys If the class is used as a child class in a relationship, the key field must be of a type capable of representing an entity group parent: either a Key instance, or a Key value encoded as a string. So, you have two options: 1. Change your Long id values to Key id values. 2. Instead of storing private distritos distrito directly in your evento object, store a reference to the id: private Long distrito_id Jake On Feb 6, 4:06 pm, chevellejvall...@vnperu.com wrote: Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter(idDistrito)); response.setContentType(text/html); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery(SELECT d FROM distritos d WHERE d.id = :codigo); q.setParameter(codigo,id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write(ok); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! Johan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Localization parameters
I saw this blog post the other day (It was posted on our Twitter account): http://blog.jteam.nl/2010/02/04/free-java-hosting-with-the-google-app-engine/ The tip is to add this to your web.xml: context-param param-namejavax.servlet.jsp.jstl.fmt.timeZone/param-name param-valueGMT+1:00/param-value /context-param http://blog.jteam.nl/2010/02/04/free-java-hosting-with-the-google-app-engine/Does this do what you need? 2010/2/3 Grégoire Galinand gregoire.galin...@gmail.com Hi, i've got a little problem with localization settings when i deploy my applications. I'm in france and when i format a date with a simpledateformat, i've got a offset of 2 hours with my french clock. How can i define my localizations parameters for my application ? Thanks Grégoire -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Is there an equivalent of Python GeoModel project in Java?
Looks like someone ported the Python code to Java for GeoHash: http://stackoverflow.com/questions/2060219/google-app-engine-geohashing Also seems like a pretty good explanation of GeoHashing in general. On Thu, Feb 4, 2010 at 10:16 AM, mianor lefebvre.rom...@gmail.com wrote: Hi, I am trying to implement geolocation search with GAE in Java using GeoPt. But due to restrictions on Datastore, bounding box queries are also not supported in App Engine because there need to be two inequalities on two independent properties (latitude and longitude). There seems to be a solution with Geohash but every thing I found is based on GAE Python. Is there anything based on Java or can I use Geomodel (http://code.google.com/p/geomodel/) from Python in my Java applications? Thanks for your help! Romain -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Where to report server down time?
What does the server log report at this time? Can you post a stack trace? On Fri, Feb 5, 2010 at 6:20 AM, Bob F robertfolke...@gmail.com wrote: I tried to open http://folkertsfotografie.appspot.com and recieved Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. several times. I followed the link to an app engine page, hoping that it would be a form to tell either Google or the author (me) that the application was down. Is this a frequent occurrence with AppEngine? Is there a log of application failures like this? Eventually, the application can up (with no change in code). My application is written in Grails with the AppEngine plugin. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Getting the client's timezone
This can be done with JavaScript: http://stackoverflow.com/questions/768007/how-to-detect-user-time-zone-in-sign-up-forms This is basically what your link describes. It's not an issue with Java but with HTTP in general. This doesn't solve the case of a traveling user if they don't set their clock correctly. On Sat, Feb 6, 2010 at 8:22 AM, hsjawanda hsjawa...@gmail.com wrote: Hi, Any ideas on how to get the user's timezone (i.e., the timezone the client is working in)? The closest I've come so far to an answer is: http://j2eecookbook.blogspot.com/2007/06/formatting-date-to-client-timezone.html Does anybody have a better way of accomplishing this? I'd prefer to avoid asking the client to set their timezone as a preference because: * Sign-ups should be as fast as possible. * What if the client is temporarily working from a different timezone? Regards, Harshdeep -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Owned One-to-Many Relationships - query/filter on the associated/child object?
Hi there, How would you query/filter on ContactInfo when you have the Employee. Or better sample if it was Box and a Items, where you only want the yellow items. From: http://code.google.com/appengine/docs/java/datastore/relationships.html#Unowned%5FRelationships ### Employee.java import java.util.List; // ... @Persistent(mappedBy = employee) private ListContactInfo contactInfoSets; ### ContactInfo.java import Employee; // ... @Persistent private Employee employee; Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Localization parameters
may i know does by setting param- namejavax.servlet.jsp.jstl.fmt.timeZone/param-name makes the logs to show timezone we want? or that parameter is only used for jsp-jstl ? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Seeing owned/child entities in the datastore viewer
Thanks for the reply! http://code.google.com/p/googleappengine/issues/detail?id=2745 Dan On Mon, Feb 8, 2010 at 2:48 PM, Ikai L (Google) ika...@google.com wrote: Sounds like a pretty cool feature. Go ahead and add it to our feature request list: http://code.google.com/p/googleappengine/issues/list?can=2q=datastore+viewer On Tue, Feb 2, 2010 at 8:10 PM, Daniel Benamy dben...@gmail.com wrote: Hi, I'm trying to find a way to see the relationships between entities in the data store viewer. If I have: class A { B foo; } and I'm looking at an instance of A in the data store viewer, is there any way for me to find its B? I feel like this should be pretty simple and maybe I'm just missing something dumb but I've searched a bunch and can't figure this out. I know I can work backwards and find a parent from its child by decoding its key. But my app can obviously go the other way and it would make my life easier if I could too. Can anyone help? Thanks, Dan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: jython / modjy FileOutputStream exception
Thanks for your response. I'm using jython 2.5.1 downloaded from jython.org, and using the demo modjy app provided with jython. I'm not modifying it in any way. I can't find any other reports of this problem anywhere on the net - mystifying! Unfortunately I don't have another dev environment on which to try it. Riley On Feb 1, 6:03 am, Alan Kennedy alan.kennedy.n...@gmail.com wrote: [Riley] I'm trying to get jython running with modjy. Following instructions fromhttp://opensource.xhaus.com/projects/modjy/wiki/ModjyGoogleAppEngine but I get the exceptions below. It looks like python is trying to write an initialization file or something. I know a lot about Java but little about Python. Any ideas? Hmm, that's strange; I'll need more information to figure out what's going on. What version of jython are you using? Are you using the demo modjy app provided with jython? If yes, are you modifying it in anyway, e.g. changing the web.xml, etc? Regards, Alan. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] HardDeadlineExceededError with JRuby. Runtime changed??
Hi! May be GAE Runtime is updated to 1.3.1. In my JRuby app, spin up time was longer than before update. I see many HardDeadlineExceededError. Whats happen?? takeru -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Getting Started : Eclipse, GWT, App Engine - Unable to resolve
GWT needs the source code to compile its JavaScript so you cannot use closed source classes like those from App Engine. In these cases you must make a client side transfer object com.mycompany.project.ClientUser and transfer the properties you want to pass to the client. This is normally good practice anyway because you want tight control over what fields and formats are passed over the wire. On 8 Feb 2010, at 23:45, watch wrote: What is need to get Eclipse to compile AppEngine functions: import com.google.appengine.api.users.User; -- Unable to resolve - source code unavailable. One suggestion was to create a super class to fool the GWT compiler but that only gets you so far. I have even gone back to basic and worked through the turorial http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html but the same things happens: ERROR] StockWatcher/src/com/google/gwt/sample/stockwatcher/client/ StockWatcher.java' [ERROR] Line 36: UserService cannot be resolved to a type [ERROR] Line 36: No source code is available for type UserService; did you forget to inherit a required module? [ERROR] Line 36: UserServiceFactory cannot be resolved I know this is a common problem, since there is plenty of refreances to it, but no soloution. This is particularly fustrating as it fails on a basic tutorial. Any Help? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com . To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Getting Started : Eclipse, GWT, App Engine - Unable to resolve
If you add Objectify (http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT) to your project, you will be able to use the datastore basic types (Email, Link, GeoPt, etc) in GWT without any extra effort. This works even if you don't use the Objectify persistence system. Jeff On Mon, Feb 8, 2010 at 8:45 AM, watch webwa...@ektsolutions.com wrote: What is need to get Eclipse to compile AppEngine functions: import com.google.appengine.api.users.User; -- Unable to resolve - source code unavailable. One suggestion was to create a super class to fool the GWT compiler but that only gets you so far. I have even gone back to basic and worked through the turorial http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html but the same things happens: ERROR] StockWatcher/src/com/google/gwt/sample/stockwatcher/client/ StockWatcher.java' [ERROR] Line 36: UserService cannot be resolved to a type [ERROR] Line 36: No source code is available for type UserService; did you forget to inherit a required module? [ERROR] Line 36: UserServiceFactory cannot be resolved I know this is a common problem, since there is plenty of refreances to it, but no soloution. This is particularly fustrating as it fails on a basic tutorial. Any Help? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.