[appengine-java] BlobstoreService fetchData - 2 small fetches or 1 large fetch?
I have an interesting problem with my blob store fetches - I need to fetch 2 chunks of data 5 bytes each that are 1000 bytes apart. From the perspective of the BlobstoreService, is it more efficient for me to make 2 fetchData calls of 5 bytes each or 1 fetchData call of 1010 bytes? Thanks, Keyur -- 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] Updating data class resets data fields
I am storing some persistent data and all is working fine, I have a simple data class per examples provided in the Storing Data section. However, I noticed that all my stored data got reset to null when I added a couple new fields to be stored. To give an example, my employee data class was storing firstName and DOB and had 5 entries. I added two more fields, lastName and isPermanent and found that my earlier 5 entries got reset to null. The new data class is working fine and all new entries are being stored as expected, but I lost existing entries. What am I doing wrong here? Is this expected behavior? How do I ensure that existing data does not get reset when new persistent fields are added to the data class? Please 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] Freemarker - java.lang.VerifyError
I am using freemarker-gae-pre2.jar and I get following error when I deploy to GAE. Its working fine on my local machine I am using spring MVC + freemarker. java.lang.VerifyError: (class: freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: init signature: ()V) Incompatible argument to function at com.google.appengine.runtime.Request.process-814a4fa105eb62da(Request.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.FreeMarkerJspFactory21.class$(FreeMarkerJspFactory21.java:13) at freemarker.ext.jsp.FreeMarkerJspFactory21.clinit(FreeMarkerJspFactory21.java:12) at freemarker.ext.jsp.FreeMarkerPageContext21.clinit(FreeMarkerPageContext21.java:30) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.PageContextFactory.getPageContextImpl(PageContextFactory.java:21) at freemarker.ext.jsp.PageContextFactory.clinit(PageContextFactory.java:15) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:99) at freemarker.core.Environment.visit(Environment.java:286) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Macro$Context.runMacro(Macro.java:172) at freemarker.core.Environment.visit(Environment.java:603) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:256) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233) at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at
Re: [appengine-java] Freemarker: Run local: OK. Run on cloud: Error
Aah, freemarker-gae-pre2.jar won't work either. I got the same error. Asked to freemarker mailing list. Lets see what comes up. Does any one else has any idea? Thanks SN On Tue, Apr 27, 2010 at 11:29 AM, Sudhir Ramanandi sramana...@gmail.comwrote: First of all, Currently normal release of freemarker will not run on GAE as it has dependency on javax.swing package If you solve the problem you just mentioned, sooner or later you will get other problems See this http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-dependency-on-javax-swing/ You will have to download a GAE compatible version of freemarker. see above link for download link. Thanks SN On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen phuongn...@gmail.comwrote: Hi guys: I'm having spring-mvc + apache tiles + freemarker in my Gae Application. Everything works fine in my local machine after several nightmare of trying to figuring out the appropriate version of apache tiles to use. I can recall that I had it successfully run on the cloud few months ago (when the latest version of sdk is still 1.3.1) Funny thing is that, after several improvements and adaptation, I'm now at 1.3.3.1 and my app work fine on local server. However, when I upload it onto the cloud, here is what I got: java.lang.VerifyError: (class: freemarker/ext/jsp/ FreeMarkerJspApplicationContext, method: init signature: ()V) Incompatible argument to function at com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.FreeMarkerJspFactory21.class$ (FreeMarkerJspFactory21.java:13) at freemarker.ext.jsp.FreeMarkerJspFactory21.clinit(FreeMarkerJspFactory21.java: 12) at freemarker.ext.jsp.FreeMarkerPageContext21.clinit(FreeMarkerPageContext21.java: 29) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.PageContextFactory.clinit(PageContextFactory.java: 26) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java: 99) at freemarker.core.Environment.visit(Environment.java:286) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:237) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java: 452) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java: 391) I'm dying. How on earth? I would probably get fired tomorrow. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Freemarker: Run local: OK. Run on cloud: Error
Aah, freemarker-gae-pre2.jar won't work either. I got the same error. Asked to freemarker mailing list. Lets see what comes up. Does any one else has any idea? Thanks SN On Tue, Apr 27, 2010 at 11:29 AM, Sudhir Ramanandi sramana...@gmail.comwrote: First of all, Currently normal release of freemarker will not run on GAE as it has dependency on javax.swing package If you solve the problem you just mentioned, sooner or later you will get other problems See this http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-dependency-on-javax-swing/ You will have to download a GAE compatible version of freemarker. see above link for download link. Thanks SN On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen phuongn...@gmail.comwrote: Hi guys: I'm having spring-mvc + apache tiles + freemarker in my Gae Application. Everything works fine in my local machine after several nightmare of trying to figuring out the appropriate version of apache tiles to use. I can recall that I had it successfully run on the cloud few months ago (when the latest version of sdk is still 1.3.1) Funny thing is that, after several improvements and adaptation, I'm now at 1.3.3.1 and my app work fine on local server. However, when I upload it onto the cloud, here is what I got: java.lang.VerifyError: (class: freemarker/ext/jsp/ FreeMarkerJspApplicationContext, method: init signature: ()V) Incompatible argument to function at com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.FreeMarkerJspFactory21.class$ (FreeMarkerJspFactory21.java:13) at freemarker.ext.jsp.FreeMarkerJspFactory21.clinit(FreeMarkerJspFactory21.java: 12) at freemarker.ext.jsp.FreeMarkerPageContext21.clinit(FreeMarkerPageContext21.java: 29) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.PageContextFactory.clinit(PageContextFactory.java: 26) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java: 99) at freemarker.core.Environment.visit(Environment.java:286) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:237) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java: 452) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java: 391) I'm dying. How on earth? I would probably get fired tomorrow. -- 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] Owned one to many relationship problem when parent was already existed.
Hi. I got tree classes that has one-to-many relationship with each other. A has a child class B (one to many) B has a child class C(one to many) @PersistenceCapable class A { @PrimaryKey @Persistent public Key key; @Persistent(mappedBy = a) @Element(dependent = true) public ListB bList = new ArrayListB(); } @PersistenceCapable class B { @PrimaryKey @Persistent public Key key; @Persistent(mappedBy = b) @Element(dependent = true) public ListC cList = new ArrayListC(); @Persistent public A a; } @PersistenceCapable class C { @PrimaryKey @Persistent public Key key; @Persistent public B b; } and here is my sample code. code does following steps 1)Create an A instance and persist it if it does not exist in datastore 2)get A from DB and add B to its list 3) get B from DB and add C to its list 4) delete B and C from DB PersistenceManager pm = PMF.get().getPersistenceManager(); A a = null; B b = null; C c = null; //1)If A does not exist persist A try{ a = pm.getObjectById(A.class,A);//check if A exist }catch(Exception e){ try { pm.currentTransaction().begin(); a = new A(); a.key = new KeyFactory.Builder(A.class.getSimpleName(),A).getKey(); pm.makePersistent(a); pm.currentTransaction().commit(); log.info(New a was created); } finally { if(pm.currentTransaction().isActive()) pm.currentTransaction().rollback(); } } log.info(id of a is + a.key); //2)get A from DB and add B to its list try { pm.currentTransaction().begin(); A newA = pm.getObjectById(A.class,A); b = new B(); b.key = new KeyFactory.Builder(newA.key).addChild(B.class.getSimpleName(), B).getKey(); newA.bList.add(b); pm.currentTransaction().commit(); log.info(New b was created); } finally { if(pm.currentTransaction().isActive()) pm.currentTransaction().rollback(); } log.info(Key of b + b.key); //3) get B from DB and add C to its list pm.currentTransaction().begin(); try { Key bKey = new KeyFactory.Builder(A.class.getSimpleName(), A).addChild(B.class.getSimpleName(), B).getKey(); B newB = pm.getObjectById(B.class,bKey);//--Error we cannot retrieve B c = new C(); c.key = new KeyFactory.Builder(newB.key).addChild(C.class.getSimpleName(), C).getKey(); newB.cList.add(c); pm.currentTransaction().commit(); log.info(New c was created); } finally { if(pm.currentTransaction().isActive()) pm.currentTransaction().rollback(); } //4) delete B and C from DB pm.currentTransaction().begin(); try { C newC = pm.getObjectById(C.class,c.key); pm.deletePersistent(newC); B newB = pm.getObjectById(B.class,b.key); pm.deletePersistent(newB); pm.currentTransaction().commit(); log.info(b and c was deleted); } finally { if(pm.currentTransaction().isActive()) pm.currentTransaction().rollback(); } first time I run this code it works. here is my log messages INFO: New a was created INFO: id of a is A(A) INFO: New b was created INFO: Key of b A(A)/B(B) INFO: New c was created INFO: b and c was deleted it creates a new A , B and C then in step 4 it deletes B and C when I run it second time I get following an error message javax.jdo.JDOObjectNotFoundException: Could not retrieve entity of kind B with key A(A)/B(B) Problem is, if my parent(A) is already in datastore I cannot add a new child(B). I dont get any error at step2. It seems like B is persisted correctly but when I try to retrive it at step 3( with code pm.getObjectById(B.class,bKey) at line 3 of this step) I cannot retrieve it. and when I check it from admin console I see that it is not persisted. I found this post which says that I have to assign primary keys by hand but it still does not work.
[appengine-java] Re: owned one to many relationship problem
unfortunately I still am having problem. if parent is already persisted it does not work. I have a different post for that one. http://groups.google.com/group/google-appengine-java/browse_thread/thread/a9955f8944a8c520 On Apr 19, 12:27 am, ylmz yilmazhuse...@gmail.com wrote: Hi every body. I have a problem with my model and I cannot figure out what the problem is. So any help would be appreciated. to explain the problem I wrote some sample code: Here is my model: Class A hasonetomanyrelationship with B Class B hasonetomanyrelationship with C @PersistenceCapable(identityType = IdentityType.APPLICATION) class A { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) public Key key; @Persistent(mappedBy = a) @Element(dependent = true) public ListB bList = new LinkedListB(); } @PersistenceCapable(identityType = IdentityType.APPLICATION) class B { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) public Key key; @Persistent(mappedBy = b) @Element(dependent = true) public ListC cList = new LinkedListC(); @Persistent public A a; } @PersistenceCapable(identityType = IdentityType.APPLICATION) class C { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) public Key key; @Persistent public B b; } in my code; 1) I created class A B and C 2) I persisted A 3) I retrieved A from DB and add B to its list. 4) I retrieved B from DB and add C to its list. but in step 4, I cannot retrieve B from DB, instead I get following exception javax.jdo.JDOObjectNotFoundException: Could not retrieve entity of kind B with key B(4). Code : PersistenceManager pm = PMF.get().getPersistenceManager(); //1)Create A,B,C A a = new A(); B b = new B(); C c = new C(); //2)Persist A pm.currentTransaction().begin(); try { pm.makePersistent(a); pm.currentTransaction().commit();} finally { if(pm.currentTransaction().isActive()) pm.currentTransaction().rollback(); } //3)get A from DB and add B to its list pm.currentTransaction().begin(); try { A newA = pm.getObjectById(A.class,a.key.getId()); newA.bList.add(b); pm.currentTransaction().commit();} finally { if(pm.currentTransaction().isActive()) pm.currentTransaction().rollback(); } //4) get B from DB and add C to its list pm.currentTransaction().begin(); try { /Error*/ B newB = pm.getObjectById(B.class,b.key.getId());//we cannot retrieve this object. why? newB.cList.add(c); pm.currentTransaction().commit();} finally { if(pm.currentTransaction().isActive()) pm.currentTransaction().rollback(); } Please note that I am not sure that this is how I suppose to implementownedonetomanyrelationship I got that implementation from following post http://groups.google.com/group/google-appengine-java/browse_thread/th... -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Single Sign on between applications
With a Google Apps Domain (login with user in the domain), it's possible, but for all public application (with google account) the user must sign in for all application. On Apr 26, 11:42 pm, nearm...@gmail.com wrote: You may be able to accomplish this by using sub-domains. For example: my-sso-app.appspot.com blog.my-sso-app.appspot.com forum.my-sso-app.appspot.com I'm not 100% sure but I believe you can share data, and authentication between apps in the same domain. Sent via BlackBerry from T-Mobile-Original Message- From: Ikai L (Google) ika...@google.com Date: Mon, 26 Apr 2010 11:33:10 To: google-appengine-java@googlegroups.com Subject: Re: [appengine-java] Single Sign on between applications Not natively. You may want to look into doing something with OpenID, which may make the process a bit less bothersome, but won't remove the need to login completely. On Sat, Apr 24, 2010 at 11:51 AM, terran terran.le...@gmail.com wrote: Was trying to look around for an answer and couldn't find it, but if I owned several applications, could i create a single sign on page that would log into both applications at the same time? For example, if i had a blog type of web site and I wanted to integrate it with a forum application I had, could I sign into both with 1 screen? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How to deal with large collections of objects?
define Cow as class Cow { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent @Extension(vendorName=datanucleus, key=gae.parent-pk, value=true) private Key farmKey; } If you set farmKey to farm id then both farm and cow will be in the same entity group. this code should work: tx.begin() Farm f = getFarm(); Cow c = new Cow(); c.setFarmKey(f.getId()); f.incCowCounter(); pm.makePersistent(c); //if you need to know new cow id. tx.commit(); Andrey -- 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: Freemarker: Run local: OK. Run on cloud: Error
The fix provided in the blog above some how shoots (or hide???) the inner problem. But the outer problem (cannot create PageContextFactory) is still there. I get this exception after deploy the *fixed* version to the cloud: java.lang.NoClassDefFoundError: Could not initialize class freemarker.ext.jsp.PageContextFactory at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java: 99) at freemarker.core.Environment.visit(Environment.java:286) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:256) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java: 452) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java: 391) I think Google didn't keep a good consistency here. The local GAE should mimic the cloud in at least *stop* bugs like these. I'm just commenting on FreeMarker guy blog. Hope that they can release another fix soon. On Apr 27, 6:20 pm, Sudhir Ramanandi sramana...@gmail.com wrote: Aah, freemarker-gae-pre2.jar won't work either. I got the same error. Asked to freemarker mailing list. Lets see what comes up. Does any one else has any idea? Thanks SN On Tue, Apr 27, 2010 at 11:29 AM, Sudhir Ramanandi sramana...@gmail.comwrote: First of all, Currently normal release of freemarker will not run on GAE as it has dependency on javax.swing package If you solve the problem you just mentioned, sooner or later you will get other problems See this http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-depen... You will have to download a GAE compatible version of freemarker. see above link for download link. Thanks SN On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen phuongn...@gmail.comwrote: Hi guys: I'm having spring-mvc + apache tiles + freemarker in my Gae Application. Everything works fine in my local machine after several nightmare of trying to figuring out the appropriate version of apache tiles to use. I can recall that I had it successfully run on the cloud few months ago (when the latest version of sdk is still 1.3.1) Funny thing is that, after several improvements and adaptation, I'm now at 1.3.3.1 and my app work fine on local server. However, when I upload it onto the cloud, here is what I got: java.lang.VerifyError: (class: freemarker/ext/jsp/ FreeMarkerJspApplicationContext, method: init signature: ()V) Incompatible argument to function at com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.FreeMarkerJspFactory21.class$ (FreeMarkerJspFactory21.java:13) at freemarker.ext.jsp.FreeMarkerJspFactory21.clinit(FreeMarkerJspFactory21.java: 12) at freemarker.ext.jsp.FreeMarkerPageContext21.clinit(FreeMarkerPageContext21.java: 29) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.PageContextFactory.clinit(PageContextFactory.java: 26) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java: 99) at freemarker.core.Environment.visit(Environment.java:286) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:237) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java: 452) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java: 391) I'm dying. How on earth? I would probably get fired tomorrow. -- 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
[appengine-java] Re: How to deal with large collections of objects?
Thanks Andrey, that works perfectly. I wasn't understanding the example in the docs about this: http://code.google.com/appengine/docs/java/datastore/transactions.html section titled Creating Entities With Entity Groups. Your example makes it clear, Thanks On Apr 27, 6:04 am, ailinykh ailin...@gmail.com wrote: define Cow as class Cow { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent @Extension(vendorName=datanucleus, key=gae.parent-pk, value=true) private Key farmKey; } If you set farmKey to farm id then both farm and cow will be in the same entity group. this code should work: tx.begin() Farm f = getFarm(); Cow c = new Cow(); c.setFarmKey(f.getId()); f.incCowCounter(); pm.makePersistent(c); //if you need to know new cow id. tx.commit(); Andrey -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Freemarker: Run local: OK. Run on cloud: Error
Attila has created an issue here http://code.google.com/p/googleappengine/issues/detail?id=3157 Vote for it. Thanks SN On Tue, Apr 27, 2010 at 6:55 PM, Phuong Nguyen phuongn...@gmail.com wrote: The fix provided in the blog above some how shoots (or hide???) the inner problem. But the outer problem (cannot create PageContextFactory) is still there. I get this exception after deploy the *fixed* version to the cloud: java.lang.NoClassDefFoundError: Could not initialize class freemarker.ext.jsp.PageContextFactory at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java: 99) at freemarker.core.Environment.visit(Environment.java:286) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:256) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java: 452) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java: 391) I think Google didn't keep a good consistency here. The local GAE should mimic the cloud in at least *stop* bugs like these. I'm just commenting on FreeMarker guy blog. Hope that they can release another fix soon. On Apr 27, 6:20 pm, Sudhir Ramanandi sramana...@gmail.com wrote: Aah, freemarker-gae-pre2.jar won't work either. I got the same error. Asked to freemarker mailing list. Lets see what comes up. Does any one else has any idea? Thanks SN On Tue, Apr 27, 2010 at 11:29 AM, Sudhir Ramanandi sramana...@gmail.com wrote: First of all, Currently normal release of freemarker will not run on GAE as it has dependency on javax.swing package If you solve the problem you just mentioned, sooner or later you will get other problems See this http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-depen. .. You will have to download a GAE compatible version of freemarker. see above link for download link. Thanks SN On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen phuongn...@gmail.com wrote: Hi guys: I'm having spring-mvc + apache tiles + freemarker in my Gae Application. Everything works fine in my local machine after several nightmare of trying to figuring out the appropriate version of apache tiles to use. I can recall that I had it successfully run on the cloud few months ago (when the latest version of sdk is still 1.3.1) Funny thing is that, after several improvements and adaptation, I'm now at 1.3.3.1 and my app work fine on local server. However, when I upload it onto the cloud, here is what I got: java.lang.VerifyError: (class: freemarker/ext/jsp/ FreeMarkerJspApplicationContext, method: init signature: ()V) Incompatible argument to function at com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.FreeMarkerJspFactory21.class$ (FreeMarkerJspFactory21.java:13) at freemarker.ext.jsp.FreeMarkerJspFactory21.clinit(FreeMarkerJspFactory21.java: 12) at freemarker.ext.jsp.FreeMarkerPageContext21.clinit(FreeMarkerPageContext21.java: 29) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at freemarker.ext.jsp.PageContextFactory.clinit(PageContextFactory.java: 26) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java: 99) at freemarker.core.Environment.visit(Environment.java:286) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:237) at freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java: 452) at freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java: 391) I'm dying. How on earth? I would probably get fired tomorrow. -- 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
[appengine-java] Manually restart GAE on the cloud
Is there any way to manually restart GAE on the cloud? -- 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] Manually restart GAE on the cloud
:D I actually saw a comic strip a while ago about how people will have to change their behavior (ie stop rebooting when they fail to fix something), but I never expected to actually see somebody ask about that. You can't reboot the cloud. Simply redeploy a new version of your application if you think your really screw something that bad (or explore the administration panel)... At least, that would be my guess... On 27 April 2010 16:26, Phuong Nguyen phuongn...@gmail.com wrote: Is there any way to manually restart GAE on the cloud? -- 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. -- Romain PELISSE, The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it -- Terry Pratchett http://belaran.eu/ -- 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] App Engine Down?
We just experienced an outtage that seems to be from Google App Engine for one of our registered app ID's. It lasted for several hours and it seems to be back up again without us making any changes. Has anyone else experienced this? If so, what was the cause? -- 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 Down?
8:55AM Pacific was the last error we saw. Basically, it was throwing DeadlineExceededExceptions quickly all of the time. On Apr 27, 12:11 pm, luijar luis.j.aten...@gmail.com wrote: We just experienced an outtage that seems to be from Google App Engine for one of our registered app ID's. It lasted for several hours and it seems to be back up again without us making any changes. Has anyone else experienced this? If so, what was the cause? -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: gql fetch performance
This is after deployment and not local. The locals fly fast. No issues there. As to your second point- I set the prefetch to 50/100 etc and also chunk size. The limit for the qry is also set to large value. But as you suggested, I will do app stat. On Apr 26, 4:17 pm, Ikai L (Google) ika...@google.com wrote: Are you doing this locally or after deployment? Check out this tool: http://code.google.com/appengine/docs/java/tools/appstats.html http://code.google.com/appengine/docs/java/tools/appstats.htmlYou'll be able to use this to identify bottlenecks. It's possible you're fetched each entity individually, for instance. On Mon, Apr 26, 2010 at 2:40 PM, mandar khadilk mkhad...@gmail.com wrote: BTW, the duration of the query fluctuates a lot. 2 sec to 15 secs. On Apr 26, 10:05 am, mandar khadilk mkhad...@gmail.com wrote: We have been testing gql based datastore performance for a while now. I am very disappointed so for what performance we are getting from our simple un-ordered fetch/get. Here is what we are doing- 1. Make a kind based query with no filter and ordering. We fetch all the entity (not just keys) as we need attributes of the entities too. 2. We use cursors with prefetch of 100 and chunk size 50. 3. Each entity is around 100k We get around 7 sec to 15 secs to prepare the query and iterate over it (100 entities). In the fetch loop, we dont execute much code to consume CPU at all. We also use asQueryResultIterator. My question is, is this a normal performance? Are others getting way better than this? If yes, that is terrible. Is there a way to improve it further? Thanks in advance... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: JSP showing new DB data problem.
Hi, If the previous data is displayed, I clear the browser cash when simply thinking. They might be other causes. I think that it is useful to check the content by log adminconsole. thanks. When data is changed from the DB the JSP shows it to the user. The problem is that the JSP doesn't reload with the new data until I close session and start it again. My flow is like this: USer sign in (start session) - goes to XXX.jsp and fetchs data from the DB - data is changed from the DB - XXX.jsp does not show the new data until I stop session and start it again. How can I make the JSP show me the new data? 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] AJAX on Google App Engine using JAVA
Has anyone used AJAX to enable client RPC requests using JAVA. On the Google App Engine website Paul Peavyhouse does exactly the same thing but he is using Python. Does anyone know how to do the same thing but using JAVA? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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] Writing to a local file in development environment
Due debugging purposes, and only in development environment, I need to manipulate with a text-file. Obviously I ran into following message... access denied (java.io.FilePermission F:\workspace\AppEngine1\war\js\main.js delete) I thought adding the permission to java.policy would cure this, so I modified all three I have on my system*, adding following line to the 'default' grant-block permission java.io.FilePermission F:\\workspace\\AppEngine1\\war\\js\\*, read,write,delete; (I hope the syntax is OK.) But that did not help. :( Which is the proper policy-file to modify? (Does the development server honor them at all?) Or could/should I pass my own by adding - Djava.security.policy=mypolicy switch to run/debug settings in Eclipse? *) I believe the proper one is the one belonging to JRE that is checked under Window - Preferences - Java - Installed JREs. I just wanted to be sure... Regards J. Záruba -- 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: WARNING: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take
Hi Ikai, where can I get a more specific response to this issue? I find it odd something like this would happen in first place (my app hangs for about 7 seconds awaiting for the process to fire up). I tried pinging my app every 2 minutes hoping the process would not go to sleep ... to no effect. Please advise -- this is very frustrating. Andi On Apr 21, 2:33 pm, Ikai L (Google) ika...@google.com wrote: Yep, we're rolling this out slowly with the 1.3.3 release to let developers know that some requests are slow because they are startup requests. On Wed, Apr 21, 2010 at 6:09 AM, Tristan tristan.slomin...@gmail.comwrote: Hey, I started seeing when a task queue starts now: WARNING: 200 OK This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. instead of this WARNING: 500 Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.htmlfor more details. I like it. Is this the expected behavior from now on? Tristan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: apparent appstats bug
As an addendum to my previous note-- when an app is deployed to App Engine, I don't get the appstats 'hang' behaviour of my previous post, in that the servlet response does finish rendering. But, just as with the local development version, the servlets that caused issues with Appstats are not listed at all in the Appstats statistics page for the deployed version. For some reason, these servlets are not getting properly processed by Appstats. This seems especially problematic because the servlets in question, that are not being reported by appstats, are in actuality taking up the largest percentage of resources. (One reason I'm so interested in Appstats is because I'm writing up some info on it that will be published in future. It does seem like it's too buggy to wholeheartedly recommend at the current time...) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Cold starts
Star this? :) http://code.google.com/p/googleappengine/issues/detail?id=2931 On Apr 27, 4:33 am, Richard richard.wat...@gmail.com wrote: My app has a *lot* of cold starts. Sometimes after 2 or 3 minutes, which seems very aggressive. I've let it go, tried to be good and waited for it to improve. Today I tried Pingdom and set it to a minute. Instant improvement. Googleistas, I really, really don't like doing that. I'll likely switch it off because I'm trying to be a good citizen, but the system is really driving bad behaviour - I imagine anyone who vaguely depends on GAE for money is pinging the heck out of their apps. Any chance we're going to get it sorted soon? -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Writing to a local file in development environment
Hi! 2010/4/27 Jaroslav Záruba jaroslav.zar...@gmail.com Due debugging purposes, and only in development environment, I need to manipulate with a text-file. Obviously I ran into following message... access denied (java.io.FilePermission F:\workspace\AppEngine1\war\js\main.js delete) I thought adding the permission to java.policy would cure this, so I modified all three I have on my system*, adding following line to the 'default' grant-block permission java.io.FilePermission F:\\workspace\\AppEngine1\\war\\js\\*, read,write,delete; (I hope the syntax is OK.) But that did not help. :( You could also start a dedicated tomcat with a simple servlet that just receives a http get or post and writes the file for you. Your logging would call this URL instead of writing into the file. As long as it's not pure binary stuff, this should work. If it's binary, you could base64 it for the transport. Sorry for CC'ing you, but I think I am still blocked from posting to this list because I have not been cleared by the list owner yet :-( -- Bye, Patrick Cornelißen http://www.openprojectguide.org http://www.pcornelissen.de http://code.google.com/p/gloudy/ -- 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: Writing to a local file in development environment
On Apr 27, 7:39 pm, Patrick Cornelißen corne...@pcornelissen.de wrote: You could also start a dedicated tomcat yes, the workaround here is easy... but so far i'm looking for a solution, also i must!!!11 know why this is not working, i guess you know that feeling :P thank you anyways Patrick best regards J. Záruba -- Bye, Patrick Cornelißen http://www.openprojectguide.org http://www.pcornelissen.dehttp://code.google.com/p/gloudy/ -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] AJAX on Google App Engine using JAVA
Hi! 2010/4/27 Thato Selebogo mahla...@gmail.com Has anyone used AJAX to enable client RPC requests using JAVA. On the Google App Engine website Paul Peavyhouse does exactly the same thing but he is using Python. Does anyone know how to do the same thing but using JAVA? Maybe I am not understanding you right, but AJAX requests in a java app are more or less just http calls with a decoding step afterwards, depending on your requested content type. Have you checked: http://firestormws.sourceforge.net/ or other libraries that offer for example client side rest support for java? -- Bye, Patrick Cornelißen http://www.openprojectguide.org http://www.pcornelissen.de http://code.google.com/p/gloudy/ -- 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: Writing to a local file in development environment
Hi! 2010/4/27 Jaroslav Záruba jaroslav.zar...@gmail.com On Apr 27, 7:39 pm, Patrick Cornelißen corne...@pcornelissen.de wrote: You could also start a dedicated tomcat yes, the workaround here is easy... but so far i'm looking for a solution, also i must!!!11 know why this is not working, i guess you know that feeling :P Hmm, but what would you write to the file that you wouldn't be able to just dump out using the regular logging facility? -- Mit freundlichen Grüßen, Patrick Cornelißen http://www.openprojectguide.org http://www.pcornelissen.de http://code.google.com/p/gloudy/ -- 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: Can't decide: JDO, Twig-Persist or Objectify?
The advantage of Objectify's key management is the generified Key? class, which helps keep your code straight. Jeff On Mon, Apr 26, 2010 at 5:16 AM, Christian Goudreau goudreau.christ...@gmail.com wrote: I didn't try, but I'm sure that if you set a Key field that doesn't exist in the datastore, it will be stored with the key you wanted. If I recall, store only auto assign a key when the key field is null or doesn't exist. @Key private long id; Christian On Mon, Apr 26, 2010 at 7:59 AM, David Sowerby david.sowe...@virgin.net wrote: Hi Christian That's interesting ... I just felt that I wanted to manage the references (keys) myself, so I could have more control over when and how those references are instantiated - Twig seems to do that for you (great in many ways), but I have some situations with my application where I think that could have a performance impact - I cannot be sure yet, but I wanted to play safe on that. The single developer question is tricky - I suppose it is more risky (he might want a holiday one day!), but on the other hand it is open source. On Apr 25, 1:29 pm, Christian Goudreau goudreau.christ...@gmail.com wrote: I have one question in mind after reading what you wrote, in wich way you have better control in Objectify than Twig ? I'm interested since I moved from Objectify to Twig and didn't end up in that situation, yet. For the cons of only one Developper, he may be alone, but he answer every single one question asked in his mailing list, though righ now he's in only for two weeks. And he works really fast, bug fix are often done in less than two days. Christian On Sun, Apr 25, 2010 at 5:11 AM, David Sowerby david.sowe...@virgin.netwrote: hi jbdhl I wish there was an easy answer too - but I suppose at least we have choice! My experience, which I hope will at least help you a bit For back ground I am transferring a prototype developed using a db4o back end, but had little done for the UI. There are a lot of relationships in the domain layer, and the design was very much OO not RDBMS I started by using JDO thinking it would give me portability. I got it to work, but seemed to end up with some messy code. To be fair, that in part was due to my lack of real understanding of GAE, but I didn't really feel I had achieved portability either - there would still have been changes to make to move elsewhere I therefore abandoned the idea of portability, accepting that I would probably have to re-write the Dao layer anyway, if ever I want to move. I decided that it would be better to spend more time on getting that Dao layer isolated and independent - that would give me reasonable portability without compromising the different strengths of different persistent platforms. I tried Twig - it seemed a good solution, and was certainly easy to set up and use. I found the documentation is bit sparse on property translators, but otherwise I had no real problems. The amount which Twig takes away from you is one of those classic blessing/curse situations - it is a blessing not to have to think about some of the detail, but you lose control. I felt that once I had understood GAE, I may be losing some of benefits by not having enough direct control - for this application. I would certainly consider Twig again for other applications. So I have now migrated to Objectify, which seems fairly straightforward, and I have the level of control I was looking for - with a particular eye on performance since I do not yet have any idea how my application will perform I'm afraid the Twig-Objectify discussions occasionally get a bit like a religious argument, which is a shame because they have both done a great job, but with different approaches - and why not? They serve different needs. You have probably read this already but I found this tremendously useful to understand GAE, which in turn helped me understand the choices I was trying to make (the Objectify reference isn't a plug - it is just a very well written article) http://code.google.com/p/objectify-appengine/wiki/Concepts Good luck - it would be interesting to know what you decide in the end ... On Apr 25, 5:42 am, bufferings bufferi...@gmail.com wrote: Hi I like Slim3.http://sites.google.com/site/slim3appengine/ -- 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 athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received
[appengine-java] Re: apparent appstats bug
Hi, If you look at the logs of your deployed application, do you see any errors, such as an OutOfMemoryError? My current suspicion is that app stats collects so much data (and keeps it in memory) for this request that it runs out of memory before it can persist it. If that is the case, we might be seeing something like that in the error logs. Best regards, Jens On Apr 27, 10:01 am, Dick Johnson d...@infosleuth.net wrote: As an addendum to my previous note-- when an app is deployed to App Engine, I don't get the appstats 'hang' behaviour of my previous post, in that the servlet response does finish rendering. But, just as with the local development version, the servlets that caused issues with Appstats are not listed at all in the Appstats statistics page for the deployed version. For some reason, these servlets are not getting properly processed by Appstats. This seems especially problematic because the servlets in question, that are not being reported by appstats, are in actuality taking up the largest percentage of resources. (One reason I'm so interested in Appstats is because I'm writing up some info on it that will be published in future. It does seem like it's too buggy to wholeheartedly recommend at the current time...) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: WARNING: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take
Hey Andi, It goes something like this as far as I understand it. Your app lives in a process. When requests come in, those requests are handed to the app process to do what it needs to do and send a response. When request A comes in and there are no active processes, the app process starts up (the 7 seconds you see) in order to handle request A. Let's say that while it is handling request A, request B, C, D, and E come in. Because the process is busy handling A, the new requests (B, C, D, and E) are put on a queue. There is some magic calculation that goes on here that involves a few things. If the calculation sees that your process can handle a request very fast, it piles more requests on the queue, so that the queue could be B:C:D:E because it has faith that response will happen in reasonable time. On the other hand, if the calculation sees that your process is taking it's sweet time, it decides to start another process (another 7 seconds you see), and then gives the next request in the queue (B) to that process to ensure that the very last request on the queue - E gets served in reasonable time. After some time period when a process has no requests waiting in the queue, it kills itself. From what I read, it takes on average 1 request per second to keep process from giving up on the world of the living. If you look at the appengine roadmap, reserved instances are there. So pretty soon we'll be able to pay for having a process staying alive to server requests. I may be wrong. Cheers, Tristan On Apr 26, 10:44 pm, AndiMullaraj andimulla...@gmail.com wrote: Hi Ikai, where can I get a more specific response to this issue? I find it odd something like this would happen in first place (my app hangs for about 7 seconds awaiting for the process to fire up). I tried pinging my app every 2 minutes hoping the process would not go to sleep ... to no effect. Please advise -- this is very frustrating. Andi On Apr 21, 2:33 pm, Ikai L (Google) ika...@google.com wrote: Yep, we're rolling this out slowly with the 1.3.3 release to let developers know that some requests are slow because they are startup requests. On Wed, Apr 21, 2010 at 6:09 AM, Tristan tristan.slomin...@gmail.comwrote: Hey, I started seeing when a task queue starts now: WARNING: 200 OK This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. instead of this WARNING: 500 Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.htmlformore details. I like it. Is this the expected behavior from now on? Tristan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Efficient One to Many Relationship
1) yes, that should work just fine (at least in low-level datastore API it does) 2) your key should not be your security / accessibility mechanism, so yes, it should be fine (although using a Long id vs. keyAsString would be prettier). also, you want to make sure you restrict access to your entities by who can see the entity 3) since we're using approach in #1, just add that to your query, where listItem parentKey = listcontainerkey and isProcess=true or whatnot. much easier. On Apr 26, 9:47 pm, Pk prakash...@gmail.com wrote: Hi, I have a parent ListContainer entity with key and name properties. and I have a child ListItem entity with key, name and parentkey properties. The parentkey simply refers to the key in ListContainer. I am building a site where I list the names in listcontainer, and when the user chooses a name, it'll display the top 100 list items. I have three questions 1) I am wondering if it would be efficient in terms of performance if I use the key on child approach. i.e., query the listitem where parentkey = listcontainerkey. 2) While displaying the names of listcontainer, is it safe to pass the keys to the client browser and get it back? 3) The ListItem has an additional property IsProcessed. Now, I want to display only the items which are not processed. Over a period if time, I am expecting lot of listitems per listcontainer. Do you think it would be wise to have the processed items in separate list and delete it from the original? I would very much appreciate your help as I've been struggling with this requirement for long time. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Can't decide: JDO, Twig-Persist or Objectify?
For your information I ended up choosing Objectify. I picked that because... * of its very informative, yet short and elegant, documentation. In fact, it is a far more precise and explanatory description of datastore than in Google's own GAE documentation; * the simple, yet powerful API. I like the fact that its very transparent and faithful to datastore. Twig-Persist aims to simplify some tasks but at the cost of transparency IMO. The below thread gives an example of this with one-to-many references: http://groups.google.com/group/google-appengine-java/browse_thread/thread/f20d922ffecb310c I like when I can control what's going on in performance critical layers like the persistence layer. * there are multiple active developers. Often seen pro-open-source comments like »the one developer problem is mitigated by the fact that you can fix your own bugs/add your own features« is frivolous: I intent to use my resources for developing applications - not for maintaining API's. -- 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: Updating data class resets data fields
any ideas on what I am doing wrong? Please help! On Apr 27, 12:31 am, kghate kgh...@gmail.com wrote: I am storing some persistent data and all is working fine, I have a simple data class per examples provided in the Storing Data section. However, I noticed that all my stored data got reset to null when I added a couple new fields to be stored. To give an example, my employee data class was storing firstName and DOB and had 5 entries. I added two more fields, lastName and isPermanent and found that my earlier 5 entries got reset to null. The new data class is working fine and all new entries are being stored as expected, but I lost existing entries. What am I doing wrong here? Is this expected behavior? How do I ensure that existing data does not get reset when new persistent fields are added to the data class? Please 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Uploading blobs and authentication
Submitted a new feature request for this: http://code.google.com/p/googleappengine/issues/detail?id=3160 == Keyur On Apr 26, 1:57 pm, keyurva keyu...@gmail.com wrote: Currently to upload blobs, the blob store service creates a unique one- time URL that a user can post blobs to. My requirement is that I only want authenticated / authorized users to post blobs in my application. I can achieve this currently if the page that includes the multipart form to upload blobs is in my application. However, I am looking to providing a REST API for my users to upload their blobs. While it is true that the one-time nature of the upload URL mitigates the chances of rogue use but it's still possible. I was wondering if the app engine team can consider a feature where developers can register an upload listener. A standard servlet filter could also potentially do the job. This will give us an opportunity to authenticate / validate / decorate requests before the request gets forwarded to the blob store service. Thanks, Keyur -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Updating data class resets data fields
No, this is not expected behavior. Try rolling back your application and seeing if this still occurs. I suspect something else is wrong - you just need to narrow down the version of your application that causes this to happen. 2010/4/27 Marcos Vinícius Soares mavsoa...@gmail.com I believe this is not allowed. Once you change a class you cannot retrieve the older objects anymore. In this case, you added a field to a class, but, what if you had removed two fields!? How is the framework supposed to treat this!? Try rolling back your class and see if you can retrieve the old objects. I believe you will only be able to get them this way. On Tue, Apr 27, 2010 at 4:22 PM, kghate kgh...@gmail.com wrote: any ideas on what I am doing wrong? Please help! On Apr 27, 12:31 am, kghate kgh...@gmail.com wrote: I am storing some persistent data and all is working fine, I have a simple data class per examples provided in the Storing Data section. However, I noticed that all my stored data got reset to null when I added a couple new fields to be stored. To give an example, my employee data class was storing firstName and DOB and had 5 entries. I added two more fields, lastName and isPermanent and found that my earlier 5 entries got reset to null. The new data class is working fine and all new entries are being stored as expected, but I lost existing entries. What am I doing wrong here? Is this expected behavior? How do I ensure that existing data does not get reset when new persistent fields are added to the data class? Please 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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 Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- 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] Questions about BlobstoreService fetchData and serve
The BlobstoreService has two method using which one can fetch data. The first one being fetchData(blobKey, start, end) = which fetches the subset for a blob. The second being serve(blobKey) Is there a reason why the serve method, does not maintain the same contract as that of fetchData(...) ? What if i wanted to serve a part of the blob ? Should i be using the fetchData(...) instead? My second question is, that if i was fetching partial blobs, what would be more optimal ? a. large number of smaller fetchData requests or one large fetchData request ? Thanks, Rahul -- 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] about count query
Hi all i am using JDO and i want to count the number of entities so which is more efficient using a count quert, eg: select count (this) from User or key only query select id from User then get the count using resultList.size(); by the way , i know that the recommended way on appengine is to precompute but this cannot be done in my case thanks Joe -- 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] persisting primitive list using JPA
Hi all GAE JPA implementation level is version 1 which does not support list of primitives and i want to port my JDO code to JPA so how can i convert @Persistent private ListString tags; to its JPA counterpart which work on appengine as a list property not a blob(not using serialization) and if possible to use a valid JPA annotation in that context as using @Basic on a list is not allowed by the specs and my ide (Intellij) complains thanks Joe -- 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] maximum size of a datastore API call response
Hi all in the doc , section Quotas and Limits i found maximum size of a datastore API call response= 1 MB what does this mean? does it mean that the query result cannot exceed 1 MB , so what about the rest of the result, does the JDO layer take care of this and handle it transparently or what? do i have to calculate anything for my queries or repeat them or page them to cope with this limitation? How exactly this limitation affects my code? another question as of release 1.3.2 the 1000 limitation of query result were gone... so if i want to get the entities from 1500 to 1520 is using the traditional way (in JDO, using the query.range(begin,limit)) uses cursors or do i have to use the cursor api as described in the docs is the default way (without cursors) still get all the results and drop the first 1500 thanks in advance Joe -- 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: Inheritance hierarchy and getExtent
Hey Simith, I am struggling exactly with the same problem. I read manual about inheritance here http://code.google.com/appengine/docs/java/datastore/dataclasses.html#Inheritance So I was pretty sure that JDO inheritance on App Engine works as described in the DataNucleus documentation. First of all, Saving works for me, but I have no idea how to retrieve ListBaseClass :( Any ideas? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Specifying a date filter in a query
Hi, I am new to Java and App engine. I am trying to query data that has been written to the datastore using JDO. I am getting an exception when I try to filter on a Date property: Query query = pm.newQuery(DataPoint.class); query.setFilter( m_tradeDateTime DATETIME(2010, 10,1, 0, 0,0)); ListDataPoint dp = (ListDataPoint)query.execute(); m_tradeDateTime is of type Date. DATE or DATETIME fails when the query is parsed. What is the right way of specifying a date value in a filter? Filtering on a string property works correctly, not sure what is the expected format for specifying a value for a Date type property. Thanks, -Vinay -- 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] Which is more efficient? single query or a key only query followed by batch get
Hi all the title says it all... which one is more efficient in: cpu usage time consumption thanks Joe -- 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: Does AppEngine really include JPA Support
Hi dear it seams that u r new to appengine please take enough time to understand the datastore concepts as it is not a RDBMS and yes appengine JPA code is not 100% portable, you have to do some work (both on the domain layer and the dao layer) to port RDBMS jpa code to appengine and the reverse Joe On Apr 13, 9:38 am, Al Sutton a...@funkyandroid.com wrote: Fromhttp://code.google.com/appengine/docs/java/datastore/usingjpa.html; The App Engine Java SDK includes an implementation of JPA 1.0 for the App Engine datastore. But from a couple of days work I've already found the following things which don't comply with the JPA spec; - Strings can't be used for @Id values (unless you use a GAE specific extension). - Longs can't be used for @Id values for items in a List. - Maps seem totally broken. Trying the example from 9.1.27 of the JPA spec (ejb-3_0-fr-spec-persistence.pdf) generates a method about FK maps being not supported. Did I miss something, or does AppEngine actually not contain an implementation of JPA, but contains a semi-functional work in progress which only provides some features of JPA? Al. -- 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] App Engine downtime TOMORROW, Wed Apr 28 1-2p PDT
App Engine downtime TOMORROW, Wed Apr 28 1-2p PDT (GMT-7) and same time next Wed, May 5 http://groups.google.com/group/google-appengine-downtime-notify/browse_thread/thread/4857b46e4e6ff0f9 please join the downtime notification group to be alerted on all such planned downtimes. all apps will go into read-only mode for tomorrow's downtime as well as next week's. -- 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: Efficient One to Many Relationship
Thank you so much Tristan. I have another question on top of #3. I can query on listitem parentkey = listcontainerkey and isproccess = true. it is easier, yes. but I expect the data to be growing. there;ll be lot of users with all their listitems stored in a single big list, the processed and unprocessed items. Most of the times, I'll query on the parentkey = listcontainerkey and isprocessed = true. Do you think it's still efficient in terms of performance? On Apr 28, 12:51 am, Tristan tristan.slomin...@gmail.com wrote: 1) yes, that should work just fine (at least in low-level datastore API it does) 2) your key should not be your security / accessibility mechanism, so yes, it should be fine (although using a Long id vs. keyAsString would be prettier). also, you want to make sure you restrict access to your entities by who can see the entity 3) since we're using approach in #1, just add that to your query, where listItem parentKey = listcontainerkey and isProcess=true or whatnot. much easier. On Apr 26, 9:47 pm, Pk prakash...@gmail.com wrote: Hi, I have a parent ListContainer entity with key and name properties. and I have a child ListItem entity with key, name and parentkey properties. The parentkey simply refers to the key in ListContainer. I am building a site where I list the names in listcontainer, and when the user chooses a name, it'll display the top 100 list items. I have three questions 1) I am wondering if it would be efficient in terms of performance if I use the key on child approach. i.e., query the listitem where parentkey = listcontainerkey. 2) While displaying the names of listcontainer, is it safe to pass the keys to the client browser and get it back? 3) The ListItem has an additional property IsProcessed. Now, I want to display only the items which are not processed. Over a period if time, I am expecting lot of listitems per listcontainer. Do you think it would be wise to have the processed items in separate list and delete it from the original? I would very much appreciate your help as I've been struggling with this requirement for long time. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Efficient One to Many Relationship
Btw, I am not going to get all the isprocessed=true records at once. I'll get only the top 100 at any given time. On Apr 28, 7:05 am, Pk prakash...@gmail.com wrote: Thank you so much Tristan. I have another question on top of #3. I can query on listitem parentkey = listcontainerkey and isproccess = true. it is easier, yes. but I expect the data to be growing. there;ll be lot of users with all their listitems stored in a single big list, the processed and unprocessed items. Most of the times, I'll query on the parentkey = listcontainerkey and isprocessed = true. Do you think it's still efficient in terms of performance? On Apr 28, 12:51 am, Tristan tristan.slomin...@gmail.com wrote: 1) yes, that should work just fine (at least in low-level datastore API it does) 2) your key should not be your security / accessibility mechanism, so yes, it should be fine (although using a Long id vs. keyAsString would be prettier). also, you want to make sure you restrict access to your entities by who can see the entity 3) since we're using approach in #1, just add that to your query, where listItem parentKey = listcontainerkey and isProcess=true or whatnot. much easier. On Apr 26, 9:47 pm, Pk prakash...@gmail.com wrote: Hi, I have a parent ListContainer entity with key and name properties. and I have a child ListItem entity with key, name and parentkey properties. The parentkey simply refers to the key in ListContainer. I am building a site where I list the names in listcontainer, and when the user chooses a name, it'll display the top 100 list items. I have three questions 1) I am wondering if it would be efficient in terms of performance if I use the key on child approach. i.e., query the listitem where parentkey = listcontainerkey. 2) While displaying the names of listcontainer, is it safe to pass the keys to the client browser and get it back? 3) The ListItem has an additional property IsProcessed. Now, I want to display only the items which are not processed. Over a period if time, I am expecting lot of listitems per listcontainer. Do you think it would be wise to have the processed items in separate list and delete it from the original? I would very much appreciate your help as I've been struggling with this requirement for long time. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Specifying a date filter in a query
http://www.datanucleus.org/products/accessplatform_2_0/jdo/jdoql.htmlExample 3 is the right answer for you. It might be better if you could go through document to have an understanding on its concepts first. Thanks. On Wed, Apr 28, 2010 at 1:36 AM, Vinay vinaytand...@gmail.com wrote: Hi, I am new to Java and App engine. I am trying to query data that has been written to the datastore using JDO. I am getting an exception when I try to filter on a Date property: Query query = pm.newQuery(DataPoint.class); query.setFilter( m_tradeDateTime DATETIME(2010, 10,1, 0, 0,0)); ListDataPoint dp = (ListDataPoint)query.execute(); m_tradeDateTime is of type Date. DATE or DATETIME fails when the query is parsed. What is the right way of specifying a date value in a filter? Filtering on a string property works correctly, not sure what is the expected format for specifying a value for a Date type property. Thanks, -Vinay -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Which is more efficient? single query or a key only query followed by batch get
In my previous test, query is faster. -- keakon 2010/4/28 Joe Fawzy joewic...@gmail.com: Hi all the title says it all... which one is more efficient in: cpu usage time consumption thanks Joe -- 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: Manually restart GAE on the cloud
:)) Sorry if I used the wrong word. I mean restart my JVM. Since each app will be allocated some JVMs, which run on some servers, I wonder if I can reboot them. It is not an ideal solution, certainly, when you are talking about error-tolerance and scaling. However, during some phase of development, the behavior of your app become unpredictable on someway and we need a way to reset the app to get to certain stable state or try to figure out the problem. Deploy a new version can restart my JVM? May be not. Recently, I get an VerifyError error while my FreeMarker engine try to instantiate a class named FreeMarkerJspApplicationContext. In subsequence request, FreeMarker always throw java.lang.NoClassDefFoundError (without any reference to VerifyError), so I guess GAE JVM some how cached the class definition. I modified the version number and redeploy and guess what, the behavior of FreeMarker engine is just like the JVM is never restarted. I tried after 10 hours and now it is showing VerifyError. You just never know, 'till you jump into the mess. I believe such feature is nice to have, though. On Apr 27, 10:50 pm, Romain Pelisse bela...@gmail.com wrote: :D I actually saw a comic strip a while ago about how people will have to change their behavior (ie stop rebooting when they fail to fix something), but I never expected to actually see somebody ask about that. You can't reboot the cloud. Simply redeploy a new version of your application if you think your really screw something that bad (or explore the administration panel)... At least, that would be my guess... On 27 April 2010 16:26, Phuong Nguyen phuongn...@gmail.com wrote: Is there any way to manually restart GAE on the cloud? -- 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. -- Romain PELISSE, The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it -- Terry Pratchetthttp://belaran.eu/ -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] about count query
On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy joewic...@gmail.com wrote: select count (this) from User Since when app engine support group operation? ;-) On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy joewic...@gmail.com wrote: Hi all i am using JDO and i want to count the number of entities so which is more efficient using a count quert, eg: select count (this) from User or key only query select id from User then get the count using resultList.size(); by the way , i know that the recommended way on appengine is to precompute but this cannot be done in my case thanks Joe -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Manually restart GAE on the cloud
In the Admin Console you can disable your application and re-enable it. I think it is much like a JVM reboot. -- 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: Manually restart GAE on the cloud
I think disable/enable your app doesnot reboot JVM. I'm trying FreeMarker. If JVM process a class for the first time, then VerifyError is thrown. On second time, it throw NoClassDefFoundError. When I disabled and reenabled, JVM still throws NoClassDefFoundError. So I guess JVM is not restarted. On Apr 28, 10:00 am, Thomas mylee...@gmail.com wrote: In the Admin Console you can disable your application and re-enable it. I think it is much like a JVM reboot. -- 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 athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Manually restart GAE on the cloud
Delete the version and redeploy, maybe? Or should Google hep you look into your case, as App Engine user do not have such direct control on their system to reboot. On Wed, Apr 28, 2010 at 10:54 AM, Phuong Nguyen phuongn...@gmail.comwrote: I think disable/enable your app doesnot reboot JVM. I'm trying FreeMarker. If JVM process a class for the first time, then VerifyError is thrown. On second time, it throw NoClassDefFoundError. When I disabled and reenabled, JVM still throws NoClassDefFoundError. So I guess JVM is not restarted. On Apr 28, 10:00 am, Thomas mylee...@gmail.com wrote: In the Admin Console you can disable your application and re-enable it. I think it is much like a JVM reboot. -- 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 athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- 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] cc sender
Is it possible to send an email via Transport.send without it sending a CC: to the FROM: address? -- 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] VerifyError on no-op default constructor
Can anyone from google explain what java.lang.VerifyError: (class: freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: init signature: ()V) Incompatible argument to function, means? See the issue http://code.google.com/p/googleappengine/issues/detail?id=3157 I have attached the source of class FreeMarkerJspApplicationContext here. The line that throws above error is FreeMarkerJspApplicationContext.class. getName(); What's wrong with this class? The class doesn't seems to have any thing unusual. Why this weird behavior? Seems google will never let freemarker to run on GAE Thanks SN -- 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. FreeMarkerJspApplicationContext.java Description: Binary data
[google-appengine] db.Expando not working with new SDK 1.3.3
With new SDK i'm getting this error when working with db.Expando models. It gives this error on simple get. My application stop working after this update. Any ideas? I still can see data in Data Viewer. I'm getting this error on production. File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1028, in get_by_key_name return get(keys[0], rpc=rpc) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1255, in get model = cls1.from_entity(entity) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1179, in from_entity instance = cls(None, _from_entity=True, **entity_values) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1403, in __init__ setattr(self, prop, value) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1435, in __setattr__ super(Expando, self).__setattr__(key, value) AttributeError: can't set attribute -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Invalid IP or statistic. Blacklist bug?
It seems to be internal ip-addresses for task queues On 27 апр, 11:45, buger leons...@gmail.com wrote: i also see this IP 0.1.0.1 On Apr 27, 11:41 am, buger leons...@gmail.com wrote: What is this IP 0.1.0.2?http://goo.gl/uxnz For my services it's like DoS attack ) -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: data structure to implement some of your friends also like this feature.
I'm interested in hearing thoughts on this as well. Herbert: I had a similar problem sometime ago and I solved it by using a single ListProperty with custom prefixes to distinguish between fields of different types. So in your example, I would have used a prefix f.. to represent a friend and l.. to represent a like. So you would filter Users by friendlikes (one list property instead of two separate ones) == f..me l..A. On Apr 26, 7:20 pm, Herbert herber...@gmail.com wrote: Sorry, suddenly got a thought on it. Can I do two equality check on both User.friends and User.likes ? would that be cause an exploding index? I.E. User.all().filter(friends =, me).filter(likes =, A).fetch(3) thanks! Herbert -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: problem with memcache
Replace net.sf.jsr107 in the import statements by javax.cache On Apr 19, 9:46 am, RockyWolf jamesisaa...@gmail.com wrote: I get this error when I try to run my app: com.scrapbook.CacheException: Class: 'ri.cache.BasicCacheFactory' does not implement CacheFactory I had included all the necessary jar files in the src folder as the compiler doesnt recognise them if put in net.sf.jsr107. I don't understand why it says the import net cannot be resolved . Has anyone faced this problem? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: db.Expando not working with new SDK 1.3.3
That was my mistake but previous versions of SDK it ignored) On 27 апр, 12:14, buger leons...@gmail.com wrote: With new SDK i'm getting this error when working with db.Expando models. It gives this error on simple get. My application stop working after this update. Any ideas? I still can see data in Data Viewer. I'm getting this error on production. File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1028, in get_by_key_name return get(keys[0], rpc=rpc) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1255, in get model = cls1.from_entity(entity) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1179, in from_entity instance = cls(None, _from_entity=True, **entity_values) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1403, in __init__ setattr(self, prop, value) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1435, in __setattr__ super(Expando, self).__setattr__(key, value) AttributeError: can't set attribute -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: db.Expando not working with new SDK 1.3.3
BTW, it was becouse i had @propery as function, defined in class, with same name of db.Expando property. I just renamed my function. On Apr 27, 2:32 pm, buger leons...@gmail.com wrote: That was my mistake but previous versions of SDK it ignored) On 27 апр, 12:14, buger leons...@gmail.com wrote: With new SDK i'm getting this error when working with db.Expando models. It gives this error on simple get. My application stop working after this update. Any ideas? I still can see data in Data Viewer. I'm getting this error on production. File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1028, in get_by_key_name return get(keys[0], rpc=rpc) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1255, in get model = cls1.from_entity(entity) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1179, in from_entity instance = cls(None, _from_entity=True, **entity_values) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1403, in __init__ setattr(self, prop, value) File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 1435, in __setattr__ super(Expando, self).__setattr__(key, value) AttributeError: can't set attribute -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: data structure to implement some of your friends also like this feature.
Krishna: i see what you mean. so instead of querying for two lists you do a prefixed self-join. i quickly test my version that queries two lists that actually works fine, but i don't have a big test case yet. coz anything bigger than thousand rows slows down in the dev server even for simple query anyway, and i haven't had time to try that on the production server yet. i reall don't need sorting, so i'm happy as long as i could get some of the results safely and quickly after reading your approach i was thinking, that it shoudlnt make a difference querying the same list twice or two lists once. recalling the zig-zag search in the building scalable apps talk, since both versions mentioned above have two equality filters, it seems the query will perform the same 'zig-zag' search, just on different values. thanks much! On Apr 27, 5:16 pm, Krishna shrikrishna.sh...@gmail.com wrote: I'm interested in hearing thoughts on this as well. Herbert: I had a similar problem sometime ago and I solved it by using a single ListProperty with custom prefixes to distinguish between fields of different types. So in your example, I would have used a prefix f.. to represent a friend and l.. to represent a like. So you would filter Users by friendlikes (one list property instead of two separate ones) == f..me l..A. On Apr 26, 7:20 pm, Herbert herber...@gmail.com wrote: Sorry, suddenly got a thought on it. Can I do two equality check on both User.friends and User.likes ? would that be cause an exploding index? I.E. User.all().filter(friends =, me).filter(likes =, A).fetch(3) thanks! Herbert -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: data structure to implement some of your friends also like this feature.
Hi Herbert, A query like this will use the merge join strategy by default. If it's too slow for the merge join strategy, you could have to build a custom index for it, which would indeed be 'exploding' - each User entity would have len(friends)*len(likes) index entries. -Nick On Mon, Apr 26, 2010 at 3:20 PM, Herbert herber...@gmail.com wrote: Sorry, suddenly got a thought on it. Can I do two equality check on both User.friends and User.likes ? would that be cause an exploding index? I.E. User.all().filter(friends =, me).filter(likes =, A).fetch(3) thanks! Herbert -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Got CAS client working with appengine (java)
Hi ! Just wanted to let you know, I was able to use CAS client (http:// www.jasig.org/cas) with AppEngine. So I'll write the few steps here, in case anyone look for it when searching on Google ;-) First, I followed these steps : http://www.ja-sig.org/wiki/display/CASC/Configuring+the+JA-SIG+CAS+Client+for+Java+in+the+web.xml I downloaded cas-client-3.1.10 here : http://www.ja-sig.org/downloads/cas-clients/cas-client-3.1.10-release.zip I only used cas-client-core. However, I had to make some changes to one of the classes : org.jasig.cas.client.util.AbstractConfigurationFilter . This is because the filter tries to instanciate an InitialContext() to find parameters in the context. Appengine does not seem yet to allow instanciation of InitialContext. So I changed the following file : cas-client-3.1.10-release\cas-client-3.1.10\cas-client-core\src\main \java\org\jasig\cas\client\util\AbstractConfigurationFilter.java and removed some code in the middle : *** protected final String getPropertyFromInitParams(final FilterConfig filterConfig, final String propertyName, final String defaultValue) { final String value = filterConfig.getInitParameter(propertyName); if (CommonUtils.isNotBlank(value)) { log.info(Property [ + propertyName + ] loaded from FilterConfig.getInitParameter with value [ + value + ]); return value; } final String value2 = filterConfig.getServletContext().getInitParameter(propertyName); if (CommonUtils.isNotBlank(value2)) { log.info(Property [ + propertyName + ] loaded from ServletContext.getInitParameter with value [ + value2 + ]); return value2; } // ** CODE REMOVED HERE log.info(Property [ + propertyName + ] not found. Using default value [ + defaultValue + ]); return defaultValue; } *** I then repackaged cas-client : cd cas-client-3.1.10/cas-client-core mvn package -Dmaven.test.skip I added cas-client-3.1.10/cas-client-core-patched/target/cas-client- core-3.1.10.jar to my GAE project. Then it's just a matter a configuring your web.xml to work with CAS, as with any other CASsified app. If you have any questions, please let me know. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Can an app access the Program Files on the host machine
On Apr 26, 7:11 pm, Hanh mercury24...@gmail.com wrote: I'm trying to create an app on the cloud, and it needs to launch a program from the Program Files on the host machine. I tried it with Windows Azure, and they do not allow this access. I just wonder if I can do this with Google App Engine? Thanks a lot! What exactly do you mean by Program Files? Almost certainly the answer is no, but it would help if you could clarify exactly what you're trying to 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Getting around transactions for same entity group restrictions?
Hi, I have a User class in my project, and I can't find a transactionally safe method of creating relationships between users, because User objects are always in their own entity group. The simplest example I can come up with is a follow relationship (like twitter). When a user follows another, both User objects should be made aware of the relationship: class User { int mNumFollowing; int mNumFollowers; } class Follow { String mUsernameFollowed; String mUsernameFollower; } Since both User objects involved are root entities, I can't use a transaction to safely build the relationship. Ideally: tx.begin(); Follow follow = new Follow( userJoe.getUsername(), userJane.getUsername()); pm.makePersistent(follow); userJoe.mNumFollowing++; pm.makePersistent(userJoe); userJane.mNumFollowers++; pm.makePersistent(userJane); tx.commit(); I can make the Follow class an entity child of User, still the relationship can't be done in a single transaction: tx.begin(); userJoe.mNumFollowing++; pm.makePersistent(followForJoe); pm.makePersistent(userJoe); tx.commit(); tx.begin(); userJane.mNumFollowing++; pm.makePersistent(followForJane); pm.makePersistent(userJane); tx.commit(); the first transaction could succeed, and the second fail, leaving me with a half-completed follow relationship. What's the best way around same-entity-group-for-transactions in a situation like this? Do we just have to deal with the fact that our data might be incorrect? I could make User objects all children of a single entity group, but that would probably be awful for performance as every User object in the datastore would have to be locked to do a transaction (just guessing, I don't know if that's true). Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] exec javac
Nope, you can't do this. On a side note, if you were working in Python, you'd have eval(). On Mon, Apr 26, 2010 at 3:16 PM, David david.s.jan...@gmail.com wrote: Is it possible to store and compile a java (or C or whatever language) program on the server with Google App Engine, returning the results of the compile to the web client? This may seem like a strange question, but I really do want to send text that constitutes a simple java program, compile it, and return either the compiler error messages or the .class file to the web client. Thanks for any advice. David -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] exec javac
Well ... can't is a very strong word. Theoretically, you could probably write a compiler using the available whitelist classes, but I suspect this isn't what you are looking for ... On Tue, Apr 27, 2010 at 10:03 AM, Ikai L (Google) ika...@google.com wrote: Nope, you can't do this. On a side note, if you were working in Python, you'd have eval(). On Mon, Apr 26, 2010 at 3:16 PM, David david.s.jan...@gmail.com wrote: Is it possible to store and compile a java (or C or whatever language) program on the server with Google App Engine, returning the results of the compile to the web client? This may seem like a strange question, but I really do want to send text that constitutes a simple java program, compile it, and return either the compiler error messages or the .class file to the web client. Thanks for any advice. David -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Getting around transactions for same entity group restrictions?
You could fire a transactional task within the first transaction - and don't let the task handler finish error free until the second modification is made (so it keeps retrying). On 28 April 2010 00:17, Mark mar...@gmail.com wrote: Hi, I have a User class in my project, and I can't find a transactionally safe method of creating relationships between users, because User objects are always in their own entity group. The simplest example I can come up with is a follow relationship (like twitter). When a user follows another, both User objects should be made aware of the relationship: class User { int mNumFollowing; int mNumFollowers; } class Follow { String mUsernameFollowed; String mUsernameFollower; } Since both User objects involved are root entities, I can't use a transaction to safely build the relationship. Ideally: tx.begin(); Follow follow = new Follow( userJoe.getUsername(), userJane.getUsername()); pm.makePersistent(follow); userJoe.mNumFollowing++; pm.makePersistent(userJoe); userJane.mNumFollowers++; pm.makePersistent(userJane); tx.commit(); I can make the Follow class an entity child of User, still the relationship can't be done in a single transaction: tx.begin(); userJoe.mNumFollowing++; pm.makePersistent(followForJoe); pm.makePersistent(userJoe); tx.commit(); tx.begin(); userJane.mNumFollowing++; pm.makePersistent(followForJane); pm.makePersistent(userJane); tx.commit(); the first transaction could succeed, and the second fail, leaving me with a half-completed follow relationship. What's the best way around same-entity-group-for-transactions in a situation like this? Do we just have to deal with the fact that our data might be incorrect? I could make User objects all children of a single entity group, but that would probably be awful for performance as every User object in the datastore would have to be locked to do a transaction (just guessing, I don't know if that's true). Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] ReadOnly Datastore and Task Queues
Perhaps you could check if the datastore is in read-only mode at the beginning of the task, then do what ever action is appropriate for your case (like raise an exception). Robert On Mon, Apr 26, 2010 at 4:45 AM, Matija matija.jerko...@gmail.com wrote: Is there way to pause task queue if datastore is currently in readonly state ? If task queue needs to persist something in datastore I need to left exception to be thrown so that it retries over and over until datastore is in normal state. Is there some other clever way to handle readonly datastore state in combination with task queue ? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Server failed to serve the requests.
Were there any actual exceptions in the app's log? Did you see the requests in the request log? If you were using a custom domain, could you access the site directly at the 'appname'.appspot.com url? Robert On Mon, Apr 26, 2010 at 9:52 AM, WeShine Tech intelltest.ad...@gmail.com wrote: Hello, I have an application which requires resources just on some particular days. However today my application actually failed at my clients site. The application logs do read some high CPU usage for some of the url but that is it. It would completely stop responding at times for all and any requests. Please suggest me some work around for this problem. I have started my billing and have allowed a large number of resources to be consumed per day. The consumption shown in the admin console is as low as 1% of what has been allocated. Do let me know if there is any more information required to be shared from my side. But the problem is extremely critical and needs to be fixed as soon as possible. Any help is appreciated. Thanks and Regards, Anupam M. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Datastore inserts
Hi, I have an application which requires some relatively big inserts into the datastore. The amount of data isn't huge, but there are often 100,000 rows in each file upload (and I could be doing about 500-1000 per day). At the moment I'm doing something like for row in file: new_row = RowType( somedata ) new_row.put() However this is way too slow (CPU-wise) for my needs; a 40,000 line file is taking about 4 CPU hours. Is there some obviously way of optimising the insert which I don't know about? Geoff. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: WARNING appengine_rpc.py:399 ssl module not found.
I am having this problem also. Found this thread in Google Groups: http://groups.google.com/group/google-appengine/browse_thread/thread/9eb30d64423a37ea. The module requires Visual Studio to build and install. To have to install Visual Studio just for this seems a bit heavy. If some kind soul out there could build an MSI and post it, it would be wonderful. On Apr 26, 7:37 pm, Wooble geoffsp...@gmail.com wrote: Have you tried to install the ssl module from pypi? If so, what problem are you having with installing it? On Apr 26, 5:25 pm, oddse minpeng2...@gmail.com wrote: Hello, I got this warning and can't upload files and communicate with app engine in order to unload file and create index for tables. WARNING appengine_rpc.py:399 ssl module not found. Without the ssl module, the identity of the remote host cannot be verified, and connections may NOT be secure. To fix this, please install the ssl module fromhttp://pypi.python.org/pypi/ssl. To learn more, seehttp://code.google.com/appengine/kb/general.html#rpcssl . Need help to solve this problem. Thank you. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: How to drop indexes from deployed app?
Hi, I am having the same problem and I am looking for a solution. Thank you for providing one Petrov as I was not able to find any... Were you able to find something else ? I mean something easier and cleaner than setting up a python app ? Regards, Maxime. On 27 abr, 16:55, Petrov Aleksander ass.pet...@gmail.com wrote: bad typing... I made a mistake: should be like this 4. in command line execute python appcfg.py vacuum_indexes new_project_template/ -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Can't get entity by key
Your Session class overrides Model.__init__? It has an intentionally undocumented parameter _from_entity. When doing things like overriding __init__, consider adding **kwargs, passing it on to the super-class' constructor. Hugo On Apr 27, 12:10 am, Ralfeus ralf...@gmail.com wrote: Hi, everyone I'm trying to get an entity by its key. I have a class Session derived from db.Model Trying such code: Session.get('agd0ZXN0YXBwcg0LEgdTZXNzaW9uGBkM') I get the error: Traceback (most recent call last): File /var/www/google_appengine/google/appengine/ext/admin/ __init__.py, line 218, in post exec(compiled_code, globals()) File string, line 7, in module File /var/www/google_appengine/google/appengine/ext/db/ __init__.py, line 992, in get results = get(keys, rpc=rpc) File /var/www/google_appengine/google/appengine/ext/db/ __init__.py, line 1255, in get model = cls1.from_entity(entity) File /var/www/google_appengine/google/appengine/ext/db/ __init__.py, line 1179, in from_entity instance = cls(None, _from_entity=True, **entity_values) TypeError: __init__() got an unexpected keyword argument '_from_entity' I tried Session.get(Key('agd0ZXN0YXBwcg0LEgdTZXNzaW9uGBkM')) Also I tried Session.gql(where __key__ = :1, db.Key('agd0ZXN0YXBwcg0LEgdTZXNzaW9uGBkM')).get() The error remains same in all cases. Is it bug? Or I miss something? Thank you 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Getting around transactions for same entity group restrictions?
Hi Scott, Thanks that's a great idea. I also just found this article which I think I can adopt as well: http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine I will try to convert that to java and post to the forum, Thanks On Apr 27, 10:15 am, Scott Ellis sje...@gmail.com wrote: You could fire a transactional task within the first transaction - and don't let the task handler finish error free until the second modification is made (so it keeps retrying). On 28 April 2010 00:17, Mark mar...@gmail.com wrote: Hi, I have a User class in my project, and I can't find a transactionally safe method of creating relationships between users, because User objects are always in their own entity group. The simplest example I can come up with is a follow relationship (like twitter). When a user follows another, both User objects should be made aware of the relationship: class User { int mNumFollowing; int mNumFollowers; } class Follow { String mUsernameFollowed; String mUsernameFollower; } Since both User objects involved are root entities, I can't use a transaction to safely build the relationship. Ideally: tx.begin(); Follow follow = new Follow( userJoe.getUsername(), userJane.getUsername()); pm.makePersistent(follow); userJoe.mNumFollowing++; pm.makePersistent(userJoe); userJane.mNumFollowers++; pm.makePersistent(userJane); tx.commit(); I can make the Follow class an entity child of User, still the relationship can't be done in a single transaction: tx.begin(); userJoe.mNumFollowing++; pm.makePersistent(followForJoe); pm.makePersistent(userJoe); tx.commit(); tx.begin(); userJane.mNumFollowing++; pm.makePersistent(followForJane); pm.makePersistent(userJane); tx.commit(); the first transaction could succeed, and the second fail, leaving me with a half-completed follow relationship. What's the best way around same-entity-group-for-transactions in a situation like this? Do we just have to deal with the fact that our data might be incorrect? I could make User objects all children of a single entity group, but that would probably be awful for performance as every User object in the datastore would have to be locked to do a transaction (just guessing, I don't know if that's true). Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] App Engine downtime TOMORROW, Wed Apr 28 1-2p PDT
App Engine downtime TOMORROW, Wed Apr 28 1-2p PDT (GMT-7) and same time next Wed, May 5 http://groups.google.com/group/google-appengine-downtime-notify/browse_thread/thread/4857b46e4e6ff0f9 please join the downtime notification group to be alerted on all such planned downtimes. all apps will go into read-only mode for tomorrow's downtime as well as next week's. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Progress Dialog... returning information?
I have an application with a login screen that connects to a server and authenticates. I've looked up numerous tutorials on using Progress Dialogs and Handlers, and they all explain how to run a seperate thread to (in my case) send the REST request and check the response. However, my issue is that my authentication function that I put my code in (below) needs to return a boolean based on the response type. However, because I am nesting classes, I can't reference the value returned by my code (the response). Here is a snippet: ... public static boolean auth(String username, String password, Activity login,Handler handler,int response){ try{ final ProgressDialog progress = ProgressDialog.show(login, Please wait..., Connecting to server..., true); new Thread(new Runnable(){ public void run(){ try{ URL url = new URL(http://www.procoretech.com/api/ list_projects?login=+username+password=+password); HttpURLConnection uc = (HttpURLConnection)url.openConnection(); uc.setDoInput(true); uc.connect(); response = uc.getResponseCode(); //InputSource src = new InputSource(uc.getInputStream()); } catch (Exception e) { } progress.dismiss(); }).start(); ... That code is pasted together from different attempts but hopefully you can see my problem. I need to pull the response value in the auth function to return a boolean. Is there a standard way to do this? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] flush cache from control panel
Is there a way to flush the cache from the control panel? I'd like to be able to do this when I delete an entity that is cached. When can do this in the dev environment, am I just missing the link? Tim -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Server failed to serve the requests.
I did look into the problem and have been suggested that it could be due to latency issues. Please could you guide me through as to how to fix this. I have used the same code with more number of clients before but never faced a problem like this. The logs also show latency issues. And I did run the older version of my application using the appspot url. The older version performed just fine. However I did not try running the application using the appname.appspot.com url. On Tue, Apr 27, 2010 at 11:44 PM, Robert Kluin robert.kl...@gmail.comwrote: Were there any actual exceptions in the app's log? Did you see the requests in the request log? If you were using a custom domain, could you access the site directly at the 'appname'.appspot.com url? Robert On Mon, Apr 26, 2010 at 9:52 AM, WeShine Tech intelltest.ad...@gmail.com wrote: Hello, I have an application which requires resources just on some particular days. However today my application actually failed at my clients site. The application logs do read some high CPU usage for some of the url but that is it. It would completely stop responding at times for all and any requests. Please suggest me some work around for this problem. I have started my billing and have allowed a large number of resources to be consumed per day. The consumption shown in the admin console is as low as 1% of what has been allocated. Do let me know if there is any more information required to be shared from my side. But the problem is extremely critical and needs to be fixed as soon as possible. Any help is appreciated. Thanks and Regards, Anupam M. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: data structure to implement some of your friends also like this feature.
Hi Nick Thank you. One thing I'm still a bit confused about index. I had the impression that if I've executed all kinds of queries before I deploy, all required indexes would be included, am I correct? Does building a custom index improve performance on complex queries even though it is not required? Or I could just stick to the rules from the doc, and make sure I cover all queries before I deploy? Thanks! On Apr 27, 6:59 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi Herbert, A query like this will use the merge join strategy by default. If it's too slow for the merge join strategy, you could have to build a custom index for it, which would indeed be 'exploding' - each User entity would have len(friends)*len(likes) index entries. -Nick On Mon, Apr 26, 2010 at 3:20 PM, Herbert herber...@gmail.com wrote: Sorry, suddenly got a thought on it. Can I do two equality check on both User.friends and User.likes ? would that be cause an exploding index? I.E. User.all().filter(friends =, me).filter(likes =, A).fetch(3) thanks! Herbert -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: flush cache from control panel
On Apr 27, 10:34 pm, Nash-t timna...@gmail.com wrote: Is there a way to flush the cache from the control panel? I'd like to be able to do this when I delete an entity that is cached. When can do this in the dev environment, am I just missing the link? There isn't a built-in way, but you could add a page that calls memcache.flush_all() easily enough. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Server failed to serve the requests.
Anupam, Are you saying that you have other clients (customers) running the same code on different deployments, or are you saying you have loaded this app more heavily while running the current code? When you say the log shows latency issues I assume you mean the requests are taking a lot of CPU time? It sounds like the app is not very high traffic. Could this be the cold start issue? If you hit the site a lot (once every couple seconds) does it respond OK? Robert On Tue, Apr 27, 2010 at 11:35 PM, WeShine Tech intelltest.ad...@gmail.com wrote: I did look into the problem and have been suggested that it could be due to latency issues. Please could you guide me through as to how to fix this. I have used the same code with more number of clients before but never faced a problem like this. The logs also show latency issues. And I did run the older version of my application using the appspot url. The older version performed just fine. However I did not try running the application using the appname.appspot.com url. On Tue, Apr 27, 2010 at 11:44 PM, Robert Kluin robert.kl...@gmail.com wrote: Were there any actual exceptions in the app's log? Did you see the requests in the request log? If you were using a custom domain, could you access the site directly at the 'appname'.appspot.com url? Robert On Mon, Apr 26, 2010 at 9:52 AM, WeShine Tech intelltest.ad...@gmail.com wrote: Hello, I have an application which requires resources just on some particular days. However today my application actually failed at my clients site. The application logs do read some high CPU usage for some of the url but that is it. It would completely stop responding at times for all and any requests. Please suggest me some work around for this problem. I have started my billing and have allowed a large number of resources to be consumed per day. The consumption shown in the admin console is as low as 1% of what has been allocated. Do let me know if there is any more information required to be shared from my side. But the problem is extremely critical and needs to be fixed as soon as possible. Any help is appreciated. Thanks and Regards, Anupam M. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Server failed to serve the requests.
Hello Robert, Are you saying that you have other clients (customers) running the same code on different deployments ? No. So what happened is at my clients site the application stopped responding. So I started using the earlier versions of my application and those seemed to work fine. When you say the log shows latency issues I assume you mean the requests are taking a lot of CPU time? That is correct. But the same requests work absolutely fine otherwise. So why would some requests take a lot of CPU time only on some occasions where as work efficiently most of the times? Could you share some tippers for resolving this issue. The application is not a very high traffic one because of its nature. However after receiving high amount of load for almost two hours it went down. Also it has performed very well with more traffic in the past. So I am not sure it could be the Cold Start. Thanks and Regards, Anupam M. On Wed, Apr 28, 2010 at 9:31 AM, Robert Kluin robert.kl...@gmail.comwrote: Anupam, Are you saying that you have other clients (customers) running the same code on different deployments, or are you saying you have loaded this app more heavily while running the current code? When you say the log shows latency issues I assume you mean the requests are taking a lot of CPU time? It sounds like the app is not very high traffic. Could this be the cold start issue? If you hit the site a lot (once every couple seconds) does it respond OK? Robert On Tue, Apr 27, 2010 at 11:35 PM, WeShine Tech intelltest.ad...@gmail.com wrote: I did look into the problem and have been suggested that it could be due to latency issues. Please could you guide me through as to how to fix this. I have used the same code with more number of clients before but never faced a problem like this. The logs also show latency issues. And I did run the older version of my application using the appspot url. The older version performed just fine. However I did not try running the application using the appname.appspot.com url. On Tue, Apr 27, 2010 at 11:44 PM, Robert Kluin robert.kl...@gmail.com wrote: Were there any actual exceptions in the app's log? Did you see the requests in the request log? If you were using a custom domain, could you access the site directly at the 'appname'.appspot.com url? Robert On Mon, Apr 26, 2010 at 9:52 AM, WeShine Tech intelltest.ad...@gmail.com wrote: Hello, I have an application which requires resources just on some particular days. However today my application actually failed at my clients site. The application logs do read some high CPU usage for some of the url but that is it. It would completely stop responding at times for all and any requests. Please suggest me some work around for this problem. I have started my billing and have allowed a large number of resources to be consumed per day. The consumption shown in the admin console is as low as 1% of what has been allocated. Do let me know if there is any more information required to be shared from my side. But the problem is extremely critical and needs to be fixed as soon as possible. Any help is appreciated. Thanks and Regards, Anupam M. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at
[google-appengine] skip_files also for Java?
Is there something similar to skip_files in Java? On Apr 12, 9:14 pm, Wooble geoffsp...@gmail.com wrote: http://code.google.com/appengine/docs/java/config/appconfig.html#Stat... You should be able to exclude them. On Apr 12, 2:47 pm, therealjz thereal...@gmail.com wrote: Exactly what I need but I'm using Java. Anything similar for Java apps? On Apr 12, 11:39 am, david ignacio deigna...@gmail.com wrote: take a look at the skipping files section of the app.yaml http://code.google.com/appengine/docs/python/config/appconfig.html#Sk... On Mon, Apr 12, 2010 at 09:25, therealjz thereal...@gmail.com wrote: Hi everyone, I'm using the AppEngine plugin for Eclipse and the Subversive plugins for svn. My problem is that when I publish my AppEngine project, it uploads the .svn directories also. So I get errors from AppEngine about duplicate jars being found. Is there any way to keep the AppEngine from publishing those files? Seems like it should be an easy problem but I'm not sure what to do. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Trouble creating a named key
Hi, I'm trying to port the article written by Nick Johnson on distributed transactions from python to java: http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine it is almost working, just have a problem on one of the last steps where a named-key is supposed to be created. public static void rollForward(PersistenceManager pm, Transfer transfer) throws Exception { Key namedKey = KeyFactory.createKey( transfer.getTargetKey(), Transfer.class.getSimpleName(), KeyFactory.keyToString(transfer.getKey())); ... Transfer destTransfer = new Transfer(); destTransfer.setKey(namedKey); // destTransfer.setParentKey(); - commented out on purpose. pm.makePersistent(destTransfer); ... } when saving the destTransfer object to the datastore, I get this error: Cannot set both the primary key and a parent pk field. If you want the datastore to generate an id for you, set the parent pk field to be the value of your parent key and leave the primary key field blank. If you wish to provide a named key, leave the parent pk field blank and set the primary key to be a Key object made up of both the parent key and the named child. I'm trying to take option #2, I believe I am doing it correctly. This is the Transfer class: @PersistenceCapable public class Transfer { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key mKey; @Persistent @Extension(vendorName=datanucleus, key=gae.parent-pk, value=true) private Key mKeyParent; } so in the above, I leave mKeyParent null and explicitly set mKey to the named key value before saving it, but I'm still getting that exception thrown. I realize this is a bit long, does anyone see what the problem could be? I'd like to post this port of the distributed transactions for the group's reference once it's done, I just would like to get it actually working first, Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.