[appengine-java] Re: Entity ID and keyName identification scope
OK Max, now seems clear Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: ArrayIndexOutOfBoundsException: at org.datanucleus.plugin.ConfigurationElement.putAttribute(Configuratio nElement.java:104)
Isn't this an important subject to address? Are all method calling the makePersistent method needed to be synchronized...?? Is this a bug..?? No one has any consideration??? Thanks On Sep 10, 10:35 am, patrizio.munzi eris4.mu...@gmail.com wrote: I did a few more investigation and It looks like a threads safety problem. In fact if I synchronize the method com.myapp.server.datastore.EventsManager.addEvent whithin makePersistent is called everything works fine. I think here experts are needed.. :-) Bye On Sep 10, 10:18 am, patrizio.munzi eris4.mu...@gmail.com wrote: Hi everybody I'm having an ArrayOutOfBoundException from nucleus... I don't know where it comes from... Can anyone give me some information about it... Here's the stack trace... --- The server is running athttp://localhost:8181/ java.lang.ArrayIndexOutOfBoundsException: 1187 at org.datanucleus.plugin.ConfigurationElement.putAttribute (ConfigurationElement.java:104) at org.datanucleus.store.appengine.DatastorePluginRegistry.getExtensionPoint (DatastorePluginRegistry.java:59) at org.datanucleus.plugin.PluginManager.getExtensionPoint (PluginManager.java:65) at org.datanucleus.plugin.PluginManager.getConfigurationElementForExtension (PluginManager.java:113) at org.datanucleus.plugin.PluginManager.getAttributeValueForExtension (PluginManager.java:230) at org.datanucleus.ObjectManagerImpl.getCallbackHandler (ObjectManagerImpl.java:3804) at org.datanucleus.state.AbstractStateManager.getCallbackHandler (AbstractStateManager.java:160) at org.datanucleus.state.JDOStateManagerImpl.initialiseForPersistentNew (JDOStateManagerImpl.java:466) at org.datanucleus.state.StateManagerFactory.newStateManagerForPersistentNew (StateManagerFactory.java:151) at org.datanucleus.ObjectManagerImpl.persistObjectInternal (ObjectManagerImpl.java:1297) at org.datanucleus.ObjectManagerImpl.persistObject (ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent (JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent (JDOPersistenceManager.java:694) at com.myapp.server.datastore.EventsManager.addEvent (EventsManager.java:167) at com.myapp.server.restlet.EventResource.addEvent(EventResource.java: 30) at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.restlet.resource.ServerResource.doHandle(ServerResource.java: 390) at org.restlet.resource.ServerResource.doHandle(ServerResource.java: 328) at org.restlet.resource.ServerResource.doNegotiatedHandle (ServerResource.java:581) at org.restlet.resource.ServerResource.doConditionalHandle (ServerResource.java:254) at org.restlet.resource.ServerResource.handle(ServerResource.java: 923) at org.restlet.resource.Finder.handle(Finder.java:510) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Router.doHandle(Router.java:321) at org.restlet.routing.Router.handle(Router.java:520) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.engine.application.StatusFilter.doHandle (StatusFilter.java:152) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111) at org.restlet.engine.application.ApplicationHelper.handle (ApplicationHelper.java:72) at org.restlet.Application.handle(Application.java:344) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Router.doHandle(Router.java:321) at org.restlet.routing.Router.handle(Router.java:520) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Router.doHandle(Router.java:321) at org.restlet.routing.Router.handle(Router.java:520) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201)
[appengine-java] Re: Gzip encoding used by default ?
It was just to confirm and to know if it was possible to disable. For me it is OK. On 10 sep, 14:55, Peter Ondruska peter.ondru...@gmail.com wrote: GAE is using gzip encoding. Why would you want to disable? On Sep 10, 10:47 am, fvisticot fvisti...@gmail.com wrote: Can someone confirm that GAE is using gzip encoding by default for jsp. I have written a JSP app and i can see in the header content-encoding gzip. How to disable this gzip encoding to transfert data clearly ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: selective deployment to GAE
Hi Vik, You can try using a source control control. Some source control tools allow you to deploy a specific file instead of the whole solution. In your case, if you only want to deploy 3 modified files, you can just select these 3 files and deploy it. Catherine Sea http://www.dynamsoft.com/ http://www.scmsoftwareconfigurationmanagement.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: ArrayIndexOutOfBoundsException: at org.datanucleus.plugin.ConfigurationElement.putAttribute(Configuratio nElement.java:104)
It would be bug or limitation of development environment. I have not met them on real appengine environment because container looks like running on single thread model. Normally it would not need to be synchronized I think. On Sep 11, 4:41 pm, patrizio.munzi eris4.mu...@gmail.com wrote: Isn't this an important subject to address? Are all method calling the makePersistent method needed to be synchronized...?? Is this a bug..?? No one has any consideration??? Thanks On Sep 10, 10:35 am, patrizio.munzi eris4.mu...@gmail.com wrote: I did a few more investigation and It looks like a threads safety problem. In fact if I synchronize the method com.myapp.server.datastore.EventsManager.addEvent whithin makePersistent is called everything works fine. I think here experts are needed.. :-) Bye On Sep 10, 10:18 am, patrizio.munzi eris4.mu...@gmail.com wrote: Hi everybody I'm having an ArrayOutOfBoundException from nucleus... I don't know where it comes from... Can anyone give me some information about it... Here's the stack trace... --- The server is running athttp://localhost:8181/ java.lang.ArrayIndexOutOfBoundsException: 1187 at org.datanucleus.plugin.ConfigurationElement.putAttribute (ConfigurationElement.java:104) at org.datanucleus.store.appengine.DatastorePluginRegistry.getExtensionPoint (DatastorePluginRegistry.java:59) at org.datanucleus.plugin.PluginManager.getExtensionPoint (PluginManager.java:65) at org.datanucleus.plugin.PluginManager.getConfigurationElementForExtension (PluginManager.java:113) at org.datanucleus.plugin.PluginManager.getAttributeValueForExtension (PluginManager.java:230) at org.datanucleus.ObjectManagerImpl.getCallbackHandler (ObjectManagerImpl.java:3804) at org.datanucleus.state.AbstractStateManager.getCallbackHandler (AbstractStateManager.java:160) at org.datanucleus.state.JDOStateManagerImpl.initialiseForPersistentNew (JDOStateManagerImpl.java:466) at org.datanucleus.state.StateManagerFactory.newStateManagerForPersistentNew (StateManagerFactory.java:151) at org.datanucleus.ObjectManagerImpl.persistObjectInternal (ObjectManagerImpl.java:1297) at org.datanucleus.ObjectManagerImpl.persistObject (ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent (JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent (JDOPersistenceManager.java:694) at com.myapp.server.datastore.EventsManager.addEvent (EventsManager.java:167) at com.myapp.server.restlet.EventResource.addEvent(EventResource.java: 30) at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.restlet.resource.ServerResource.doHandle(ServerResource.java: 390) at org.restlet.resource.ServerResource.doHandle(ServerResource.java: 328) at org.restlet.resource.ServerResource.doNegotiatedHandle (ServerResource.java:581) at org.restlet.resource.ServerResource.doConditionalHandle (ServerResource.java:254) at org.restlet.resource.ServerResource.handle(ServerResource.java: 923) at org.restlet.resource.Finder.handle(Finder.java:510) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Router.doHandle(Router.java:321) at org.restlet.routing.Router.handle(Router.java:520) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.engine.application.StatusFilter.doHandle (StatusFilter.java:152) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111) at org.restlet.engine.application.ApplicationHelper.handle (ApplicationHelper.java:72) at org.restlet.Application.handle(Application.java:344) at org.restlet.routing.Filter.doHandle(Filter.java:156) at org.restlet.routing.Filter.handle(Filter.java:201) at org.restlet.routing.Router.doHandle(Router.java:321) at org.restlet.routing.Router.handle(Router.java:520)
[appengine-java] Re: java.util.zip.ZipException: error in opening zip file
Similar exception when I deploy to app engine On Sep 11, 4:13 pm, Max max.seven@gmail.com wrote: I came from vacation and my project stopped to work. I have upgraded GAE to 1.2.5 and no difference same results. Other projects work. /home/max/workspace/WebProject01/war is regular folder with WEB-INF and other files (GWT:11965): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/ libqtcurve.so: wrong ELF class: ELFCLASS64 Sep 11, 2009 1:06:23 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: Failed startup of context com.google.apphosting.utils.jetty.devappenginewebappcont...@154745e{/,/ home/max/workspace/WebProject01/war} java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:114) at java.util.jar.JarFile.init(JarFile.java:133) at java.util.jar.JarFile.init(JarFile.java:97) at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp (TagLibConfiguration.java:171) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1215) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java:152) at com.google.appengine.tools.development.AbstractContainerService.startup (AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start (DevAppServerImpl.java:218) at com.google.appengine.tools.development.gwt.AppEngineLauncher.start (AppEngineLauncher.java:86) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397) at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Is it possible to write a proxy using servlet in GAE?
I have removed index.html and if I go to appid.appspot.com:80 directly in the browser, i can see the header information printed out. I think use can't set proxy with a request uri as /proxy. Richard On Sep 11, 5:38 am, Jason (Google) apija...@google.com wrote: What do you see when you go to appid.appspot.com:80 directly in the browser? Do you see the header information printed out or do you see a static file like index.html? If you change the URL pattern, say /proxy instead of / (i.e.http://appid.appsot.com:80/proxy), does it work? - Jason On Wed, Sep 9, 2009 at 6:49 AM, flyerhzm flyer...@gmail.com wrote: I am going to write a proxy in GAE. I wrote a very simple test servlet to read http header. public class RichardProxyServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { StringBuilder builder = new StringBuilder(); Enumeration e = req.getHeaderNames(); while (e.hasMoreElements()) { String headerName = (String) e.nextElement(); builder.append(headerName ).append(: ).append(req.getHeader (headerName)).append(\n); } resp.setContentType(text/plain); resp.getWriter().println(Hello, world); resp.getWriter().println(req.getRequestURI()); resp.getWriter().println(builder.toString()); } } and dispatch route '/' to this Servlet servlet servlet-nameRichardProxy/servlet-name servlet-classcom.huangzhimin.proxy.RichardProxyServlet/servlet- class /servlet servlet-mapping servlet-nameRichardProxy/servlet-name url-pattern//url-pattern /servlet-mapping It works very in localhost, but after deploying to GAE and set proxy to appid.appspot.com:80, any url page will be redirect to google home page. Does anyone know why? Is it possible to write a proxy using servlet in GAE? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: where should I copy logging.properties for testing?
Hi Alejandro, What entry do you have in your appengine-web.xml file ? look at http://code.google.com/appengine/docs/java/runtime.html#logging --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Unable to deploy with 1.2.5 SDK (.jsp' does not match expression '^(?!\^)/|\.|(\(.).*(?!\$).$')
When you upgrade the SDK, make sure that the SDK under Google/App Engine in Preferences is also changed. If possible, remove the old SDK in Preferences. And check to make sure that you have the latest jar (1.2.5) in the lib folder. When you upgrade, it should already replace the old SDK jar to the new one. Like I said, I DID change the SDK. After all that was the thing that triggered my problem. :) Anyway I just found the solution. In my web.xml I had the following fragment: security-constraint display-nameuser settings/display-name web-resource-collection web-resource-namesettings page/web-resource-name url-patternuserPreferences.jsp/url-pattern /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint This was perfectly fine under 1.2.2. 1.2.5 seems to be more picky about this. I did some reading andServlet Specification, section SRV.11.2.1 Implicit Mappings says (as I understand it), that the url-pattern for .jsp page should start with slash, like this: url-pattern/userPreferences.jsp/url-pattern After the correction, everything works fine. Hope this post saves someone some troubles :-) Regards, fat bold cyclop --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Bulk writes to datastore
I tried doing a bulk load with the JDO makePersistentAll(..) call yesterday ... by default what I did was created a List of size 2048, filled it to capacity and then called makePersistentAll() ... I got an IllegalArgumentException out of that call stating that you could only persist at most 500 objects per call ... I was unable to retest this, because despite making a change to the capacity of the the List to 500 and re-deploying the redeployment did not seem to take effect ... will keep trying ... On Sep 4, 5:24 pm, Jason (Google) apija...@google.com wrote: Batch puts are supported, yes, and as of yesterday's release, calling makePersistentAll (JDO) and the equivalent JPA call will take advantage of this support (previously, you had to use the low-level API). Two quick notes: 1) All of the entities that you're persisting should be in separate entity groups since two entities in the same entity group can't be written to consecutively, and you will see datastore timeout exceptions if many simultaneous write requests come in for the same entity or entity group. 2) Batch puts do not operate in a transaction. This means that some writes may succeed but others may not, so if you need the ability to rollback, you'll need transactions. - Jason Let me know if you have any more questions on this. - Jason On Thu, Sep 3, 2009 at 7:24 PM, Nicholas Albion nalb...@gmail.com wrote: Is it possible to overcome the datastore's 10 writes/second limit by batching them? I've got a table containing just over one million records (in CSV format). Does a batched write (of around 1MB of data and, say 1000 records) count as one write, or 1000 writes?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: where should I copy logging.properties for testing?
Hi Rick, The problem is with my testcase, the logging is working fine running the jetty server. I don't want to have all the JDO INFO logs for my test. On Fri, Sep 11, 2009 at 12:03 PM, rick rick4567892...@yahoo.com wrote: Hi Alejandro, What entry do you have in your appengine-web.xml file ? look at http://code.google.com/appengine/docs/java/runtime.html#logging --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Entity ID and keyName identification scope
Thank you Max, I understand a bit more the numeric ID generator in datastore. Now I am aware that the numeric ID allocation for the entities belonging a kind isn't sorted or contiguous like I hope at first. On Sep 10, 8:10 pm, Max Ross maxr+appeng...@google.com wrote: The URL I posted earlier in the thread explains it, but here's a little bit more detail: A parent entity plus a kind defines an id-space, so entities with the same parent and the same kind are guaranteed to have unique ids. For example, if you have an Entity with Parent:A Kind: Person Id: 10 you are guaranteed that no other entity with Parent A and Kind Person will be assigned an Id of 10. However, an entity with a different Parent and Kind Person or an entity with Parent A and a different Kind _can_ be assigned an Id of 10. The datastore pre-allocates batches of ids across multiple servers under-the-hood, so you can't make any assumptions about the Id that will get assigned in terms of contiguousness. The only safe assumption is that the id will be unique for that Parent/Kind combination. Hope this helps, Max On Thu, Sep 10, 2009 at 5:29 AM, iker98 ike...@gmail.com wrote: Definitely I don't understand the number ID generator behavior across kinds (in prod datastore). Does anyone know any URL with detailed explanation about it? Thanks On Sep 9, 11:58 am, Tica2 petrica.chir...@gmail.com wrote: Max, I like to have same behavior between local and production environment It is posible ? For instance the code: StringBuffer sb = new StringBuffer(); KeyRange range = ds.allocateIds(a, 2); for (Key key : range) { sb.append(\n a + key.toString()); } range = ds.allocateIds(b, 2); for (Key key : range) { sb.append(\n b + key.toString()); } Key parentKey = KeyFactory.createKey(c, 1); sb.append(\n c + parentKey.toString()); range = ds.allocateIds(parentKey, d, 2); for (Key key : range) { sb.append(\n d + key.toString()); } System.out.println(sb.toString()); Local produce: a a(1) a a(2) b b(3) b b(4) c c(1) d c(1)/d(5) d c(1)/d(6) But in production environment: a a(1) a a(2) b b(1001) b b(1002) c c(1) d c(1)/d(1) d c(1)/d(2) a a(1003) a a(1004) b b(3) b b(4) c c(1) d c(1)/d(1001) d c(1)/d(1002) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Exception since upgrading to 1.2.5
Yes, please provide more information if you can. There was a bug fix in 1.2.5 that made queries respect fetch groups, but JPA doesn't have fetch groups so the error you're reporting suggests that something is wrong here. Can you boil it down to a small snippet that reproduces the problem? Thanks, Max On Wed, Sep 9, 2009 at 10:34 PM, datanucleus andy_jeffer...@yahoo.comwrote: I am using JPA btw, so can someone tell me if I need to do in order make this work again? Why does it work sometimes? Why not look in the log ? It tells you what is detached, when, and why. If a field (and who knows what type this field is ...) is not detached then you can't access it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: How to make a query using low level API using the 'key' property?
Your use of key filters and sorts sounds appropriate. On Wed, Sep 9, 2009 at 12:22 AM, Corneliu Paul Lupulet corneliu.lupu...@gmail.com wrote: Hello, Thank you for you answers. I would like to make a clarification, why i am using the key property in a query. Using an order by key, I am saving the key of the last modified object as a bookmark/cursor to know where to resume the processing from. (i also use this for pagination according to a python article i read on app-engine site, which suggests this) Is there any other way to do this at the current moment ? (i've read in the roadmaps that you will be introducing cursors) Another thing: Quote: A key is a complex object -- you can't query on it using a simple string literal Where are you quoting from? I have the encoded string version of the key (same thing i would obtain from KeyFactory.KeyToString() and i am using this string in the query. It appears to work correctly, because the fetched elements are returned by key order, different from the order i were to get from comparing the corresponding key strings lexically. -- Corneliu Paul Lupulet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Query + Filter for Key as Encoded String
You can't filter by the name component of the key because the datastore doesn't support this. You can only filter by the entire key. Why can't you create the key by hand? KeyFactory.Builder should have everything you need to do this. 2009/9/6 Kriván Bálint bal...@krivan.hu Hi! I've the following Entity: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Document implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String encodedKey; @Persistent @Extension(vendorName = datanucleus, key = gae.pk-name, value = true) private String id; [...] } I would like to create a query filtered by id, but it doesn't work. How can I make this work? Thanks for your help! My try was the following: Query query = pm.newQuery(Document.class); query.setFilter(id == param); query.declareParameters(String param); try { ListDocument results = (ListDocument) query.execute(id); if (results.iterator().hasNext()) { for (Document d : results) { // do something with the Document. // throw new RuntimeException(d.getTitle()); } } else { // ... no results ... } } catch (Exception ex) { ex.printStackTrace(); } finally { query.closeAll(); } I know I've could get the object by Key, but there's a hierarchy in Documents, so I can't create the key by hand. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: java.util.zip.ZipException: error in opening zip file
I have created a new project and copied classes and some other files and it works now. It is very odd that old project stopped to work without any reason. On Sep 11, 4:56 pm, Max max.seven@gmail.com wrote: Similar exception when I deploy to app engine On Sep 11, 4:13 pm, Max max.seven@gmail.com wrote: I came from vacation and my project stopped to work. I have upgraded GAE to 1.2.5 and no difference same results. Other projects work. /home/max/workspace/WebProject01/war is regular folder with WEB-INF and other files (GWT:11965): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/ libqtcurve.so: wrong ELF class: ELFCLASS64 Sep 11, 2009 1:06:23 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: Failed startup of context com.google.apphosting.utils.jetty.devappenginewebappcont...@154745e{/,/ home/max/workspace/WebProject01/war} java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:114) at java.util.jar.JarFile.init(JarFile.java:133) at java.util.jar.JarFile.init(JarFile.java:97) at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp (TagLibConfiguration.java:171) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1215) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java:152) at com.google.appengine.tools.development.AbstractContainerService.startup (AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start (DevAppServerImpl.java:218) at com.google.appengine.tools.development.gwt.AppEngineLauncher.start (AppEngineLauncher.java:86) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397) at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] JSTL and Expression Language how to
Hello guys, It seems that JSP Api+JSTL does not work out of the box at appengine as it says here http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine Is there any way to update the above link? Some posts on the list mention that EL was ignored by default (due to the jasper compiled being configured this way). The following is a list of tasks one can and can not do to make it work: a) jsp-config/jsp-proprerty-group/el-ignored tag is unsupported, therefore b) all your jsp files should contain @page isElIgnored=false c) all your tag files should contain @tag isElIgnored=false d) there is no need to add the jstl jar file to your WEB-INF/lib dir Although there are some mails saying that (d) would not work if you add it, it seems to me that it depends on the version that you add to the classpath so... do not add it. Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Session Example
I do not know if this is a bug or if it is already documented somewhere (I could not find this info when I searched): I just ran into a problem where session data worked fine in my local dev environment, but failed when I deployed to the App Engine. In the AppEngine logs I found a Runtime error java.io.NotSerializableException. Seems that my Objects needed to implement java.io.Serializable. Just thought I would pass that along in case you ran into the same issue. It was not obvious (to me) as the log entries were only level.warning. Steve B. Jason (Google) wrote: To use sessions, you first have to enable them: http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions Once sessions are enabled, you work with them the same way you work with sessions in other J2EE environments. - Jason On Wed, Sep 9, 2009 at 4:18 AM, zahid zhdis...@gmail.com mailto:zhdis...@gmail.com wrote: Dear sir currently we are making an application host on GAE . So i have proble to mentain session give me any example of this best regard zahid --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Session destruction events, API availability therein
Hi Erum. Are you seeing this error in the development environment or in production? - Jason On Wed, Sep 9, 2009 at 5:43 PM, Erem ehb...@gmail.com wrote: Hey All, What is the best way to tie into session destruction events? I have implemented an HttpSessionListener and put it in my web.xml. The SessionListener gets called, but any attempt to do DataStore or URLFetch API calls within sessionDestroyed results in errors. For example, the JDO API throws: Exception in thread Timer-125 java.lang.NullPointerException: No API environment is registered for this thread. at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId (DatastoreApiHelper.java:63) at com.google.appengine.api.datastore.QueryTranslator.convertToPb (QueryTranslator.java:35) My app has constructs of Visitors (anyone who comes to the site) and Users (verified accounts). The former's data get stored in sessions, the latter explicitly in the datastore. Every User has an ArrayListVisitor, listing the visitors currently logged in to the User's account. When a session is destroyed, meaning a Visitor has left, I want to remove that visitor from the user's Logged in ArrayList. Having trouble thinking of another way to do it =( Any advice would be much appreciated. Erem --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Data Store Intro Broken?
Hi James. If you right-click on your project and click Properties, do you see a valid SDK selected under Google - App Engine? If so, can you list the JAR files under your war/WEB-INF/lib directory and provide any other relevant output? Is Eclipse having trouble resolving your imports (i.e. they're underlined in red) or are you first seeing the error when you try to run your project? - Jason On Wed, Sep 9, 2009 at 6:26 PM, Jimmy V jvand...@gmail.com wrote: The intro for java data store is broken? I'm following the instructions from http://code.google.com/appengine/docs/java/datastore/usingjdo.html perfectly and am breaking on the addition of the PMF class. Errors from compile output: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget No source code is available for type javax.jdo.JDOHelper; did you forget I'm using the latest out-of-the-box google plugins and am finding great frustration. I'm sure this is commonly asked. Anybody can link me? TIA -- James VanDyne, MCPD Technology Consultant --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Regarding reference guides for developing sample applications
All of our documentation is located at http://code.google.com/appengine/docs/. You can find a getting started guide for Java at http://code.google.com/appengine/docs/java/gettingstarted/ and more detailed information for each App Engine service in the links on the left. - Jason On Wed, Sep 9, 2009 at 10:15 PM, mahesh nimmala.anukar...@gmail.com wrote: Hi iam new to work with google appengine sdk with java using eclipse,and i want to develop some sample applications using GOOGLE APP ENGINE WITH JAVA USING ECLIPSE .But i could not find any reference guides for developing any sample apps .So please someone help me with some guides as reference for developing some sample apps . Thank u in advance, Anu. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Problem saving an object using makePersistent
You shouldn't need the @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) line since you're using a key name and not a String-encoded ID. The only thing that looks suspicious is your pmf object. The best practice is to use a PersistenceManagerFactory singleton as documented at http://code.google.com/appengine/docs/java/datastore/usingjdo.html#Getting_a_PersistenceManager_Instance, but I would expect to see exceptions with subsequent calls to saveUser, not the first call. All the same, I recommend you try this to see if it helps, and please also let me know which version of the SDK you're using. - Jason On Thu, Sep 10, 2009 at 1:09 AM, bysse erik.byst...@gmail.com wrote: As expected, this has nothing to do with wicket or sessions, just to be sure i've checked those. If fact, all entities get persisted as they should and the exception is caught somewhere in makePersistent. So as far as i know, no harm is done(?) So i think i'll just ignore this stacktrace and continue as usual. On Sep 10, 12:22 am, bysse erik.byst...@gmail.com wrote: I also get this exception, but only on the first call to makePersistent. First Call: Exception Store objects ? Later Calls Ok Stores objects Can't think of anything that causes this. I'm using Wicket, how about you? /Erik On Sep 8, 7:48 pm, cancunmods archie.she...@gmail.com wrote: I am having trouble saving an object on google app engine. Here is my POJO class: package subasta.domain.users; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.PrimaryKey; import javax.jdo.annotations.Persistent; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class User { @PrimaryKey @Persistent private String nombre; public User(String nombre){ this.nombre = nombre; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } } Here is my JDO Code.: package subasta.repository.users; import java.util.Set; import java.util.logging.Logger; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; import javax.jdo.PersistenceManager; import subasta.domain.users.User; public class JDOUserDAO implements UserDAO{ /** Logger for this class and subclasses */ private static final Logger log = Logger.getLogger(UserDAO.class .getName()); private static final PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(transactions- optional); //PersistenceManagerFactory pmf; //public void setPmf(PersistenceManagerFactory pmf) { //this.pmf = pmf; //} public void saveUser(User user){ PersistenceManager pm = pmf.getPersistenceManager(); try{ pm.makePersistent(user); }finally { pm.close(); } } @SuppressWarnings(unchecked) public SetUser getUsers(){ PersistenceManager pm = pmf.getPersistenceManager(); SetUser users = (SetUser)pm.getManagedObjects (User.class); pm.close(); return users; } } Things go wrong when making the call tomakePersistent. The exception is: 08-sep-2009 16:51:35 com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue init INFO: Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.init (FinalizableReferenceQueue.java:124) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools $WeakInterningPool.clinit(InterningPools.java:104) at com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool (InterningPools.java:48) at com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.clinit (ProtocolSupport.java:55) at com.google.apphosting.api.DatastorePb$PutRequest.freeze (DatastorePb.java:8452) at com.google.apphosting.api.DatastorePb$PutRequest$1.init (DatastorePb.java:8367) at com.google.apphosting.api.DatastorePb$PutRequest.clinit (DatastorePb.java:8364) at com.google.appengine.api.datastore.DatastoreServiceImpl.put
[appengine-java] Re: regording to change the port number
All App Engine documentation is at http://code.google.com/appengine/docs/, including a Getting Started Guide for Java at http://code.google.com/appengine/docs/java/gettingstarted/. - Jason On Thu, Sep 10, 2009 at 2:51 AM, anu nimmala anunimmala.nimm...@gmail.comwrote: Hi sreeekanth, So nice of u. Thanks for your reply, I have been working on dat sample app and its working fine,iam really thankful to you.Actually when i searched for some developer guides book, and i could find a developer guide book for python (free download) but not able to find a developer guide for java (free download).If you could help me with any developer guide please let me know. If i have any problem in developing sample applications using googleappengine sdk with java using eclipse i will get back to you. Thanks in advance anu On Thu, Sep 10, 2009 at 11:52 AM, Sreekanth Raju R sraj...@gmail.comwrote: hi, hope this will help you http://dlinsin.blogspot.com/2009/04/playing-with-google-app-engine.html also you can try sample apps in the demos folder appengine-java-sdk-1.2.5\demos\ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Issue on using Spring MVC framework on GAE.
If you're subclassing SimpleFormController, you can also override the initBinder method in your custom classes directly. e.g.: @Override protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); binder.registerCustomEditor(Boolean.class, new CustomBooleanEditor(false)); binder.registerCustomEditor(Long.class, new CustomNumberEditor(Long.class, true)); } - Jason On Thu, Sep 10, 2009 at 5:00 AM, xueqiang.mi allo...@gmail.com wrote: Thanks. The problem I encountered is caused by the Spring form tag, I have fixed it. If you want to use form tag, you must override the initBinder method of WebBindingInitializer, otherwise you will get a error: org.springframework.web.servlet.tags.RequestContextAwareTag doStartTag: access denied (java.lang.RuntimePermission getClassLoader) java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) .. Nested in org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: java.security.AccessControlException cannot be cast to javax.servlet.ServletException: java.lang.ClassCastException: java.security.AccessControlException cannot be cast to javax.servlet.ServletException You should write your own WebBindingInitializer class {code} public class TheFocusBindingInitializer implements WebBindingInitializer { @Override public void initBinder(WebDataBinder binder, WebRequest request) { binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); } } {code} and then inject it into the AnnotationMethodHandlerAdapter by the following configuration: {xml} bean class=org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter property name=webBindingInitializer bean class=com.appspot.thefocus.web.TheFocusBindingInitializer / /property /bean {xml} On 9月10日, 下午4时13分, Loïc Talbot loic.tal...@gmail.com wrote: Hi, I've tried successfully spring mvc with this tutorial (Flex, graniteDS, springMVC) : http://graniteds.blogspot.com/2009/04/graniteds-20-on-google-app-engi... Moreover Spring MVC is compatible with GAE according to this : http://groups.google.com/group/google-appengine-java/web/will-it-play... You should find a more verbose and meaningful error in the console log underhttps://appengine.google.com/ The stack trace should be there. Loïc 2009/9/10 xueqiang.mi allo...@gmail.com Have anyone used Spring MVC framework on GAE? My project runs well on my pc, but after uploading on the GAE server, it doesn't work. A error comes out: Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. http://alloyer.appspot.com Can anyone help me here? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Exception since upgrading to 1.2.5
Trying to give you more info on this. - the error appears sometimes, it causes groovytweets.org fail every other request or so - retweets is a Collection of Entity Retweet, part of the Tweet Entity - worked fine before 1.2.5 - I never detached anything... if I need to, can someone provide an example? I did not find a lot searching jpa detaching. There only seems tobe EntityManager.clear() - which detaches everything. Will this work? Here the mapping: Tweet.groovy @OneToMany(mappedBy=tweet) ListReTweet retweets ReTweet.groovy @ManyToOne Tweet tweet The code that causes the exception is view code. In a controller, I get a couple of tweet instances and then pass them on to the view for rendering: 1 g:each in=${tweets} status=i var=tweet ... 23retweeted by ${tweet.prettyRetweets} ... 26 /g:each getPrettyRetweets is part of the Tweet Class, here is the implmenentation: 134 def getPrettyRetweets() 135 { 136 if (retweets) 137 return retweets.collect{@${it.userScreenName}}.join (', ') 138 else 139 return 'n/a' 140 } It will create a long string like @hansamann,@graemerocher and simply pass that back which will then end up in the view. Anything wrong with that? Any help appreciated, this is going on since a few days now Cheers Sven On Sep 11, 9:42 am, Max Ross maxr+appeng...@google.com wrote: Yes, please provide more information if you can. There was a bug fix in 1.2.5 that made queries respect fetch groups, but JPA doesn't have fetch groups so the error you're reporting suggests that something is wrong here. Can you boil it down to a small snippet that reproduces the problem? Thanks, Max On Wed, Sep 9, 2009 at 10:34 PM, datanucleus andy_jeffer...@yahoo.comwrote: I am using JPA btw, so can someone tell me if I need to do in order make this work again? Why does it work sometimes? Why not look in the log ? It tells you what is detached, when, and why. If a field (and who knows what type this field is ...) is not detached then you can't access it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Exception since upgrading to 1.2.5
I am not sure what you mean. I never detach anything explicitly, so I have no idea how to detach anything else. javax.jdo.JDODetachedFieldAccessException: You have just attempted to access field retweets yet this field was not detached when you detached the object. Either dont access this field, or detach it when detaching the object. I find that very strange. 1. I am using JPA, how do I get a JDO exception? 2. I never detach anything... so who detaches the main object in this case? Some default behaviour? 3. All I found for detaching reg. JPA is this: In JPA, objects detach automatically when they are serialized or when a persistence context ends. The specification does not define any way to explicitly detach objects. All I found somewhere and I doubt this works on app-engine ( I am not sure which side effects it has, too): EntityManager.clear() - this will detach all objects... --- Would it help if I access the retweets collection right after I queried the datastore? One thing that could be troubling us here is that the view code will call back into the entity objects and then trigger the access of the retweets list. Maybe some context is closed at this point... Cheers Sven On Sep 9, 10:34 pm, datanucleus andy_jeffer...@yahoo.com wrote: I am using JPA btw, so can someone tell me if I need to do in order make this work again? Why does it work sometimes? Why not look in the log ? It tells you what is detached, when, and why. If a field (and who knows what type this field is ...) is not detached then you can't access it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Exception since upgrading to 1.2.5
I am not sure what you mean. I never detach anything explicitly, so I have no idea how to detach anything else. Yes you do ... in JPA at commit or at close of the EntityManager the contract is to detach all current entities, as per the JPA spec. As you identified later in your post. javax.jdo.JDODetachedFieldAccessException: You have just attempted to access field retweets yet this field was not detached when you detached the object. Either dont access this field, or detach it when detaching the object. I find that very strange. 1. I am using JPA, how do I get a JDO exception? Because the JPA spec doesn't define the behaviour of accessing an undetached field of a detached object so we can throw whatever we want. We could throw something DataNucleus specific but then what's the point ? In some implementations they do nothing and return null, so the user has no real expectation here. Symptoms of a poor spec ... JPA2 will provide a detach method, when the spec is final ... --Andy (DataNucleus) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: where should I copy logging.properties for testing?
I talked to another developer about this, and this is what he mentioned: He may need to be setting the system property that points to the location of the logging.properties file in his test runner. The web server gets this property set in appengine-web.xml, but if he's outside of the server, he may need to do this his own way. java -Djava.util.logging.config.file=/path/to/logging.properties ... Can you try setting the system property by editing your test's launch configuration, and see if that makes a difference? On Fri, Sep 11, 2009 at 12:14 PM, Alejandro D. Garin aga...@gmail.comwrote: Hi Rick, The problem is with my testcase, the logging is working fine running the jetty server. I don't want to have all the JDO INFO logs for my test. On Fri, Sep 11, 2009 at 12:03 PM, rick rick4567892...@yahoo.com wrote: Hi Alejandro, What entry do you have in your appengine-web.xml file ? look at http://code.google.com/appengine/docs/java/runtime.html#logging --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Exception since upgrading to 1.2.5
Related: why are child objects not automatically detached if the parent is detached? Would that not not logical? Cheers Sven On Fri, Sep 11, 2009 at 12:51 PM, Sven Haiges sven.hai...@googlemail.com wrote: Andy, first of all thx for the response. Things begin to make a little more sense. But still how do I solve my specific issue then. Is the solution to access the retweets field within the JPA callback in this case (as outside it counts as a 'commit' ?? This is the groovy / grails code used in this case. I could try to access the retweets at XXX and then save the result in another, transient field... but this is really ugly. def tweetInstanceList =[] 38 jpaTemplate.execute( { entityManager - 39 def query = entityManager.createQuery(select tweet from org.groovytweets.Tweet tweet order by tweet.statusId desc) 40 query.maxResults = 50 41 tweetInstanceList = query.resultList XXX 42 } as JpaCallback ) --- So detaching retweets seems like the best. But how? If you are saying JPA1 does not allow this, it means there is no way for me to make this nice? Cheers Sven On Fri, Sep 11, 2009 at 12:43 PM, datanucleus andy_jeffer...@yahoo.com wrote: I am not sure what you mean. I never detach anything explicitly, so I have no idea how to detach anything else. Yes you do ... in JPA at commit or at close of the EntityManager the contract is to detach all current entities, as per the JPA spec. As you identified later in your post. javax.jdo.JDODetachedFieldAccessException: You have just attempted to access field retweets yet this field was not detached when you detached the object. Either dont access this field, or detach it when detaching the object. I find that very strange. 1. I am using JPA, how do I get a JDO exception? Because the JPA spec doesn't define the behaviour of accessing an undetached field of a detached object so we can throw whatever we want. We could throw something DataNucleus specific but then what's the point ? In some implementations they do nothing and return null, so the user has no real expectation here. Symptoms of a poor spec ... JPA2 will provide a detach method, when the spec is final ... --Andy (DataNucleus) -- Sven Haiges sven.hai...@googlemail.com Yahoo Messenger / Skype: hansamann Personal Homepage, Wiki Blog: http://www.svenhaiges.de Subscribe to the Grails Podcast: http://www.grailspodcast.com -- Sven Haiges sven.hai...@googlemail.com Yahoo Messenger / Skype: hansamann Personal Homepage, Wiki Blog: http://www.svenhaiges.de Subscribe to the Grails Podcast: http://www.grailspodcast.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: where should I copy logging.properties for testing?
Rajeev: adding the below argument to my ant junit task solves the problem. jvmarg value=-Djava.util.logging.config.file=war\WEB-INF\logging.properties/ Thanks! On Fri, Sep 11, 2009 at 4:44 PM, Rajeev Dayal rda...@google.com wrote: I talked to another developer about this, and this is what he mentioned: He may need to be setting the system property that points to the location of the logging.properties file in his test runner. The web server gets this property set in appengine-web.xml, but if he's outside of the server, he may need to do this his own way. java -Djava.util.logging.config.file=/path/to/logging.properties ... Can you try setting the system property by editing your test's launch configuration, and see if that makes a difference? On Fri, Sep 11, 2009 at 12:14 PM, Alejandro D. Garin aga...@gmail.com wrote: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Exception since upgrading to 1.2.5
Related: why are child objects not automatically detached if the parent is detached? Would that not not logical? JPA doesn't have fetch groups as such, just a default fetch group. This is defined by which fields are EAGER loaded. So if you had your field marked as EAGER then it would be detached. By default 1-N fields are LAZY hence not detached. The reason we don't just detach child objects is that of where do you stop ? Detach a full object graph ? That'd hammer the performance on some graphs, hence done using the fetch groups etc. Try accessing the field before the detach. The log will tell you whether/when it is detached. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Problem saving an object using makePersistent
I've been seeing the same thing, and also only on the first access after application start. It happens consistently for me with my first call to either getObjectById makePersistent or makePersistentAll. In my attempts to search the web for info, I ran across a snippet of code that included the specified error message text. A comment in that source said something like this is a harmless exception, we should figure out a way to suppress it. Yeah, I was annoyed at having spent a bunch of time thinking this was the source of an issue when it was only a red herring. Sorry I don't remember the url to that code snippet but searching for pieces of the error message from the beginning of your stack trace should eventually find it. I'm currently choosing to ignore the exception and everything appears to be working for me. On Sep 11, 12:01 pm, Jason (Google) apija...@google.com wrote: You shouldn't need the @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) line since you're using a key name and not a String-encoded ID. The only thing that looks suspicious is your pmf object. The best practice is to use a PersistenceManagerFactory singleton as documented athttp://code.google.com/appengine/docs/java/datastore/usingjdo.html#Ge..., but I would expect to see exceptions with subsequent calls to saveUser, not the first call. All the same, I recommend you try this to see if it helps, and please also let me know which version of the SDK you're using. - Jason On Thu, Sep 10, 2009 at 1:09 AM, bysse erik.byst...@gmail.com wrote: As expected, this has nothing to do with wicket or sessions, just to be sure i've checked those. If fact, all entities get persisted as they should and the exception is caught somewhere in makePersistent. So as far as i know, no harm is done(?) So i think i'll just ignore this stacktrace and continue as usual. On Sep 10, 12:22 am, bysse erik.byst...@gmail.com wrote: I also get this exception, but only on the first call to makePersistent. First Call: Exception Store objects ? Later Calls Ok Stores objects Can't think of anything that causes this. I'm using Wicket, how about you? /Erik On Sep 8, 7:48 pm, cancunmods archie.she...@gmail.com wrote: I am having trouble saving an object on google app engine. Here is my POJO class: package subasta.domain.users; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.PrimaryKey; import javax.jdo.annotations.Persistent; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class User { @PrimaryKey @Persistent private String nombre; public User(String nombre){ this.nombre = nombre; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } } Here is my JDO Code.: package subasta.repository.users; import java.util.Set; import java.util.logging.Logger; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; import javax.jdo.PersistenceManager; import subasta.domain.users.User; public class JDOUserDAO implements UserDAO{ /** Logger for this class and subclasses */ private static final Logger log = Logger.getLogger(UserDAO.class .getName()); private static final PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(transactions- optional); //PersistenceManagerFactory pmf; //public void setPmf(PersistenceManagerFactory pmf) { //this.pmf = pmf; //} public void saveUser(User user){ PersistenceManager pm = pmf.getPersistenceManager(); try{ pm.makePersistent(user); }finally { pm.close(); } } @SuppressWarnings(unchecked) public SetUser getUsers(){ PersistenceManager pm = pmf.getPersistenceManager(); SetUser users = (SetUser)pm.getManagedObjects (User.class); pm.close(); return users; } } Things go wrong when making the call tomakePersistent. The exception is: 08-sep-2009 16:51:35 com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue init INFO: Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at
[appengine-java] Re: makePersistent fails silently
Hi Ken. This is a known issue -- one-to-many owned relationships of the same kind aren't persisted correctly. We do plan to address this particular issue in a forthcoming update. In the meantime though, you can look into using unowned relationships (list of keys) instead which should work. - Jason On Thu, Sep 10, 2009 at 9:23 AM, Ken kenot...@gmail.com wrote: I have a JDO class representing a tree of entities, somewhat like this: public class TreeNode { private String nodeName; private ListTreeNode children; ... } When I persist any such node to the datastore, the insert fails silently. The key of the object returned from makePersistent is null, and no entities reside in the data viewer. However, If I remove the 'children' field, or replace it with a list of keys, then objects may be persisted, but I get a chicken-and-egg problem when trying to create the entity key relationship, as the child key is not available until its entity is persisted, which means I cannot set the parent key on the child key after it has been persisted. Is this the expected behavior of the datastore? Are classes w/ fields of the same type allowed? How would one persist a tree otherwise, maintaining proper entity key parent/child relationships to ensure the whole tree is available in a transaction? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Why is Stored Data Usage increasing even though no data was added?
That could be. Thanks. On Sep 11, 8:30 am, fat bold cyclop fat.bold.cyc...@gmail.com wrote: Do anybody know why is Stored Data Usage increasing even though no data was added? When there is no data persisted by my appilcation, the only thing that makes my datastore grow is _ah_SESSION Entities (session data backed up by the database). Maybe it's the same thing in your case? Regards, fat bold cyclop --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Unable to deploy with 1.2.5 SDK (.jsp' does not match expression '^(?!\^)/|\.|(\(.).*(?!\$).$')
Awesome! I am glad it works for you. On Sep 11, 8:22 am, fat bold cyclop fat.bold.cyc...@gmail.com wrote: When you upgrade the SDK, make sure that the SDK under Google/App Engine in Preferences is also changed. If possible, remove the old SDK in Preferences. And check to make sure that you have the latest jar (1.2.5) in the lib folder. When you upgrade, it should already replace the old SDK jar to the new one. Like I said, I DID change the SDK. After all that was the thing that triggered my problem. :) Anyway I just found the solution. In my web.xml I had the following fragment: security-constraint display-nameuser settings/display-name web-resource-collection web-resource-namesettings page/web-resource-name url-patternuserPreferences.jsp/url-pattern /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint This was perfectly fine under 1.2.2. 1.2.5 seems to be more picky about this. I did some reading andServlet Specification, section SRV.11.2.1 Implicit Mappings says (as I understand it), that the url-pattern for .jsp page should start with slash, like this: url-pattern/userPreferences.jsp/url-pattern After the correction, everything works fine. Hope this post saves someone some troubles :-) Regards, fat bold cyclop --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Sending mail with the mail api
Just to clarify, you are sending these from a deployed application, correct? - Jason On Tue, Sep 8, 2009 at 9:06 PM, king kingalpha...@gmail.com wrote: I have the same problem. I sent out 3 email and have been waiting for hours, still no email arrived at my inbox, there is no error message either. Does anyone have any update on this issue? On Aug 20, 12:00 pm, DrMorten morten.dalgaard.niel...@gmail.com wrote: Nothing in the log about failed messages. I've made a Grails Service sending my emails. Basiclly I just cut and pasted the info fromhttp:// code.google.com/appengine/docs/java/mail/usingjavamail.html, and modified it to fit my needs. Just as a quick version to get it working. I pasted the service below. class MailService { boolean transactional = true def sendMail(subject, msgBody, from, fromText, too, tooText) { Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); try { def msg = new MimeMessage(session); msg.setFrom(new InternetAddress(from, fromText)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(too, tooText)); msg.setSubject(subject); msg.setText(msgBody); Transport.send(msg); } catch (AddressException e) { log.error(address error sendingmail, e) } catch (MessagingException e) { log.error(messaging exception sendingmail, e) } } } On Aug 20, 8:48 pm, Jason (Google) apija...@google.com wrote: Did you check your application's logs to see if there were any errors sending the messages? What code were you using to send the emails? - Jason On Wed, Aug 19, 2009 at 7:47 AM, DrMorten morten.dalgaard.niel...@gmail.com wrote: I sent about 7 emails last night to my own email address. They havnt arrived, Ive checked the code and the addresses were right. The Quotas say that I've sent the e-mails. Anyone have an idea of how long it should take to send to a gmail 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-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Updating detached objects only works when fetched within a transaction (JDO)
What do your JDO objects look like? - Jason On Thu, Sep 10, 2009 at 10:07 AM, Toby tobias.ro...@sunnymail.mobi wrote: Hello Jason, I have a similar problem and I use the way you suggest by invoking the detachCopyAll method. It works fine, my objects are detached. I have problem with objects that contain collections. The collections are not detached, they stay null. I tried several things, like wrapping into a transaction. pm.setDetachAllOnCommit(true); .. Nothing. The only thing that solves the issue is touching that collection before I detache. That is quite ugly code. I am sure it is a little thing but I can not figure it out. Do you have a hint for me? Thank you, Tobias On Sep 5, 1:56 am, Jason (Google) apija...@google.com wrote: I can see where our documentation is misleading about this topic, and I'm working to get this updated. - Jason On Fri, Sep 4, 2009 at 4:54 PM, Jason (Google) apija...@google.com wrote: What code are you using to detach the entities? If you're just calling setDetachAllOnCommit, then yes, this requires a transaction. If you don't use transactions, then you can do something like this: obj = pm.getObjectById(Object.class, key); obj = pm.detachCopy(obj); There's a similar detachCopyAll for detaching Collections. I use these in my own applications and they work fine. - Jason On Thu, Sep 3, 2009 at 11:28 AM, Esteban Masoero emaso...@getsense.com.ar wrote: Hi there, I'm having a problem similar to the one described here http://groups.google.com/group/google-appengine-java/browse_thread/th. .. , but using JDO instead of JPA. Instead of fetching the object in a normal way, I fetched it inside a transaction and it worked fine (the object was properly detached). Should an issue be reported? or is this problem addressed by the the issue 1906 (http://code.google.com/p/googleappengine/issues/detail?id=1906)?(Ihttp://code.google.com/p/googleappengine/issues/detail?id=1906%29?%28Iask it because as I see, the exceptions thrown by that JPA-examble are jdo exceptions, so it gives me the feeling that JDO and JPA share some components, and consequently it would be the same bug.) Thanks, Esteban --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Exception since upgrading to 1.2.5
Thanx, I will try this out tonight as soon as I get access to the code again. It seems making the fetchType EAGER is best, as I will access the filed in all cases, so there is no processing wasted I guess. Out of my head, this would be the solution I guess (changing to FetchType.EAGER, LAZY was default) @OneToMany(mappedBy=tweet, fetch=FetchType.EAGER) ListReTweet retweets Thanx for your time, I will update this thread later with the result. Cheerrs Sven On Fri, Sep 11, 2009 at 1:14 PM, datanucleus andy_jeffer...@yahoo.com wrote: Related: why are child objects not automatically detached if the parent is detached? Would that not not logical? JPA doesn't have fetch groups as such, just a default fetch group. This is defined by which fields are EAGER loaded. So if you had your field marked as EAGER then it would be detached. By default 1-N fields are LAZY hence not detached. The reason we don't just detach child objects is that of where do you stop ? Detach a full object graph ? That'd hammer the performance on some graphs, hence done using the fetch groups etc. Try accessing the field before the detach. The log will tell you whether/when it is detached. -- Sven Haiges sven.hai...@googlemail.com Yahoo Messenger / Skype: hansamann Personal Homepage, Wiki Blog: http://www.svenhaiges.de Subscribe to the Grails Podcast: http://www.grailspodcast.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Problem saving an object using makePersistent
Hi, I am using spring in my application and the pmf is a singleton, I put it in the class just to make sure it is not a spring issue. I am still getting the error but in my case nothing is persisted. I also added the @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) line and no dice my SDK version is the newest 1.2.5. The following is the spring code from which I am calling the saveUser method I had posted before. Any help would be greatly appreciaed, thanks. package subasta.web.users; import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.servlet.mvc.SimpleFormController; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.view.RedirectView; import org.springframework.beans.factory.annotation.Autowired; import subasta.domain.users.User; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import java.util.logging.Logger; import subasta.service.users.GuardaUsuario; import subasta.repository.users.UserDAO; public class RegisterController extends SimpleFormController { /** Logger for this class and subclasses */ private static final Logger log = Logger.getLogger (RegisterController.class .getName()); private UserDAO userDao; public void setUserDao(UserDAO userDao) { this.userDao = userDao; } @Override public ModelAndView onSubmit(Object command) throws ServletException { String nombre = ((GuardaUsuario) command).getNombre(); log.info(Guardando usuario + nombre + .); User user = new User(nombre); userDao.saveUser(user); log.info(returning from RegisterController view to + getSuccessView()); return new ModelAndView(new RedirectView(getSuccessView())); } /* * This was added because after uploading to GAE I was getting an exception, it is * actually a pretty neat addition, taken from its javadoc: * Property editor that trims Strings. Optionally allows transforming an empty string into a null value. Needs to be explictly registered, e.g. for command binding. * @see org.springframework.web.servlet.mvc.BaseCommandController#initBinder (javax.servlet.http.HttpServletRequest, org.springframework.web.bind.ServletRequestDataBinder) */ @Override protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); } } On Sep 11, 3:31 pm, Jeff j...@jgyoung.com wrote: I've been seeing the same thing, and also only on the first access after application start. It happens consistently for me with my first call to either getObjectById makePersistent or makePersistentAll. In my attempts to search the web for info, I ran across a snippet of code that included the specified error message text. A comment in that source said something like this is a harmless exception, we should figure out a way to suppress it. Yeah, I was annoyed at having spent a bunch of time thinking this was the source of an issue when it was only a red herring. Sorry I don't remember the url to that code snippet but searching for pieces of the error message from the beginning of your stack trace should eventually find it. I'm currently choosing to ignore the exception and everything appears to be working for me. On Sep 11, 12:01 pm, Jason (Google) apija...@google.com wrote: You shouldn't need the @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) line since you're using a key name and not a String-encoded ID. The only thing that looks suspicious is your pmf object. The best practice is to use a PersistenceManagerFactory singleton as documented athttp://code.google.com/appengine/docs/java/datastore/usingjdo.html#Ge..., but I would expect to see exceptions with subsequent calls to saveUser, not the first call. All the same, I recommend you try this to see if it helps, and please also let me know which version of the SDK you're using. - Jason On Thu, Sep 10, 2009 at 1:09 AM, bysse erik.byst...@gmail.com wrote: As expected, this has nothing to do with wicket or sessions, just to be sure i've checked those. If fact, all entities get persisted as they should and the exception is caught somewhere in makePersistent. So as far as i know, no harm is done(?) So i think i'll just ignore this stacktrace and continue as usual. On Sep 10, 12:22 am, bysse erik.byst...@gmail.com wrote: I also get this exception, but only on the first call to makePersistent. First Call: Exception
[appengine-java] Re: URLFetching is failinging
Which URL are you using? The above code is working for me. You can go ahead and disregard the getResponseBody warning -- it shouldn't affect the response from being returned to your app. - Jason On Wed, Sep 9, 2009 at 1:22 PM, Raghu visuma...@gmail.com wrote: Hi ALL, I'm just trying to fetch url using following code: == PrintWriter out=response.getWriter(); URLFetchService f=URLFetchServiceFactory.getURLFetchService(); HTTPResponse r=f.fetch(new URL( http://dummyurl.ccom/rss.xml;)); byte[] b=r.getContent(); for (byte c : b) { out.write((char)c); } = And I'm getting following message with blank servlet response Sep 9, 2009 8:17:07 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. Please recommend me the solution for this. thanks rag --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Maven
On Sep 4, 8:36 am, Nikolay Gorylenko n0...@jug.ua wrote: please include 1.2.5 jars tohttp://www.mvnsearch.org/maven2/com/google/appengine/ +1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Startup takes forever
On Wed, Sep 9, 2009 at 6:48 AM, David Given d...@cowlark.com wrote: Toby Reyelts wrote: [...] 5000 ms is excessive for container startup. You say this happens before your code starts to run, but the warnings you're seeing from FinalizableReferenceQueue come from a dependency on our datastore API, which you can clearly see in your stacktrace. Some questions for you: 1) Are you absolutely sure you're not running app code which is causing this delay? Try hitting just an empty servlet or filter. My servlet init method consists of: void init() { super.init() log(message) ... } ...and the delay is happening before the message tracing appears. The FinalizableReferenceQueue messages appear later --- they take several hundred milliseconds to be emitted, but that's nothing compared to the startup delay. I can safely ignore these messages, right? Yes, that is correct. This message is harmless and I've confirmed that it is not affecting the performance of your application. 2) Can you reproduce this latency consistently? 3) What is your appid? It does appear to be consistent (although it's tedious to reproduce, since I have to wait for the servlet to be shut down --- is there a way to make this happen manually?). My app id is stellation2; there's a good example today for /stellation2/greet at 09-09 03:58AM 09.451. I took a close look at this application and, while I don't have a complete picture of why you're seeing this 1-3 second delay between the start of a request and your servlets init method being called, I was able to test out a few optimizations that we have planned for future releases which will help the performance of this application considerably. Thanks for the report. Expect your performance to improve over time, but at the moment I don't have any specific suggestions for you. If you're worried that your users will experience this extra delay, I would consider adding another RPC call that begins at the same time you display the login panel. Hopefully be the time the user enters their details the servlet will be warmed up. If you manage to gather any further details, please let us know. Thanks, Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Session destruction events, API availability therein
Hi Jason, Thanks for the response. I'm seeing it in the development environment. I can't even get ahold of a stack trace in production because the logged events I try to throw just aren't reaching the Logs manager. I do know that it's not working, however, because the object doesn't get inserted in the following code. Here's some sample code to show what's happening, and a stack trace of the error it throws public class SessionListener implements HttpSessionListener { private static final Logger log = Logger .getLogger(DataNucleus.JDO); @Override public void sessionCreated(HttpSessionEvent ev) { System.out.println(Session starting); ev.getSession().setMaxInactiveInterval(2); } @Override public void sessionDestroyed(HttpSessionEvent ev) { try { System.out.println(Session ending); PersistenceManager pm = PMF.get().getPersistenceManager(); System.out.println(pm); PersistMe me = new PersistMe(); me.setName(Erem); pm.makePersistent(me); pm.close(); System.out.println(Session ended); } catch (Exception e) { log.log(Level.SEVERE, Failed in session cleanup, e); } } } This code, when run from the dev server makes this error Sep 11, 2009 3:50:53 PM lotr.server.SessionListener sessionDestroyed SEVERE: Failed in session cleanup java.lang.NullPointerException: No API environment is registered for this thread. at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId (DatastoreApiHelper.java:63) at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace (DatastoreApiHelper.java:73) at com.google.appengine.api.datastore.Key.init(Key.java:100) at com.google.appengine.api.datastore.Key.init(Key.java:85) at com.google.appengine.api.datastore.Key.init(Key.java:81) at com.google.appengine.api.datastore.Entity.init(Entity.java:103) at com.google.appengine.api.datastore.Entity.init(Entity.java:84) at org.datanucleus.store.appengine.DatastoreFieldManager.init (DatastoreFieldManager.java:167) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject (DatastorePersistenceHandler.java:178) at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent (JDOStateManagerImpl.java:3185) at org.datanucleus.state.JDOStateManagerImpl.makePersistent (JDOStateManagerImpl.java:3161) at org.datanucleus.ObjectManagerImpl.persistObjectInternal (ObjectManagerImpl.java:1298) at org.datanucleus.ObjectManagerImpl.persistObject (ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent (JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent (JDOPersistenceManager.java:694) at lotr.server.SessionListener.sessionDestroyed(SessionListener.java: 26) at org.mortbay.jetty.servlet.AbstractSessionManager.removeSession (AbstractSessionManager.java:661) at org.mortbay.jetty.servlet.AbstractSessionManager$Session.timeout (AbstractSessionManager.java:918) at org.mortbay.jetty.servlet.HashSessionManager.scavenge (HashSessionManager.java:200) at org.mortbay.jetty.servlet.HashSessionManager.access$000 (HashSessionManager.java:36) at org.mortbay.jetty.servlet.HashSessionManager$1.run (HashSessionManager.java:144) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) On Sep 11, 11:37 am, Jason (Google) apija...@google.com wrote: Hi Erum. Are you seeing this error in the development environment or in production? - Jason On Wed, Sep 9, 2009 at 5:43 PM, Erem ehb...@gmail.com wrote: Hey All, What is the best way to tie into session destruction events? I have implemented an HttpSessionListener and put it in my web.xml. The SessionListener gets called, but any attempt to do DataStore or URLFetch API calls within sessionDestroyed results in errors. For example, the JDO API throws: Exception in thread Timer-125 java.lang.NullPointerException: No API environment is registered for this thread. at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId (DatastoreApiHelper.java:63) at com.google.appengine.api.datastore.QueryTranslator.convertToPb (QueryTranslator.java:35) My app has constructs of Visitors (anyone who comes to the site) and Users (verified accounts). The former's data get stored in sessions, the latter explicitly in the datastore. Every User has an ArrayListVisitor, listing the visitors currently logged in to the User's account. When a session is
[appengine-java] Re: Session destruction events, API availability therein
The same code in a request works fine btw. On Sep 11, 3:54 pm, Erem ehb...@gmail.com wrote: Hi Jason, Thanks for the response. I'm seeing it in the development environment. I can't even get ahold of a stack trace in production because the logged events I try to throw just aren't reaching the Logs manager. I do know that it's not working, however, because the object doesn't get inserted in the following code. Here's some sample code to show what's happening, and a stack trace of the error it throws public class SessionListener implements HttpSessionListener { private static final Logger log = Logger .getLogger(DataNucleus.JDO); @Override public void sessionCreated(HttpSessionEvent ev) { System.out.println(Session starting); ev.getSession().setMaxInactiveInterval(2); } @Override public void sessionDestroyed(HttpSessionEvent ev) { try { System.out.println(Session ending); PersistenceManager pm = PMF.get().getPersistenceManager(); System.out.println(pm); PersistMe me = new PersistMe(); me.setName(Erem); pm.makePersistent(me); pm.close(); System.out.println(Session ended); } catch (Exception e) { log.log(Level.SEVERE, Failed in session cleanup, e); } } } This code, when run from the dev server makes this error Sep 11, 2009 3:50:53 PM lotr.server.SessionListener sessionDestroyed SEVERE: Failed in session cleanup java.lang.NullPointerException: No API environment is registered for this thread. at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId (DatastoreApiHelper.java:63) at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace (DatastoreApiHelper.java:73) at com.google.appengine.api.datastore.Key.init(Key.java:100) at com.google.appengine.api.datastore.Key.init(Key.java:85) at com.google.appengine.api.datastore.Key.init(Key.java:81) at com.google.appengine.api.datastore.Entity.init(Entity.java:103) at com.google.appengine.api.datastore.Entity.init(Entity.java:84) at org.datanucleus.store.appengine.DatastoreFieldManager.init (DatastoreFieldManager.java:167) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject (DatastorePersistenceHandler.java:178) at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent (JDOStateManagerImpl.java:3185) at org.datanucleus.state.JDOStateManagerImpl.makePersistent (JDOStateManagerImpl.java:3161) at org.datanucleus.ObjectManagerImpl.persistObjectInternal (ObjectManagerImpl.java:1298) at org.datanucleus.ObjectManagerImpl.persistObject (ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent (JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent (JDOPersistenceManager.java:694) at lotr.server.SessionListener.sessionDestroyed(SessionListener.java: 26) at org.mortbay.jetty.servlet.AbstractSessionManager.removeSession (AbstractSessionManager.java:661) at org.mortbay.jetty.servlet.AbstractSessionManager$Session.timeout (AbstractSessionManager.java:918) at org.mortbay.jetty.servlet.HashSessionManager.scavenge (HashSessionManager.java:200) at org.mortbay.jetty.servlet.HashSessionManager.access$000 (HashSessionManager.java:36) at org.mortbay.jetty.servlet.HashSessionManager$1.run (HashSessionManager.java:144) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) On Sep 11, 11:37 am, Jason (Google) apija...@google.com wrote: Hi Erum. Are you seeing this error in the development environment or in production? - Jason On Wed, Sep 9, 2009 at 5:43 PM, Erem ehb...@gmail.com wrote: Hey All, What is the best way to tie into session destruction events? I have implemented an HttpSessionListener and put it in my web.xml. The SessionListener gets called, but any attempt to do DataStore or URLFetch API calls within sessionDestroyed results in errors. For example, the JDO API throws: Exception in thread Timer-125 java.lang.NullPointerException: No API environment is registered for this thread. at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId (DatastoreApiHelper.java:63) at com.google.appengine.api.datastore.QueryTranslator.convertToPb (QueryTranslator.java:35) My app has constructs of Visitors (anyone who comes to the site) and Users (verified accounts). The former's data get
[appengine-java] Re: Application failing suddenly
and now the error seems to be gone and everything is suddenly back to normal. On Sep 11, 3:56 pm, yohann.richard frenchy...@gmail.com wrote: Hi guys, Our application was running fine since yesterday's push until about an hour ago when we suddenly get the error below when users are logued in. Any idea what's going on or why it suddenly shows up after hours of correct behavior ? Thanks, Yohann Uncaught exception from servlet java.lang.NoClassDefFoundError: Could not initialize class com.fantastreak.server.EMF at com.fantastreak.layout.LayoutManager.writePageHeader (LayoutManager.java:48) at org.apache.jsp.admin.metrics_jsp._jspService(metrics_jsp.java:50) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter (SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:237) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete (HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable (RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest (JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest (JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4950) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:4948) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 359) at com.google.net.rpc.impl.Server$2.run(Server.java:823) at com.google.tracing.LocalTraceSpanRunnable.run (LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan (LocalTraceSpanBuilder.java:516) at com.google.net.rpc.impl.Server.startRpc(Server.java:778) at com.google.net.rpc.impl.Server.processRequest(Server.java:351) at com.google.net.rpc.impl.ServerConnection.messageReceived (ServerConnection.java:437) at com.google.net.rpc.impl.RpcConnection.parseMessages (RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived (RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 428) at com.google.net.async.EventDispatcher.processNetworkEvents (EventDispatcher.java:762) at com.google.net.async.EventDispatcher.internalLoop (EventDispatcher.java:207) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown (RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run (JavaRuntime.java:392) at java.lang.Thread.run(Unknown Source) Unexpected exception from servlet: java.lang.NoClassDefFoundError: Could not initialize class com.fantastreak.server.EMF --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at
[appengine-java] Re: Bulk writes to datastore
So now, I am hitting Datastore timeouts and Request timeouts ... I really really think you guys need to add a mechanism that allows developers to simply do bulk uploads of data into their GAE applications (from Java thank you). :) On Sep 11, 9:06 am, Larry Cable larry.ca...@gmail.com wrote: I tried doing a bulk load with the JDO makePersistentAll(..) call yesterday ... by default what I did was created a List of size 2048, filled it to capacity and then called makePersistentAll() ... I got an IllegalArgumentException out of that call stating that you could only persist at most 500 objects per call ... I was unable to retest this, because despite making a change to the capacity of the the List to 500 and re-deploying the redeployment did not seem to take effect ... will keep trying ... On Sep 4, 5:24 pm, Jason (Google) apija...@google.com wrote: Batch puts are supported, yes, and as of yesterday's release, calling makePersistentAll (JDO) and the equivalent JPA call will take advantage of this support (previously, you had to use the low-level API). Two quick notes: 1) All of the entities that you're persisting should be in separate entity groups since two entities in the same entity group can't be written to consecutively, and you will see datastore timeout exceptions if many simultaneous write requests come in for the same entity or entity group. 2) Batch puts do not operate in a transaction. This means that some writes may succeed but others may not, so if you need the ability to rollback, you'll need transactions. - Jason Let me know if you have any more questions on this. - Jason On Thu, Sep 3, 2009 at 7:24 PM, Nicholas Albion nalb...@gmail.com wrote: Is it possible to overcome the datastore's 10 writes/second limit by batching them? I've got a table containing just over one million records (in CSV format). Does a batched write (of around 1MB of data and, say 1000 records) count as one write, or 1000 writes?- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Session destruction events, API availability therein
Hi Erum. App Engine doesn't support this callback, so when sessionDestroyed is triggered by the development server, it's not within an active request and hence the exception that you're seeing. In the production environment, you would see a similar result if the callback is even triggered at all. The fact that the development server does trigger sessionDestroyed is a bug in the SDK. Please file a new report in our public tracker, and I'm sorry for the bad news. http://code.google.com/p/googleappengine/issues/list - Jason On Fri, Sep 11, 2009 at 3:54 PM, Erem ehb...@gmail.com wrote: Hi Jason, Thanks for the response. I'm seeing it in the development environment. I can't even get ahold of a stack trace in production because the logged events I try to throw just aren't reaching the Logs manager. I do know that it's not working, however, because the object doesn't get inserted in the following code. Here's some sample code to show what's happening, and a stack trace of the error it throws public class SessionListener implements HttpSessionListener { private static final Logger log = Logger .getLogger(DataNucleus.JDO); @Override public void sessionCreated(HttpSessionEvent ev) { System.out.println(Session starting); ev.getSession().setMaxInactiveInterval(2); } @Override public void sessionDestroyed(HttpSessionEvent ev) { try { System.out.println(Session ending); PersistenceManager pm = PMF.get().getPersistenceManager(); System.out.println(pm); PersistMe me = new PersistMe(); me.setName(Erem); pm.makePersistent(me); pm.close(); System.out.println(Session ended); } catch (Exception e) { log.log(Level.SEVERE, Failed in session cleanup, e); } } } This code, when run from the dev server makes this error Sep 11, 2009 3:50:53 PM lotr.server.SessionListener sessionDestroyed SEVERE: Failed in session cleanup java.lang.NullPointerException: No API environment is registered for this thread. at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId (DatastoreApiHelper.java:63) at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace (DatastoreApiHelper.java:73) at com.google.appengine.api.datastore.Key.init(Key.java:100) at com.google.appengine.api.datastore.Key.init(Key.java:85) at com.google.appengine.api.datastore.Key.init(Key.java:81) at com.google.appengine.api.datastore.Entity.init(Entity.java:103) at com.google.appengine.api.datastore.Entity.init(Entity.java:84) at org.datanucleus.store.appengine.DatastoreFieldManager.init (DatastoreFieldManager.java:167) at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject (DatastorePersistenceHandler.java:178) at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent (JDOStateManagerImpl.java:3185) at org.datanucleus.state.JDOStateManagerImpl.makePersistent (JDOStateManagerImpl.java:3161) at org.datanucleus.ObjectManagerImpl.persistObjectInternal (ObjectManagerImpl.java:1298) at org.datanucleus.ObjectManagerImpl.persistObject (ObjectManagerImpl.java:1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent (JDOPersistenceManager.java:669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent (JDOPersistenceManager.java:694) at lotr.server.SessionListener.sessionDestroyed(SessionListener.java: 26) at org.mortbay.jetty.servlet.AbstractSessionManager.removeSession (AbstractSessionManager.java:661) at org.mortbay.jetty.servlet.AbstractSessionManager$Session.timeout (AbstractSessionManager.java:918) at org.mortbay.jetty.servlet.HashSessionManager.scavenge (HashSessionManager.java:200) at org.mortbay.jetty.servlet.HashSessionManager.access$000 (HashSessionManager.java:36) at org.mortbay.jetty.servlet.HashSessionManager$1.run (HashSessionManager.java:144) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) On Sep 11, 11:37 am, Jason (Google) apija...@google.com wrote: Hi Erum. Are you seeing this error in the development environment or in production? - Jason On Wed, Sep 9, 2009 at 5:43 PM, Erem ehb...@gmail.com wrote: Hey All, What is the best way to tie into session destruction events? I have implemented an HttpSessionListener and put it in my web.xml. The SessionListener gets called, but any attempt to do DataStore or URLFetch API calls within sessionDestroyed results in errors. For example, the JDO API throws:
[appengine-java] Re: Data Store Intro Broken?
My App Engine is pointed at SDK version 1.2.5. It looks like the auto- build runs cleanly and the imports all resolve (no red lines). When I run, the app engine server chokes when trying to render the GWT controls (textbox and buttons from the out-of-the-box new project pages. The error message: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget to inherit a required module? No source code is available for type javax.jdo.JDOHelper; did you forget to inherit a required module? A screen clip of the GWT Host is available here: http://picasaweb.google.com/jvandyne/GWTErrors#5380402173518528690 JARs appengine-api-1.0-sdk-1.2.5.jar appengine-api-labs-1.2.5.jar datanucleus-appengine-1.0.3.jar datanucleus-core-1.1.5.jar datanucleus-jpa-1.1.5.jar geronimo-jpa_3.0_spec-1.1.1.jar geronimo-jta_1.1_spec.1.1.1.jar gwt-servlet.jar jdo2-api-2.3-eb.jar On Sep 11, 1:46 pm, Jason (Google) apija...@google.com wrote: Hi James. If you right-click on your project and click Properties, do you see a valid SDK selected under Google - App Engine? If so, can you list the JAR files under your war/WEB-INF/lib directory and provide any other relevant output? Is Eclipse having trouble resolving your imports (i.e. they're underlined in red) or are you first seeing the error when you try to run your project? - Jason On Wed, Sep 9, 2009 at 6:26 PM, Jimmy V jvand...@gmail.com wrote: The intro for java data store is broken? I'm following the instructions from http://code.google.com/appengine/docs/java/datastore/usingjdo.html perfectly and am breaking on the addition of the PMF class. Errors from compile output: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget No source code is available for type javax.jdo.JDOHelper; did you forget I'm using the latest out-of-the-box google plugins and am finding great frustration. I'm sure this is commonly asked. Anybody can link me? TIA -- James VanDyne, MCPD Technology Consultant --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Data Store Intro Broken?
You guys gotta make this dummy proof. :) Next time I'll try keeping the stuff I want turned into javascript in the client project and everything else in the server or a separate package. ;) On Sep 11, 9:30 pm, Jimmy V jvand...@gmail.com wrote: My App Engine is pointed at SDK version 1.2.5. It looks like the auto- build runs cleanly and the imports all resolve (no red lines). When I run, the app engine server chokes when trying to render the GWT controls (textbox and buttons from the out-of-the-box new project pages. The error message: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget to inherit a required module? No source code is available for type javax.jdo.JDOHelper; did you forget to inherit a required module? A screen clip of the GWT Host is available here:http://picasaweb.google.com/jvandyne/GWTErrors#5380402173518528690 JARs appengine-api-1.0-sdk-1.2.5.jar appengine-api-labs-1.2.5.jar datanucleus-appengine-1.0.3.jar datanucleus-core-1.1.5.jar datanucleus-jpa-1.1.5.jar geronimo-jpa_3.0_spec-1.1.1.jar geronimo-jta_1.1_spec.1.1.1.jar gwt-servlet.jar jdo2-api-2.3-eb.jar On Sep 11, 1:46 pm, Jason (Google) apija...@google.com wrote: Hi James. If you right-click on your project and click Properties, do you see a valid SDK selected under Google - App Engine? If so, can you list the JAR files under your war/WEB-INF/lib directory and provide any other relevant output? Is Eclipse having trouble resolving your imports (i.e. they're underlined in red) or are you first seeing the error when you try to run your project? - Jason On Wed, Sep 9, 2009 at 6:26 PM, Jimmy V jvand...@gmail.com wrote: The intro for java data store is broken? I'm following the instructions from http://code.google.com/appengine/docs/java/datastore/usingjdo.html perfectly and am breaking on the addition of the PMF class. Errors from compile output: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget No source code is available for type javax.jdo.JDOHelper; did you forget I'm using the latest out-of-the-box google plugins and am finding great frustration. I'm sure this is commonly asked. Anybody can link me? TIA -- James VanDyne, MCPD Technology Consultant --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Issue on using Spring MVC framework on GAE.
yep, thanks. It really works, but i don't know why to do this. Can you explain it or post some links for me to learn a little deep. cheers, On Sep 12, 3:13 am, Jason (Google) apija...@google.com wrote: If you're subclassing SimpleFormController, you can also override the initBinder method in your custom classes directly. e.g.: @Override protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); binder.registerCustomEditor(Boolean.class, new CustomBooleanEditor(false)); binder.registerCustomEditor(Long.class, new CustomNumberEditor(Long.class, true)); } - Jason On Thu, Sep 10, 2009 at 5:00 AM, xueqiang.mi allo...@gmail.com wrote: Thanks. The problem I encountered is caused by the Spring form tag, I have fixed it. If you want to use form tag, you must override the initBinder method of WebBindingInitializer, otherwise you will get a error: org.springframework.web.servlet.tags.RequestContextAwareTag doStartTag: access denied (java.lang.RuntimePermission getClassLoader) java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) .. Nested in org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: java.security.AccessControlException cannot be cast to javax.servlet.ServletException: java.lang.ClassCastException: java.security.AccessControlException cannot be cast to javax.servlet.ServletException You should write your own WebBindingInitializer class {code} public class TheFocusBindingInitializer implements WebBindingInitializer { �...@override public void initBinder(WebDataBinder binder, WebRequest request) { binder.registerCustomEditor(String.class, new StringTrimmerEditor(false)); } } {code} and then inject it into the AnnotationMethodHandlerAdapter by the following configuration: {xml} bean class=org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandl erAdapter property name=webBindingInitializer bean class=com.appspot.thefocus.web.TheFocusBindingInitializer / /property /bean {xml} On 9月10日, 下午4时13分, Loïc Talbot loic.tal...@gmail.com wrote: Hi, I've tried successfully spring mvc with this tutorial (Flex, graniteDS, springMVC) : http://graniteds.blogspot.com/2009/04/graniteds-20-on-google-app-engi... Moreover Spring MVC is compatible with GAE according to this : http://groups.google.com/group/google-appengine-java/web/will-it-play... You should find a more verbose and meaningful error in the console log underhttps://appengine.google.com/ The stack trace should be there. Loïc 2009/9/10 xueqiang.mi allo...@gmail.com Have anyone used Spring MVC framework on GAE? My project runs well on my pc, but after uploading on the GAE server, it doesn't work. A error comes out: Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. http://alloyer.appspot.com Can anyone help me here? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[google-appengine] Mail SPF Problems
I am currently trying to develop an app that uses Google Voice's new email/sms functionality. However, when I send an email from my app to the correct email address, it simply will not go through. I am suspicious that this happens because Google Voice checks SPF records to make sure it really came from Gmail. When GAE sends out an email it uses different servers and hence does not truly imitate Gmail sending. Is that true? Any way to fix this? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] How to view db data in development Enviroment
Hi, I am using gae's java version, can somebody show me a way how to see my data inside the datanucleus's bin file. are there any 3rd party gui or console tool that i can make sql request direct to the local db. Thanks in advance. -- http://daily.appspot.com/food/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] expando and indexes
With expando, if I have 1M unique field names, does that create 1M unique indexes? Are there any potential adverse effects to using expando as far as indexes are concerned? Is there some kind of limit of 5000 unique field names like with list properties? Thanks, Robin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: xmpp.parseMessage(request) has a problem with non-latin characters?
I've checked the request. Here's the fragment. --=_Part_16732_4260695.1252651666846 Content-Type: text/plain; charset=UTF-8 Content-Disposition: form-data; name=from *...@***.**/Work067E4040 --=_Part_16732_4260695.1252651666846 Content-Type: text/plain; charset=UTF-8 Content-Disposition: form-data; name=to *...@***.appspotchat.com --=_Part_16732_4260695.1252651666846 Content-Type: text/plain; charset=UTF-8 Content-Disposition: form-data; name=body a��a --=_Part_16732_4260695.1252651666846 Content-Type: text/xml; charset=UTF-8 Content-Disposition: form-data; name=stanza cli:message type=chat id=purple292fa5cc to=*...@***.appspotchat.com from=*...@***.**/Work067E4040 xmlns:cli=jabber:clientx xmlns=jabber:x:eventcomposing//xactive xmlns= http://jabber.org/protocol/chatstates/cli:bodya???a/cli:bodyhtml xmlns=http://jabber.org/protocol/xhtml-im;body xmlns= http://www.w3.org/1999/xhtml;a???a/body/htmlnos:x value=disabled xmlns:nos=google:nosave/arc:record otr=false xmlns:arc=http://jabber.org/protocol/archive//cli:message --=_Part_16732_4260695.1252651666846-- Letters between 'a' characters are not displayed correctly and have code 65533. So the request itself comes malformed. I guess we should fire bug. --- Ivan Frolov http://www.frolov.md On Thu, Sep 10, 2009 at 21:22, Artem Kuroptev kurop...@gmail.com wrote: There is a principal thing to find - if a body of POST request to servlet contains valid unicode data. 1. POST body contains valid data. Then we can get it in binary form and then parse with apache commons or something like that. It will require to guess the encoding of post request. 2. POST contains malformed data. We can do nothing, it all on Google engineers. On Sep 10, 6:06 pm, gusto i...@frolov.md wrote: The same problem. However if I send message from web interface in development mode (/ _ah/admin/xmpp), it works fine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] unique ids
I noticed that unique auto ids seem to span across kinds. Is there any trick to getting unique auto ids per kind? Thanks, Robin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: unique ids
You have to do it yourself with a global counter Example with a blog : http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine Regards. On 11 sep, 09:39, Robin B robi...@gmail.com wrote: I noticed that unique auto ids seem to span across kinds. Is there any trick to getting unique auto ids per kind? Thanks, Robin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Will Google kick me out if I run this app ?
Will Google kick me out if I run this app: http://torrentfreak.com/run-a-free-bittorrent-tracker-on-google-090910/ Does Google clearly state what is allowed and what is disallowed on appengine? Link anyone? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: unique ids
Hi Robin, IDs are unique per kind and per parent, not global. -Nick Johnson On Fri, Sep 11, 2009 at 8:39 AM, Robin B robi...@gmail.com wrote: I noticed that unique auto ids seem to span across kinds. Is there any trick to getting unique auto ids per kind? Thanks, Robin -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: expando and indexes
On Fri, Sep 11, 2009 at 7:58 AM, Robin B robi...@gmail.com wrote: With expando, if I have 1M unique field names, does that create 1M unique indexes? It will create 1M index _entries_, yes (except that it's limited to a few thousand, see below). Are there any potential adverse effects to using expando as far as indexes are concerned? Is there some kind of limit of 5000 unique field names like with list properties? Entities are limited at a few thousand indexed properties - two separate fields count towards this the same way as a list with two items. -Nick Johnson Thanks, Robin -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Increasing Task Queue Quota Limit
On Fri, Sep 11, 2009 at 12:21 AM, Jason C jason.a.coll...@gmail.com wrote: Some of our architectural designs are contemplating daily taskqueue jobs in the millions. What sort of reaction does this bring from Google? Is this within the realm of possibility (current quota limitations aside), or completely not what taskqueue is contemplating? This is certainly a use-case we aim to support. The current limit of 100k tasks a day for billing enabled apps is temporary. -Nick Johnson j On Sep 8, 4:31 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi Kaz, With the 1.2.5 release, the Task Queue quota has been increased to 100k per day for billed apps. Is this likely to be enough for your short-term requirements? -Nick Johnson On Sat, Sep 5, 2009 at 11:49 AM, kaz kazunori...@gmail.com wrote: Hello Nick, I'm writing a production code on GAE/J for a collabolation tool called Colabolo, which will be updated this month. We've been using Rails until now and are moving to GAE/J on the next update. http://www.techcrunch.com/2009/06/21/colabolo-takes-another-stab-at-t. .. Almost all the porting has been done and we got a last one challenge which can be a show stopper. I was very pleased when I hear the news about 1.2.5 release with TQ, since it can be a silver bullet to solve our problem. But I just found that there's a 10,000 tasks/day limitation which means it is impossible to use on production. While we understand that TQ is an experimental, we'd like to use it on our new update to demonstrate the power of the cloud to our users and executives (and we can rollback to the old implementation anytime when we find any gritches on TQ implementation). So can you consider changing quotas for TQ for our apps? The app ids are: colabolo-gae colabolo-gae-qa colabolo-gae-dev colabolo-gae-dev2 If you can allow us to use somethinglike 1M/day tasks, we can make each task short and fine grained. We look forward to your reply. Thanks, Kaz On 8月28日, 午後9:16, Nick Johnson (Google) nick.john...@google.com wrote: Hi Brian, We'll be increasing the limit across the board in the near future. If you think you have a compelling use case for getting your limit raised early, please let me know in a private email what you need it for. -Nick Johnson On Fri, Aug 28, 2009 at 1:09 AM, Brian bsmcconn...@gmail.com wrote: Hello, I was wondering if we can get our Task Queue quota increased. We have seen a substantial increase in usage, and are getting close to the 10K limit (we use it to run small background tasks that increase proportionally with usage). Our app IDs are worldwidelexicon and wwlapi Thanks. Brian McConnell -- Nick Johnson, Developer Programs Engineer, App Engine -- Nick Johnson, Developer Programs Engineer, App Engine -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: bulkloader.py help - BadValueError: Items in the stores list must all be Key instances
Hi mjbruder, The easiest way to do this would be to define the conversion function for exporting 'stores' as follows: lambda x: :.join(str(y) for y in x) And the conversion function for imports as follows: lambda x: [db.Key(y) for y in x.split(:)] -Nick Johnson On Thu, Sep 10, 2009 at 3:43 PM, mjbruder mjbru...@gmail.com wrote: I'm attempting to use the bulkloader to load data into my app. I have my loader/exporter set up with the following classes: class FoodItemLoader(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'FoodItem', [('author', str), ('name', str), ('brand', str), ('price', str), ('category', str), ('stores', list) ]) class FoodItemExporter(bulkloader.Exporter): def __init__(self): bulkloader.Exporter.__init__(self, 'FoodItem', [('author', str, None), ('name', str, None), ('brand', str, None), ('price', str, None), ('category', str, None), ('stores', list, None), ]) exporters = [FoodItemExporter] loaders = [FoodItemLoader] --- The exporter seems to work fine, and it exports a column with the following type of data in it for the stores list property [datastore_types.Key.from_path(u'Store', 3002L, _app_id_namespace=u'grocerygeek')] Unfortunately, I cannot use this same format to load data into my datastore because it gives me the following error BadValueError: Items in the stores list must all be Key instances Is there a way I can format my CSV file or my code to accept this type of data? -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: 30 Max simultaneous requests (maxThreads)?
Hi Adligo, On Thu, Sep 10, 2009 at 6:15 PM, Adligo sc...@adligo.com wrote: Hi All, Ok this is all very interesting, and in a nut shell GAE isn't true J2EE impl. So now I am wondering; Is there a way to tell if my servlet is running on GAE? As far as I'm aware, the J2EE specification doesn't provide any guidelines for supporting 'hanging gets' or minimum/maximum request durations. This may seem like a really stupid question, however if you think about it a little from my point of view IT's NOT. The reason I am asking it is because I am trying to write Components (Server and Client [browser] side), which are for sale. So I may not be the one installing some of these Components, and it would be nice if the Component could simply figure out if it was running on GAE. Otherwise I will need to put some configuration settings in place; Something like web.xml isGae=true isGae=false I can tell you how to do this in Python (check the 'SERVER_SOFTWARE' environment variable), but I'm not familiar with how to check it in Java. You're probably better off asking this on the google-appengine-java group. -Nick Johnson Cheers, Scott On Sep 9, 5:24 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi Adligo, On Tue, Sep 8, 2009 at 6:39 PM, Adligo sc...@adligo.com wrote: Hi Nick, Please see below; On Sep 4, 10:04 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi Adligo, App Engine is not really designed for 'long polling' setups like you describe. Since the number of simultaneous runtimes your app has at a given traffic level is limited, waiting like this will consume them all very quickly. I understand this, which is why I was asking if you could pay for more. So can you? No. As stated, this is not something App Engine is designed to support, and thus your number of concurrent requests is limited proportional to the traffic your app gets. Also, because your app may be distributed over many computers, a synchronization primitive like the one you're using will not work - the process doing the notifying may not be on the same machine as the process(es) that need notifying! Well this depends a little on Session management, the ArrayBlockingQueue I mentioned is stored as a Session Attribute. I assume that the app engine must be keeping the Session in a location that can be accessed by all threads. Otherwise how could anyone maintain any sort or security on the server side (most Jaas HttpFilters I have seen store the Subject[User] as a Session Attribute, including 2 that I wrote by hand for custom requirements and Spring security) ? The issue is not multiple threads on one runtime, but the fact that a single App Engine app may be running on multiple runtimes, on multiple separate machines. You cannot expect a standard locking primitive to function across multiple machines. Or in other words how does the app engine treat HttpSessions and their attributes, in the normal J2EE way, or some other way? Sessions are stored in the datastore. -Nick Johnson Cheers, Scott -Nick Johnson On Thu, Sep 3, 2009 at 9:06 PM, Adligo sc...@adligo.com wrote: Hi Nick, I am not calling sleep but I am using a server side ArrayBlockingQueue, with methods like queue.poll(waitTime, TimeUnit.SECONDS); So I am not buffering but simply responding with current messages and if there arn't any waiting until some show up and then responding. If no messages show up in 20 seconds or so I respond with a empty message list and then the client sends a new request. I am using GWT's rpc, here is my service api, which is open souce. http://cvs.adligo.org/viewvc/gwt_util/src/org/adligo/gwt/util/client/. .. So I am anticipateing that I will have a lot of threads that are simply waiting on the ArrayBlockingQueue's poll method. This allows me to do things like; 1) send log messages between two browser windows 2) send system messages from a admin console to anyone viewing the app like; (System is going off line in 10 minutes) (There is pizza in the lobby for anyone who wants it) exc 3) Implement a IM client in the browser 4) Send 'event' data between browser windows so a user can click a button in one window and have it do something to another window. Currently the only application of this is to reload the adligo_log.properties file, so you can change your log levels at runtime. However there are a lot of other applications for this, windows can now communicate. Also there shouldn't be much of a drain on the processor, since most of the threads are simply waiting (not doing a lot of processing). It just requires a large
[google-appengine] Re: Can't access the dashboard anymore
Hello again, I don't want to sound impatient but I really need to access the Dashboard :-/ Any help is appreciated! Thanks R. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Tornadoweb.org
Facebook (ex FriendFeed) has just released the open source of their web server. http://www.tornadoweb.org/ But it seems that we can only use the frameworks within GAE (WSGIApplication). http://github.com/facebook/tornado/tree/9e24ae162d024e4049b8811d7ca19e319c20021d/website There are many very good modules (authentification : Twitter, Google, Facebook,... template,) http://www.tornadoweb.org/documentation#module-index Didn't test it. But it seems very good. Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Reading File from the local file system inside GAE.
Hi All, I am trying to read an XML file from the local file system. I have an app which runs on the GAE and all my code is in python and Jquery. Now I tried 2 ways of reading this file. 1. I tried to parse the xml file within my server code but it gave me an EACESS error stating it cannot access the file. 2. I tried to read the file from the UI using javascripts but it still gave me a security error . So now how do I read a file from within my web application?? Thanks, GuruDutta --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Reading File from the local file system inside GAE.
hi you can read files but it/they shouldn't be located in a path served by a static handler. have a look at where you have put it. T On Sep 11, 10:30 pm, GuruDutta guru.rg2...@gmail.com wrote: Hi All, I am trying to read an XML file from the local file system. I have an app which runs on the GAE and all my code is in python and Jquery. Now I tried 2 ways of reading this file. 1. I tried to parse the xml file within my server code but it gave me an EACESS error stating it cannot access the file. 2. I tried to read the file from the UI using javascripts but it still gave me a security error . So now how do I read a file from within my web application?? Thanks, GuruDutta --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Will Google kick me out if I run this app ?
http://code.google.com/appengine/program_policies.html The Content displayed and/or processed through your Application or other web site utilizing the Service shall not contain any of the following types of content: Content that infringes a third party's rights (e.g., copyright) according to applicable law; Pornographic, obscene or excessively profane content; Hate-related or violent content; Content advocating racial or ethnic intolerance; Content intended to advocate or advance computer hacking or cracking Gambling; Other illegal activity, including without limitation illegal export of controlled substances or illegal software; Drug paraphernalia; Phishing; Malicious content; Pages comprised primarily of advertising; Other material, products or services that violate or encourage conduct that would violate any criminal laws, any other applicable laws, or any third-party rights. Prohibited Actions In addition to (and/or as some examples of) the violations described in the Terms, you may not and may not allow any third party, including your end users, to: Generate or facilitate unsolicited commercial email (spam). Such activity includes, but is not limited to: sending email in violation of the CAN-SPAM Act or any other applicable anti-spam law; imitating or impersonating another person or his, her or its email address, or creating false accounts for the purpose of sending spam; data mining any web property (including Google) to find email addresses or other user account information; sending unauthorized mail via open, third-party servers; sending emails to users who have requested to be removed from a mailing list; selling, exchanging or distributing to a third party the email addresses of any person without such person's knowing and continued consent to such disclosure; and sending unsolicited emails to significant numbers of email addresses belonging to individuals and/or entities with whom you have no preexisting relationship. Send, upload, distribute or disseminate or offer to do the same with respect to any unlawful, defamatory, harassing, abusive, fraudulent, infringing, obscene, or otherwise objectionable content Intentionally distribute viruses, worms, defects, Trojan horses, corrupted files, hoaxes, or any other items of a destructive or deceptive nature; Conduct or forward pyramid schemes and the like; Transmit content that may be harmful to minors; Impersonate another person (via the use of an email address or otherwise) or otherwise misrepresent yourself or the source of any email; Illegally transmit another's intellectual property or other proprietary information without such owner's or licensor's permission; Use the Service to violate the legal rights (such as rights of privacy and publicity) of others; Promote or encourage illegal activity; Interfere with other users' enjoyment of the Service; Sell, trade, resell or otherwise exploit the Service for any unauthorized commercial purpose; Modify, adapt, translate, or reverse engineer any portion of the Service; Remove any copyright, trademark or other proprietary rights notices contained in or on the Service; Reformat or frame any portion of the web pages that are part of the Service's Administration Console; Use the Service in connection with illegal peer-to-peer file sharing; Display any content on the Service (including but not limited to the customizable login page) that contains any pornographic, hate-related or violent content or contain any other material, products or services that violate or encourage conduct that would violate any criminal laws, any other applicable laws, or any third party rights; or Modify the Google logo or any other Google Brand Features. Use the Service, or any interfaces provided with the Service, to access any Google product or service in a manner that violates the terms of service or other terms and conditions for use of such Google product or service. -Original Message- From: google-appengine@googlegroups.com [mailto:google-appeng...@googlegroups.com] On Behalf Of astrid.thuec...@googlemail.com Sent: Friday, September 11, 2009 1:19 AM To: Google App Engine Subject: [google-appengine] Will Google kick me out if I run this app ? Will Google kick me out if I run this app: http://torrentfreak.com/run-a-free-bittorrent-tracker-on-google-090910/ Does Google clearly state what is allowed and what is disallowed on appengine? Link anyone? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Google App Engine Program Policies
Hi All, According to the Google App Engine Program Policieshttp://code.google.com/intl/en/appengine/program_policies.htmlProhibited Content*k. Pages comprised primarily of advertising;* Why ban the advertisement content in gae ? Best Regards Tom Wu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Google App Engine Program Policies
Hi Tom, Advertisements are not banned in App Engine - only pages comprised primarily of advertising (eg, with no significant non-advertising content). -Nick Johnson On Fri, Sep 11, 2009 at 4:34 PM, Tom Wu service.g2...@gmail.com wrote: Hi All, According to the Google App Engine Program Policieshttp://code.google.com/intl/en/appengine/program_policies.htmlProhibited Content*k. Pages comprised primarily of advertising;* Why ban the advertisement content in gae ? Best Regards Tom Wu -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Google App Engine Program Policies
2009/9/11 Tom Wu service.g2...@gmail.com: Hi All, According to the Google App Engine Program Policies Prohibited Content k. Pages comprised primarily of advertising; Why ban the advertisement content in gae ? They haven't! But a page comprised 'primarily' of advertising - is really designed for the sole purpose of getting people to visit the ads. A real page should be interesting to the user, and maybe provide a few ads that might interest them. Best Regards Tom Wu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Google App Engine Program Policies
Hi Nick, Is http://www.craigslist.org/ ok in gae ? Best Regards Tom Wu 2009/9/11 Barry Hunter barrybhun...@googlemail.com 2009/9/11 Tom Wu service.g2...@gmail.com: Hi All, According to the Google App Engine Program Policies Prohibited Content k. Pages comprised primarily of advertising; Why ban the advertisement content in gae ? They haven't! But a page comprised 'primarily' of advertising - is really designed for the sole purpose of getting people to visit the ads. A real page should be interesting to the user, and maybe provide a few ads that might interest them. Best Regards Tom Wu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] dev server runs deffrent from python shell
in python shell v2.5.2 run: a = [] b = ( a ) and 5 then b is 5. run same code in dev server, b is [] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Google App Engine Program Policies
Hi Tom, I'm not a lawyer; nor do I speak in any sort of binding fashion for Google in this respect. That said, my entirely lay-person interpretation is that sites like craigslist would be perfectly fine. The terms of service are designed to prevent abuse, and something like craigslist certainly isn't abusive. -Nick Johnson On Fri, Sep 11, 2009 at 5:05 PM, Tom Wu service.g2...@gmail.com wrote: Hi Nick, Is http://www.craigslist.org/ ok in gae ? Best Regards Tom Wu 2009/9/11 Barry Hunter barrybhun...@googlemail.com 2009/9/11 Tom Wu service.g2...@gmail.com: Hi All, According to the Google App Engine Program Policies Prohibited Content k. Pages comprised primarily of advertising; Why ban the advertisement content in gae ? They haven't! But a page comprised 'primarily' of advertising - is really designed for the sole purpose of getting people to visit the ads. A real page should be interesting to the user, and maybe provide a few ads that might interest them. Best Regards Tom Wu -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: dev server runs deffrent from python shell
Hi saintthor, Can you please provide a complete example that reproduces this on the dev server? -Nick Johnson On Fri, Sep 11, 2009 at 5:06 PM, saintthor saintt...@gmail.com wrote: in python shell v2.5.2 run: a = [] b = ( a ) and 5 then b is 5. run same code in dev server, b is [] -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Server error without any log
We see the same behaviour. The DeadlineExceededError crops up in arbitrary locations, often within Django modules. Further, we've seen occasions where the application instance seems to get a poorly initialized Django and then view lookups (e.g., with reverse()) always fail. The application instance seems to be permanently damaged and we continue to get errors from it until it is recycled. I suspect this occurs when the DeadlineExceededError pulls the rug out from under the initialization, though since it doesn't always happen, it must just be when it's in a particular location. j On Sep 10, 9:55 am, yobin yyo...@gmail.com wrote: I've met the same problems for a week. Since my application had run well for several month, I don't think it is my app's problem. I am using Django Helper with the Django installed on GAE server. My app is cnstock6.appspot.com, below is my error logs,it seems that all error logs is class 'google.appengine.runtime.DeadlineExceededError', and every error log appears in different place. Anyone can help me to solve this problem?Thanks a lot. 120.95.162.230 - - [10/Sep/2009:08:44:48 -0700] GET /xiaonei/ indexdetail/? xn_sig_in_iframe=1xn_sig_method=getxn_sig_time=1252597456237xn_sig_user= 255015566xn_sig_expires=1252602000xn_sig_session_key=2.1171b90c403dd7a965 0493500d0a1b54.3600.1252602000-255015566xn_sig_added=1xn_sig_api_key=75da d05d3a794d4d9b58535dc331a309xn_sig_app_id=24754 HTTP/1.1 500 0 http://apps.renren.com/livestock/? origin=103_os_type=14 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON 2.0),gzip(gfe),gzip(gfe) cnstock6.taotaobujue.info E 09-10 08:44AM 48.067 class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ main.py, line 31, in module InstallAppengineHelperForDjango() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 486, in InstallAppengineHelperForDjango PatchDjangoSerializationModules() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 269, in PatchDjangoSerializationModules from django.core.serializers import python File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/python.py, line 8, in module from django.core.serializers import base File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/base.py, line 7, in module from django.db import models File /base/python_lib/versions/third_party/django-1.0/django/db/ models/__init__.py, line 10, in module from django.db.models.fields.files import FileField, ImageField File /base/python_lib/versions/third_party/django-1.0/django/db/ models/fields/files.py, line 7, in module from django.core.files.storage import default_storage File /base/python_lib/versions/third_party/django-1.0/django/core/ files/storage.py, line 9, in module from django.utils._os import safe_join File /base/python_lib/versions/third_party/django-1.0/django/utils/ _os.py, line 1, in module import os 09-10 08:44AM 04.367 /xiaonei/indexdetail/? xn_sig_in_iframe=1xn_sig_method=getxn_sig_time=1252597428041xn_sig_user= 221266426xn_sig_expires=1252602000xn_sig_session_key=2.f4042ec67411185c49 f4c7662c88faef. 3600.1252602000-221266426xn_sig_added=1xn_sig_api_key=75dad05d3a794d4d9b5 8535dc331a309xn_sig_app_id=24754 500 29327ms 1146cpu_ms 0kb Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) 123.112.35.215 - - [10/Sep/2009:08:44:33 -0700] GET /xiaonei/ indexdetail/? xn_sig_in_iframe=1xn_sig_method=getxn_sig_time=1252597428041xn_sig_user= 221266426xn_sig_expires=1252602000xn_sig_session_key=2.f4042ec67411185c49 f4c7662c88faef. 3600.1252602000-221266426xn_sig_added=1xn_sig_api_key=75dad05d3a794d4d9b5 8535dc331a309xn_sig_app_id=24754 HTTP/1.1 500 0 http://apps.renren.com/livestock/?origin=103_hua=50; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) cnstock6.taotaobujue.info E 09-10 08:44AM 33.659 class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ main.py, line 31, in module InstallAppengineHelperForDjango() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 486, in InstallAppengineHelperForDjango PatchDjangoSerializationModules() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 269, in PatchDjangoSerializationModules from django.core.serializers import python File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/python.py, line 8, in module from django.core.serializers import base File
[google-appengine] Re: Google App Engine Program Policies
Thanks Nick, Since the GAE is difficult to implement compare to the regular SQL. But it guide us to a wise directioon. We understand the big-table behind the gae must be well protected. Some site like craigslist is far away from the free quota. It'll charge on our bill. Now the free quota is extremely limited. It's good for billing enable account. Keep going GAE. Nice architecture for developer. Best Regards Tom Wu 2009/9/12 Nick Johnson (Google) nick.john...@google.com Hi Tom, I'm not a lawyer; nor do I speak in any sort of binding fashion for Google in this respect. That said, my entirely lay-person interpretation is that sites like craigslist would be perfectly fine. The terms of service are designed to prevent abuse, and something like craigslist certainly isn't abusive. -Nick Johnson On Fri, Sep 11, 2009 at 5:05 PM, Tom Wu service.g2...@gmail.com wrote: Hi Nick, Is http://www.craigslist.org/ ok in gae ? Best Regards Tom Wu 2009/9/11 Barry Hunter barrybhun...@googlemail.com 2009/9/11 Tom Wu service.g2...@gmail.com: Hi All, According to the Google App Engine Program Policies Prohibited Content k. Pages comprised primarily of advertising; Why ban the advertisement content in gae ? They haven't! But a page comprised 'primarily' of advertising - is really designed for the sole purpose of getting people to visit the ads. A real page should be interesting to the user, and maybe provide a few ads that might interest them. Best Regards Tom Wu -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Server error without any log
Here is an example that occurred this morning. We use the Google- supplied Django 1.0, and are using r91 of http://code.google.com/p/google-app-engine-django/, which presumably is a reasonably common App Engine / Django deployment. The request that caused this exception was pegged at 28956ms. class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/myfrontsteps/ sprint13-8578.336245755973553585/main.py, line 37, in module InstallAppengineHelperForDjango() File /base/data/home/apps/myfrontsteps/ sprint13-8578.336245755973553585/appengine_django/__init__.py, line 485, in InstallAppengineHelperForDjango PatchDjangoSerializationModules() File /base/data/home/apps/myfrontsteps/ sprint13-8578.336245755973553585/appengine_django/__init__.py, line 268, in PatchDjangoSerializationModules from django.core.serializers import python File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/python.py, line 8, in module from django.core.serializers import base File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/base.py, line 7, in module from django.db import models File /base/python_lib/versions/third_party/django-1.0/django/db/ models/__init__.py, line 9, in module from django.db.models.fields.subclassing import SubfieldBase File /base/python_lib/versions/third_party/django-1.0/django/db/ models/fields/subclassing.py, line 6, in module The request has not even reached any of our application code (I realize that appengine_django is part of our code, but hopefully it is a lightweight initialization), so I'm not certain how we could optimize any further. Looking at this particular trace is misleading; I have lots of examples of other arbitrary places within this appengine_django/django initialization where the DeadlineExceededError occurs. Finally, when we _do_ get a properly inflated application instance (which we do most of the time), it is blazing fast. j On Sep 11, 10:23 am, Jason C jason.a.coll...@gmail.com wrote: We see the same behaviour. The DeadlineExceededError crops up in arbitrary locations, often within Django modules. Further, we've seen occasions where the application instance seems to get a poorly initialized Django and then view lookups (e.g., with reverse()) always fail. The application instance seems to be permanently damaged and we continue to get errors from it until it is recycled. I suspect this occurs when the DeadlineExceededError pulls the rug out from under the initialization, though since it doesn't always happen, it must just be when it's in a particular location. j On Sep 10, 9:55 am, yobin yyo...@gmail.com wrote: I've met the same problems for a week. Since my application had run well for several month, I don't think it is my app's problem. I am using Django Helper with the Django installed on GAE server. My app is cnstock6.appspot.com, below is my error logs,it seems that all error logs is class 'google.appengine.runtime.DeadlineExceededError', and every error log appears in different place. Anyone can help me to solve this problem?Thanks a lot. 120.95.162.230 - - [10/Sep/2009:08:44:48 -0700] GET /xiaonei/ indexdetail/? xn_sig_in_iframe=1xn_sig_method=getxn_sig_time=1252597456237xn_sig_user= 255015566xn_sig_expires=1252602000xn_sig_session_key=2.1171b90c403dd7a965 0493500d0a1b54.3600.1252602000-255015566xn_sig_added=1xn_sig_api_key=75da d05d3a794d4d9b58535dc331a309xn_sig_app_id=24754 HTTP/1.1 500 0 http://apps.renren.com/livestock/? origin=103_os_type=14 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON 2.0),gzip(gfe),gzip(gfe) cnstock6.taotaobujue.info E 09-10 08:44AM 48.067 class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ main.py, line 31, in module InstallAppengineHelperForDjango() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 486, in InstallAppengineHelperForDjango PatchDjangoSerializationModules() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 269, in PatchDjangoSerializationModules from django.core.serializers import python File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/python.py, line 8, in module from django.core.serializers import base File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/base.py, line 7, in module from django.db import models File /base/python_lib/versions/third_party/django-1.0/django/db/ models/__init__.py, line 10, in module from django.db.models.fields.files import FileField, ImageField File /base/python_lib/versions/third_party/django-1.0/django/db/ models/fields/files.py,
[google-appengine] Re: Server error without any log
I'm using Django via AppEnginePatch - and today am seeign a horrible episode of multiple deadline-exceeded errors as the app is trying to initialize... johnP On Sep 11, 9:35 am, Jason C jason.a.coll...@gmail.com wrote: Here is an example that occurred this morning. We use the Google- supplied Django 1.0, and are using r91 ofhttp://code.google.com/p/google-app-engine-django/, which presumably is a reasonably common App Engine / Django deployment. The request that caused this exception was pegged at 28956ms. class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/myfrontsteps/ sprint13-8578.336245755973553585/main.py, line 37, in module InstallAppengineHelperForDjango() File /base/data/home/apps/myfrontsteps/ sprint13-8578.336245755973553585/appengine_django/__init__.py, line 485, in InstallAppengineHelperForDjango PatchDjangoSerializationModules() File /base/data/home/apps/myfrontsteps/ sprint13-8578.336245755973553585/appengine_django/__init__.py, line 268, in PatchDjangoSerializationModules from django.core.serializers import python File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/python.py, line 8, in module from django.core.serializers import base File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/base.py, line 7, in module from django.db import models File /base/python_lib/versions/third_party/django-1.0/django/db/ models/__init__.py, line 9, in module from django.db.models.fields.subclassing import SubfieldBase File /base/python_lib/versions/third_party/django-1.0/django/db/ models/fields/subclassing.py, line 6, in module The request has not even reached any of our application code (I realize that appengine_django is part of our code, but hopefully it is a lightweight initialization), so I'm not certain how we could optimize any further. Looking at this particular trace is misleading; I have lots of examples of other arbitrary places within this appengine_django/django initialization where the DeadlineExceededError occurs. Finally, when we _do_ get a properly inflated application instance (which we do most of the time), it is blazing fast. j On Sep 11, 10:23 am, Jason C jason.a.coll...@gmail.com wrote: We see the same behaviour. The DeadlineExceededError crops up in arbitrary locations, often within Django modules. Further, we've seen occasions where the application instance seems to get a poorly initialized Django and then view lookups (e.g., with reverse()) always fail. The application instance seems to be permanently damaged and we continue to get errors from it until it is recycled. I suspect this occurs when the DeadlineExceededError pulls the rug out from under the initialization, though since it doesn't always happen, it must just be when it's in a particular location. j On Sep 10, 9:55 am, yobin yyo...@gmail.com wrote: I've met the same problems for a week. Since my application had run well for several month, I don't think it is my app's problem. I am using Django Helper with the Django installed on GAE server. My app is cnstock6.appspot.com, below is my error logs,it seems that all error logs is class 'google.appengine.runtime.DeadlineExceededError', and every error log appears in different place. Anyone can help me to solve this problem?Thanks a lot. 120.95.162.230 - - [10/Sep/2009:08:44:48 -0700] GET /xiaonei/ indexdetail/? xn_sig_in_iframe=1xn_sig_method=getxn_sig_time=1252597456237xn_sig_user= 255015566xn_sig_expires=1252602000xn_sig_session_key=2.1171b90c403dd7a965 0493500d0a1b54.3600.1252602000-255015566xn_sig_added=1xn_sig_api_key=75da d05d3a794d4d9b58535dc331a309xn_sig_app_id=24754 HTTP/1.1 500 0 http://apps.renren.com/livestock/? origin=103_os_type=14 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON 2.0),gzip(gfe),gzip(gfe) cnstock6.taotaobujue.info E 09-10 08:44AM 48.067 class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ main.py, line 31, in module InstallAppengineHelperForDjango() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 486, in InstallAppengineHelperForDjango PatchDjangoSerializationModules() File /base/data/home/apps/cnstock6/cocc0722.336240820715932178/ appengine_django/__init__.py, line 269, in PatchDjangoSerializationModules from django.core.serializers import python File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/python.py, line 8, in module from django.core.serializers import base File /base/python_lib/versions/third_party/django-1.0/django/core/ serializers/base.py, line 7,
[google-appengine] Re: expando and indexes
So you are saying expando entities are limited to a few thousand properties (5000?) is there an exact limit? If I have 1M expando entities, and each entity has 1 property that is unique, it will create 1M index _entries_, not 1M indexes, correct? Thanks, Robin On Sep 11, 4:13 am, Nick Johnson (Google) nick.john...@google.com wrote: On Fri, Sep 11, 2009 at 7:58 AM, Robin B robi...@gmail.com wrote: With expando, if I have 1M unique field names, does that create 1M unique indexes? It will create 1M index _entries_, yes (except that it's limited to a few thousand, see below). Are there any potential adverse effects to using expando as far as indexes are concerned? Is there some kind of limit of 5000 unique field names like with list properties? Entities are limited at a few thousand indexed properties - two separate fields count towards this the same way as a list with two items. -Nick Johnson Thanks, Robin -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: expando and indexes
On Fri, Sep 11, 2009 at 6:17 PM, Robin B robi...@gmail.com wrote: So you are saying expando entities are limited to a few thousand properties (5000?) is there an exact limit? Correct. If I have 1M expando entities, and each entity has 1 property that is unique, it will create 1M index _entries_, not 1M indexes, correct? Yes, that's correct - and there's no limit on the number of entities you can have. -Nick Thanks, Robin On Sep 11, 4:13 am, Nick Johnson (Google) nick.john...@google.com wrote: On Fri, Sep 11, 2009 at 7:58 AM, Robin B robi...@gmail.com wrote: With expando, if I have 1M unique field names, does that create 1M unique indexes? It will create 1M index _entries_, yes (except that it's limited to a few thousand, see below). Are there any potential adverse effects to using expando as far as indexes are concerned? Is there some kind of limit of 5000 unique field names like with list properties? Entities are limited at a few thousand indexed properties - two separate fields count towards this the same way as a list with two items. -Nick Johnson Thanks, Robin -- Nick Johnson, Developer Programs Engineer, App Engine -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: unique ids
IDs are unique per kind and per parent, not global. So for example: post = Post(parent=None, title='foo').put() post.put() comment = Comment(parent=None, message='bar').put() comment.put() Then post.key().id() and comment.key().id() could potentially be equal because they are not global across kinds even when parent=None ? Thanks, Robin On Sep 11, 4:11 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi Robin, IDs are unique per kind and per parent, not global. -Nick Johnson On Fri, Sep 11, 2009 at 8:39 AM, Robin B robi...@gmail.com wrote: I noticed that unique auto ids seem to span across kinds. Is there any trick to getting unique auto ids per kind? Thanks, Robin -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: unique ids
On Fri, Sep 11, 2009 at 6:27 PM, Robin B robi...@gmail.com wrote: IDs are unique per kind and per parent, not global. So for example: post = Post(parent=None, title='foo').put() post.put() comment = Comment(parent=None, message='bar').put() comment.put() Then post.key().id() and comment.key().id() could potentially be equal because they are not global across kinds even when parent=None ? Correct. -Nick Johnson Thanks, Robin On Sep 11, 4:11 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi Robin, IDs are unique per kind and per parent, not global. -Nick Johnson On Fri, Sep 11, 2009 at 8:39 AM, Robin B robi...@gmail.com wrote: I noticed that unique auto ids seem to span across kinds. Is there any trick to getting unique auto ids per kind? Thanks, Robin -- Nick Johnson, Developer Programs Engineer, App Engine -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Dramatic increase in api cpu usage.
I see similar results. The total api cpu time is much higher then actual time spent on the actual call. I use a profiling api delegate that logs every api call duration, and the total api cpu reported on admin console is usually at least 2 times higher. On Sep 9, 2:05 pm, Lec lec...@gmail.com wrote: I cannot confirm what it was like previous to 1.2.5 release, but I think I am seeing something similar. Although with task queues my workers do data processing then store the data in datastore, i am NOT seeingcpuproblems with workers. I only see problems with the datastore in the main threads where i do not use workers. Did anyone have this kind of experience? L On Sep 9, 3:54 am, herbie 4whi...@o2.co.uk wrote: It seems I'm not the only one. I was starting to think I was imagining it! Thanks for supporting this thread. Would anyone fro Google like to comment? On Sep 8, 11:01 pm, Robert Kluin robert.kl...@gmail.com wrote: I have some code that is now using moreCPUas well. Previously: 1530cpu_ms 616api_cpu_ms 1404cpu_ms 995api_cpu_ms 1104cpu_ms 695api_cpu_ms Now: 4619cpu_ms 4133api_cpu_ms 4619cpu_ms 4133api_cpu_ms (yes, it is exactly the same) That is unchanged code. Same exact data. Robert On Tue, Sep 8, 2009 at 3:23 PM, bFlood bflood...@gmail.com wrote: I just ran a batch delete using the Task queue. It grabs the next 50 keys for a Kind and then calls db.delete(keys), so fairly simple stuff. here's some example results in the log: 865ms 1032cpu_ms 952api_cpu_ms 1058ms 1040cpu_ms 952api_cpu_ms 947ms 49947cpu_ms 49869api_cpu_ms --??? 1425ms 1035cpu_ms 952api_cpu_ms 1674ms 41181cpu_ms 41094api_cpu_ms any thoughts? something seems wrong to me cheers brian On Sep 8, 8:56 am, bFlood bflood...@gmail.com wrote: ok, I was able to check over my code again and even with rolling back small changes, the largeCPUincreases are still there. at this point, I have to agree with herbie's findings as well. It would be nice if Google could weigh in on this troubling issue cheers brian On Sep 8, 4:51 am, herbie 4whi...@o2.co.uk wrote: On Sep 8, 12:07 am, Stephen sdea...@gmail.com wrote: OK, but because api_cpu_ms is 96% of the total, then cpu_ms is also almost 3x higher? The spike is showing up in the cpu_ms? Yes in total the cpu_ms has gone up by nearly 3x too. But as I understand it cpu_ms is the totalcpuusage for the request and api_cpu_ms is thecpuusage by GAE api calls. So the difference between the two is thecpuusage of my non api code. This difference hasn’t increased because the code hasn’t changed. But yes, the newhighvalue for api_cpu_ms directly affects my quota because it makes the vast majority of cpu_ms. So we do pay for api_cpu_ms ! So for example if Google makes a change to db.put() (or any api call) so that it uses morecpu, we will be billed for morecpuusage even if our code hasn’t changed. As my code/ indexes hasn’t changed and the api_cpu_ms has shot up the obvious conclusion is that an api/datastore change has caused it? But there may be another ‘good’ reason for it, which I can’t think of, but as I’m going to have to pay for the increase in api_cpu_ms, I would really appreciate it if someone at Google could help. On Sep 8, 12:07 am, Stephen sdea...@gmail.com wrote: On Sep 7, 8:57 pm, herbie 4whi...@o2.co.uk wrote: On Sep 7, 6:50 pm, Stephen sdea...@gmail.com wrote: What about cpu_ms, is that also higher for requests which write to the data store? No, not in relation to api_cpu_ms. For the request that does the most writing to the datastore api_cpu_ms accounts for 96% of the total cpu_ms value!. The so request handler does not much more than create new entities in the datastore. OK, but because api_cpu_ms is 96% of the total, then cpu_ms is also almost 3x higher? The spike is showing up in the cpu_ms? cpu_ms is billed for, so if you have billing enabled you are being overcharged. You could try asking for a refund here: http://code.google.com/support/bin/request.py?contact_type=AppEngineB... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] How to use Cookie and Session under App Engine/python
I'm new to Google App Engine. I am stuck in cookie and session use. I followed the tutorial here: http://webpython.codepoint.net/cgi_cookie_based_sid However, I somewhat don't understand where his cookie files are stored and how do we retrieve the data. I referred the Python Library(the document), but I have no idea with its structure. I just want to know what is the exemplary usage of cookie and session, an easy and simple approach. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Struct, Spring
Hi Nick, Thanks. Currently I'm using eclipse with com.google.appengine.eclipse.sdkbundle_1.2.2. I developed some application with MVC. I want to build a Struct2 web appilcation. Please guide me. Do you have any documents. Where to place jar files? Thanks in advance. On Wed, Sep 9, 2009 at 6:06 AM, Nick Cen cenyo...@gmail.com wrote: I am currently using Struct2 and Spring in the GAE. From my experience, to integrate Struct2, you have to add a Filter to do some secure relatived thing, and remember to add the dtd definition inside the struct.xml or else an exception will be thrown. 2009/9/7 Dasan77 dasan1...@gmail.com Hello, Is it possible to use Struct or Spring framework in GAE. Can I use Oracle for datastore? Thanks. -- http://daily.appspot.com/food/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Failed when I want to donwload a file from my web app
I want to make my web app to provide download a file. A simple example is like that: class MainHandler(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = html/text self.response.headers['Content-Disposition'] = 'attachment;filename=d.txt' self.response.out.write(abcd) def main(): application = webapp.WSGIApplication([('/d', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() ## It should download a file d.txt with content abcd I tried the code in localhost, it works well. I updated it to appspot.com, it failed. From IE, an error Internate Explorer cannot donwload d from happened. So does appspot.com support to download a file? Or anything I made mistake code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Need to Upload a HUGE number of map tiles to App Engine!
Hi, I've also need to upload images to the app engine. I'll love to have the code of your webservice and the tile uploader program when you have the time to send it of course :) On 10 sep, 14:46, mscwd01 mscw...@gmail.com wrote: I have just finished uploading approximately 20GBs of Nasa SRTM elevationtilesto theappengine, it wasn't straightforward - here's how I did it: 1. I created a REST webservice (google for Restlet), this received POST requests. A POST request consisted of the tile filename and the tile contents (a byte array converted to a base 64 string) 2. Once the servlet recieved the POST request it got the filename parameter from the POST request and created a new Tile datastore object with the primary key being set as the filename. 3. It then retrieved the tile contents parameter (the base 64 string) from the POST request and decoded it back into a byte array. This was saved as a blob field to the Tile datastore object. 4. The Tile object was then saved to the datastore. I also compressed the byte array prior to uploading so that saved a little time. It still took 2 solid days of uploading though and costs about 12 cents a day (bargain). If you think what I have described is too confusing for you to implement it may be possible for me to send you the webservice and the tile uploader program (I am extremely busy at present though so I make take a while!) Hope that helps. On Sep 8, 5:20 am, MaryOne maryoneperc...@gmail.com wrote: Hi, over the years I have created about 950,000 custommaptiles, mostly 256 x 256 jpg's or png's, which I would like to move from my current MS 2008 IIS server toAppEngine. It was a challenge to use FTP in the past, used to make a ZIP thenupload, then unZIP. The size is about 7 GB. I have root access to my server. I came across this article: http://www.armangal.com/10-Easy-Steps-to-use-Google-App-Engine-as-you... Is this the best solution? Any other ideas? You can see the nice maps thesetilesserve athttp://cret.ca With all the improvements to Google Maps/Earth. Most of this work is out of date and redundant, but would still like to keep it around. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Dramatic increase in api cpu usage.
Hi Peter, On Fri, Sep 11, 2009 at 2:18 AM, Peter Liu tinyee...@gmail.com wrote: I see similar results. The total api cpu time is much higher then actual time spent on the actual call. I use a profiling api delegate that logs every api call duration, and the total api cpu reported on admin console is usually at least 2 times higher. This is because an API call may involve multiple machines. A batch put, for example, can include operations on multiple tabletservers, which are all executed simultaneously. -Nick Johnson On Sep 9, 2:05 pm, Lec lec...@gmail.com wrote: I cannot confirm what it was like previous to 1.2.5 release, but I think I am seeing something similar. Although with task queues my workers do data processing then store the data in datastore, i am NOT seeingcpuproblems with workers. I only see problems with the datastore in the main threads where i do not use workers. Did anyone have this kind of experience? L On Sep 9, 3:54 am, herbie 4whi...@o2.co.uk wrote: It seems I'm not the only one. I was starting to think I was imagining it! Thanks for supporting this thread. Would anyone fro Google like to comment? On Sep 8, 11:01 pm, Robert Kluin robert.kl...@gmail.com wrote: I have some code that is now using moreCPUas well. Previously: 1530cpu_ms 616api_cpu_ms 1404cpu_ms 995api_cpu_ms 1104cpu_ms 695api_cpu_ms Now: 4619cpu_ms 4133api_cpu_ms 4619cpu_ms 4133api_cpu_ms (yes, it is exactly the same) That is unchanged code. Same exact data. Robert On Tue, Sep 8, 2009 at 3:23 PM, bFlood bflood...@gmail.com wrote: I just ran a batch delete using the Task queue. It grabs the next 50 keys for a Kind and then calls db.delete(keys), so fairly simple stuff. here's some example results in the log: 865ms 1032cpu_ms 952api_cpu_ms 1058ms 1040cpu_ms 952api_cpu_ms 947ms 49947cpu_ms 49869api_cpu_ms--??? 1425ms 1035cpu_ms 952api_cpu_ms 1674ms 41181cpu_ms 41094api_cpu_ms any thoughts? something seems wrong to me cheers brian On Sep 8, 8:56 am, bFlood bflood...@gmail.com wrote: ok, I was able to check over my code again and even with rolling back small changes, the largeCPUincreases are still there. at this point, I have to agree with herbie's findings as well. It would be nice if Google could weigh in on this troubling issue cheers brian On Sep 8, 4:51 am, herbie 4whi...@o2.co.uk wrote: On Sep 8, 12:07 am, Stephen sdea...@gmail.com wrote: OK, but because api_cpu_ms is 96% of the total, then cpu_ms is also almost 3x higher? The spike is showing up in the cpu_ms? Yes in total the cpu_ms has gone up by nearly 3x too. But as I understand it cpu_ms is the totalcpuusage for the request and api_cpu_ms is thecpuusage by GAE api calls. So the difference between the two is thecpuusage of my non api code. This difference hasn’t increased because the code hasn’t changed. But yes, the newhighvalue for api_cpu_ms directly affects my quota because it makes the vast majority of cpu_ms. So we do pay for api_cpu_ms ! So for example if Google makes a change to db.put() (or any api call) so that it uses morecpu, we will be billed for morecpuusage even if our code hasn’t changed. As my code/ indexes hasn’t changed and the api_cpu_ms has shot up the obvious conclusion is that an api/datastore change has caused it? But there may be another ‘good’ reason for it, which I can’t think of, but as I’m going to have to pay for the increase in api_cpu_ms, I would really appreciate it if someone at Google could help. On Sep 8, 12:07 am, Stephen sdea...@gmail.com wrote: On Sep 7, 8:57 pm, herbie 4whi...@o2.co.uk wrote: On Sep 7, 6:50 pm, Stephen sdea...@gmail.com wrote: What about cpu_ms, is that also higher for requests which write to the data store? No, not in relation to api_cpu_ms. For the request that does the most writing to the datastore api_cpu_ms accounts for 96% of the total cpu_ms value!. The so request handler does not much more than create new entities in the datastore. OK, but because api_cpu_ms is 96% of the total, then cpu_ms is also almost 3x higher? The spike is showing up in the cpu_ms? cpu_ms is billed for, so if you have billing enabled you are being overcharged. You could try asking for a refund here: http://code.google.com/support/bin/request.py?contact_type=AppEngineB... -- Nick Johnson, Developer Programs Engineer, App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine
[google-appengine] Re: Failed when I want to donwload a file from my web app
Close, but not quite right. self.response.headers[Content-Type] = application/x-download self.response.headers[Content-Disposition] = attachment;filename=d.txt The first line tells the browser that you want it to download, period. The second line shows you that you do not want quotes around the filename. On Sep 11, 2009, at 2:36 AM, dingle wrote: I want to make my web app to provide download a file. A simple example is like that: class MainHandler(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = html/text self.response.headers['Content-Disposition'] = 'attachment;filename=d.txt' self.response.out.write(abcd) def main(): application = webapp.WSGIApplication([('/d', MainHandler)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() ## It should download a file d.txt with content abcd I tried the code in localhost, it works well. I updated it to appspot.com, it failed. From IE, an error Internate Explorer cannot donwload d from happened. So does appspot.com support to download a file? Or anything I made mistake code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Can't access the dashboard anymore
I am having the same problem. Rud On Sep 9, 6:56 pm, Riyadh rias.sher...@gmail.com wrote: I posted this message in response to another thread but for some reason it is not shown there. So here we go again :-) --- Hi everyone, A few weeks ago I created my GAE account and set up two applications. I deployed them using Eclipse - several times, over a course of about two weeks. Everything was working fine. Then, a few days ago, I tried to log in to my GAE account usinghttps://appengine.google.com/andhttps://appengine.google.com/a/MYDOMAIN.TLD and all I see is the page that says Create an application - just as if I never created an application before. For some strange reason both of my applications are still accessible when I open them viahttp://MYDOMAIN.TLD- so they're not down or something like that. The only thing is that I can't access their Dashboard using the above URLs. I can still deploy the applications using Eclipse. I also tried creating a new application and when I entered my cell phone number during the verification step it says The phone number has been sent too many messages or has already been used to confirm an account.. How can I get access to my applications and - more importantly - to the database contents (without writing some Servlet that exports them). I didn't do anything to my Google accounts lately so I guess it's some GAE issue. By the way: in Google Apps I still see my domains being connected to Google AppEngine. Many thanks R. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Dramatic increase in api cpu usage.
hi nick agreed on parallel api cpu calls and how this relates to time but those values jumped dramatically at some point last week with little or no change in userland code. is there an answer to this 3X-5X jump in db write API time? thanks brian On Sep 11, 2:17 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi Peter, On Fri, Sep 11, 2009 at 2:18 AM, Peter Liu tinyee...@gmail.com wrote: I see similar results. The total api cpu time is much higher then actual time spent on the actual call. I use a profiling api delegate that logs every api call duration, and the total api cpu reported on admin console is usually at least 2 times higher. This is because an API call may involve multiple machines. A batch put, for example, can include operations on multiple tabletservers, which are all executed simultaneously. -Nick Johnson On Sep 9, 2:05 pm, Lec lec...@gmail.com wrote: I cannot confirm what it was like previous to 1.2.5 release, but I think I am seeing something similar. Although with task queues my workers do data processing then store the data in datastore, i am NOT seeingcpuproblems with workers. I only see problems with the datastore in the main threads where i do not use workers. Did anyone have this kind of experience? L On Sep 9, 3:54 am, herbie 4whi...@o2.co.uk wrote: It seems I'm not the only one. I was starting to think I was imagining it! Thanks for supporting this thread. Would anyone fro Google like to comment? On Sep 8, 11:01 pm, Robert Kluin robert.kl...@gmail.com wrote: I have some code that is now using moreCPUas well. Previously: 1530cpu_ms 616api_cpu_ms 1404cpu_ms 995api_cpu_ms 1104cpu_ms 695api_cpu_ms Now: 4619cpu_ms 4133api_cpu_ms 4619cpu_ms 4133api_cpu_ms (yes, it is exactly the same) That is unchanged code. Same exact data. Robert On Tue, Sep 8, 2009 at 3:23 PM, bFlood bflood...@gmail.com wrote: I just ran a batch delete using the Task queue. It grabs the next 50 keys for a Kind and then calls db.delete(keys), so fairly simple stuff. here's some example results in the log: 865ms 1032cpu_ms 952api_cpu_ms 1058ms 1040cpu_ms 952api_cpu_ms 947ms 49947cpu_ms 49869api_cpu_ms --??? 1425ms 1035cpu_ms 952api_cpu_ms 1674ms 41181cpu_ms 41094api_cpu_ms any thoughts? something seems wrong to me cheers brian On Sep 8, 8:56 am, bFlood bflood...@gmail.com wrote: ok, I was able to check over my code again and even with rolling back small changes, the largeCPUincreases are still there. at this point, I have to agree with herbie's findings as well. It would be nice if Google could weigh in on this troubling issue cheers brian On Sep 8, 4:51 am, herbie 4whi...@o2.co.uk wrote: On Sep 8, 12:07 am, Stephen sdea...@gmail.com wrote: OK, but because api_cpu_ms is 96% of the total, then cpu_ms is also almost 3x higher? The spike is showing up in the cpu_ms? Yes in total the cpu_ms has gone up by nearly 3x too. But as I understand it cpu_ms is the totalcpuusage for the request and api_cpu_ms is thecpuusage by GAE api calls. So the difference between the two is thecpuusage of my non api code. This difference hasn’t increased because the code hasn’t changed. But yes, the newhighvalue for api_cpu_ms directly affects my quota because it makes the vast majority of cpu_ms. So we do pay for api_cpu_ms ! So for example if Google makes a change to db.put() (or any api call) so that it uses morecpu, we will be billed for morecpuusage even if our code hasn’t changed. As my code/ indexes hasn’t changed and the api_cpu_ms has shot up the obvious conclusion is that an api/datastore change has caused it? But there may be another ‘good’ reason for it, which I can’t think of, but as I’m going to have to pay for the increase in api_cpu_ms, I would really appreciate it if someone at Google could help. On Sep 8, 12:07 am, Stephen sdea...@gmail.com wrote: On Sep 7, 8:57 pm, herbie 4whi...@o2.co.uk wrote: On Sep 7, 6:50 pm, Stephen sdea...@gmail.com wrote: What about cpu_ms, is that also higher for requests which write to the data store? No, not in relation to api_cpu_ms. For the request that does the most writing to the datastore api_cpu_ms accounts for 96% of the total cpu_ms value!. The so request handler does not much more than create new entities in the datastore. OK, but because api_cpu_ms is 96% of the total, then cpu_ms is also almost 3x higher? The spike is showing up in the cpu_ms? cpu_ms is billed for, so if
[google-appengine] Re: Source-Code Version Control
I will recommend you use git over other VCS like svn, because git is a distributed version control system, you can do everything without a server. If you need a center git hosting, you can try http://gitfarm.appspot.com, a free private git hosting service. It's built on top of App Engine, so you don't need to worry about its reliability and safety. On Aug 21, 7:35 am, vicson.v vicson@gmail.com wrote: Hi All, I am starting to work on a project with a couple of my friends and we would like to use an Internet based VCS for sharing and maintaining code. We do not have a server environment at the moment, so a client- server system does not work. Do any of you know if Google provides any service to help us in this regard? Or in general, do you know of any good Internet based sourcecontrolsystems? Thanks for the help. Vicson. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Issue of my first app in google app engine
I alweays got the following error: When I try to save data using JDO in groovy servlet ,I got the following error: org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The class The class com.sompackage.Comment is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found. is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data for the class is not found. at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException (NucleusJDOHelper.java:241) My domain class is : @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Comment { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private Date date; @Persistent private String title; @Persistent private String content; public Comment(Date date, String title, String content) { super(); this.date = date; this.title = title; this.content = content; } public String toString() { return ReflectionToStringBuilder.toString(this); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } } The code in groovy servlet is : ... def triathlon = new Comment(now, title, content) def mgr = PersistenceMgr.manufacture() try { mgr.makePersistent(triathlon) Query query = pm.newQuery(Comment.class); query.setFilter(title == titleparam); query.setOrdering(title desc); query.declareParameters(String titleparam); ListComment results = (ListEmployee) query.execute(title); if (results.iterator().hasNext()) { for (Comment e : results) { resp.writer.println Comment from google:+e } } else { esp.writer.println No data } } finally { mgr.close() } resp.writer.println Hello Google App Engine Groovy! Can anybody help me? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Really simple site with random 500 errors...
Hi everyone! Since a few days I'm having some random 500 errors so I made a REALLY simple version of it... and I'm still getting the same behavior... This is the code of the simplified version: urls.py from django.conf import settings from django.conf.urls.defaults import * urlpatterns = patterns('apps.test.views', (r'^$', 'test'), ) views.py # -*- coding:UTF-8 import unicodedata from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 import os def test(request): return render_to_response(test/test.html) - I'm getting a 30% rate of errors and it's dead easy to fail. This are the logs: Exception in request: Traceback (most recent call last): File /base/python_lib/versions/third_party/django-1.0/django/core/ handlers/base.py, line 77, in get_response request.path_info) File /base/python_lib/versions/third_party/django-1.0/django/core/ urlresolvers.py, line 181, in resolve sub_match = pattern.resolve(new_path) File /base/python_lib/versions/third_party/django-1.0/django/core/ urlresolvers.py, line 181, in resolve sub_match = pattern.resolve(new_path) File /base/python_lib/versions/third_party/django-1.0/django/core/ urlresolvers.py, line 124, in resolve return self.callback, args, kwargs File /base/python_lib/versions/third_party/django-1.0/django/core/ urlresolvers.py, line 133, in _get_callback raise ViewDoesNotExist, Could not import %s. Error was: %s % (mod_name, str(e)) ViewDoesNotExist: Could not import apps.test.views. Error was: cannot import name signals - class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/webappmobile/3.336262356632739195/ main.py, line 47, in module main() .. .. .. File /base/python_dist/lib/python2.5/linecache.py, line 80, in updatecache stat = os.stat(fullname) OR File /base/python_dist/lib/python2.5/linecache.py, line 128, in updatecache fp = open(fullname, 'rU') OR File /base/python_dist/lib/python2.5/linecache.py, line 129, in updatecache lines = fp.readlines() Has anybody experienced something like this?. It's related to google? Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Server error without any log
I'm having the same issue. I've made a REALLY simple site with django 1.02 (from app engine) trying to find the problem. The only thing that this app does is return an html with render_to_response. Nothing else ant yet it fail by deadline, imports or some disk i/o operations. Does google knows about this? Because it seems like the problem it's outside the users code. Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] About the data acquisition error of the data store
When data is drawn out from the data store, the HTTP 500 error is output. Why does this symptom happen? Please answer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] root entities, key_names, and transactions
Lets say I am working with root entities, and I want to transactionally insert entities based on key_name. def txn(name): post = Post.get_by_key_name(name) if post is None: post = Post(key_name=name) post.put() return (post, True) else: return (post, False) Lets say there are no Post entities inserted yet. What happens from a locking/contention perspective when db.run_in_transaction(txn, 'foobar') is executed concurrently on 100 nodes? Transactions on root entities are supposed to be independent, which would means you would get many Posts with key_name='foobar'. However, if the transactions are not independent, you will get write contention, which is not supposed to happen when using root entities. How could the datastore provide both transactional uniqueness of key_names across root entities and transactional independence for root entities? Its a paradox. Calling db.run_in_transaction(txn, 'foobar') concurrently must produce write contention somewhere correct? What are the implications? Does that mean there could be write contention anytime you create a root entity with a key_name? Does that mean the only way to avoid write contention on insert is to use auto IDs? Can you clarify how it works under the covers? Thanks, Robin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Reading File from the local file system inside GAE.
Hi Tim, Could you please explain as to what does shouldn't be located in a path served by a static handler mean with an example. BTB I have my xml file in D:\TEST Thanks, GuruDutta On Sep 11, 7:55 pm, Tim Hoffman zutes...@gmail.com wrote: hi you can read files but it/they shouldn't be located in a path served by a static handler. have a look at where you have put it. On Sep 11, 10:30 pm, GuruDutta guru.rg2...@gmail.com wrote: Hi All, I am trying to read an XML file from the local file system. I have an app which runs on the GAE and all my code is in python and Jquery. Now I tried 2 ways of reading this file. 1. I tried to parse the xml file within my server code but it gave me an EACESS error stating it cannot access the file. 2. I tried to read the file from the UI using javascripts but it still gave me a security error . So now how do I read a file from within my web application?? Thanks, GuruDutta --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Best Way to delete mass amount of data
I have tried asking/researching this before, but I really need a more efficient way to delete mass amounts of data from the datastore. In short, I am only able to remove .1GB for 6.5 hrs of CPU time, and all of that is datastore time. Here is the code: class DeleteKeywords(webapp.RequestHandler): def get(self): try: trackers = Tracking.all().filter('delete_track',True) for x in trackers: keys = db.query_descendants(x).fetch(100) while keys: db.delete(keys) keys = db.query_descendants(x).fetch(100) x.delete() except DeadlineExceededError: queue = taskqueue.Queue(name='delete-tasks') queue.add(taskqueue.Task(url='/tasks/delete_tracks', method='GET')) self.response.out.write(Ran out of time, need to delete more!) Its really small and simple, and I did not think it'd use up soo much CPU time. Why is it that the API CPU time is soo much smaller than the Datastore CPU time? Is there any way to consume more of the datastore time than the API CPU time? I'd really like to clear out that database without needing to wait almost 50 hours worth of CPU time (which is odd since it runs for maybe 30 minutes - 1 hour, only 1 task a minute, and it uses up all that time... is it calculating wrong?) Anybody have any suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: about install app Engine SDK
python 2.6 isn't supported. Also, how are you trying to run the demo? You need to run dev_appserver.py and connect with a web browser; it sounds like you might be trying to run the .py files containing the handlers. On Sep 10, 5:18 am, chy chen licebl...@gmail.com wrote: How to install app Engine SDK? My python is versiono 2.6. After installing GoogleAppEngine_1.2.5.msi, i cannot run demo named guestbook6. The error message is something like No module named google.appengine.api Is there any convenient way i can import all the modules to python environment? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---