[appengine-java] Re: thanking uuuuuuuuu
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/b2d502bc03c83155# --~--~-~--~~~---~--~~ You received this message 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: Local server works, Appspot fails with java.lang.StackOverflowError when Spring AOP is enabled
Hi Toby, I've just realised that I probably over-wrote the app with a new version yesterday. Did you get what you need? (If not, I can easily re-deploy and resend the ID.) Cheers, Kris On Oct 19, 8:30 pm, Toby Reyelts to...@google.com wrote: Kris, Can you send us your app id (privately if you wish) ? On Mon, Oct 19, 2009 at 3:57 PM, Kris krisajenk...@gmail.com wrote: I'm also getting this StackOverflowError, but the app engine log view is truncated, so I can't see the initial cause. Is there any way to see the whole log message, so I can try to help track it down/produce a test case? Cheers, Kris On Oct 7, 4:36 pm, Toby Reyelts to...@google.com wrote: Unfortunately this is an issue that will be very difficult for us to solve unless you can provide us with a simple reproducing app that we can use to debug. If the issue is important to you, that is the most important thing you can do to help us.On Wed, Oct 7, 2009 at 6:57 AM, Dave Cheong d...@davecheong.com wrote: Hi there, I'm having the same problem and was wondering if you or anyone else out there have found a solution. I'm currently using GAE/J 1.2.5 and Spring 2.5. Like the previous author, everything works locally but I get a StackOverflowError on Appspot. However, if I comment out ... aop:aspectj-autoproxy/ ... things work on Appspot. Any help provided is much appreciated. thanks, dave On Aug 26, 3:38 pm, Gabriel Moreira gabrielmore...@gmail.com wrote: My app is using Spring 3.0. If i disable Spring AOP, my app runs fine both on local and appspot. But when i enable Spring AOP (tested with advice or aspects), in local runtime everything is fine and works, but in appspot im getting this error: java.lang.StackOverflowError at java.lang.String.endsWith(Unknown Source) at sun.security.provider.PolicyFile.canonPath(Unknown Source) at java.io.FilePermission$1.run(Unknown Source) at java.io.FilePermission$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.io.FilePermission.init(Unknown Source) at java.io.FilePermission.init(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.getPermission(Unknown Source) at sun.misc.URLClassPath.check(Unknown Source) at sun.misc.URLClassPath$FileLoader.getResource(Unknown Source) at sun.misc.URLClassPath$FileLoader.findResource(Unknown Source) at sun.misc.URLClassPath.findResource(Unknown Source) at java.net.URLClassLoader$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:631) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:659) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResource (UserClassLoader.java:659) at java.lang.ClassLoader.getResource(Unknown Source) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:665) at com.google.apphosting.runtime.security.UserClassLoader$4.run (UserClassLoader.java:659) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.UserClassLoader.findResour... My applicationContext.xml: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:aop=http://www.springframework.org/schema/aop; xmlns:context=http://www.springframework.org/schema/context; xmlns:tx=http://www.springframework.org/schema/tx; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
[appengine-java] Re: What defines a single transaction in JDO?
Sequence: tx.begin(); ,,, persist Entity group A tx.commit(); tx.begin(); .. persist Entity group B tx.commit(); works without any problem as designed. You have to provide more details to tell something. --~--~-~--~~~---~--~~ You received this message 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] all data suddenly disappeared from datastore
Hi, I had around 250,000 entities of a type, yesterday i wrote a cron to delete them. Today, I notices that entities are not getting deleted, so, I stopped the cron and started deleting entities manually, after deleting a number of entities (around 50k), suddenly all the entities of all the types disappeared !!! Where did other entities go??? Did Google vacuumed my DataStore? Was I doing anything against ToC --~--~-~--~~~---~--~~ You received this message 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] JSF2 and Scala - Problem with scala logger
Hi, I am a daring person and I have written an JSF2 web application in Scala (built with maven). Everything is working fine in the dev server and when I deploy I can see the first page. However, if there is a validation problem or I want to navigate to another page I get a blank page. On the logs, I only can see this as a warning: 11-04 02:04AM 38.475 EXCEPTION javax.servlet.ServletException: java.lang.SecurityException: Google App Engine does not support subclasses of java.util.logging.Logger: scala/runtime/Equality$1EqualityLogger at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:240) 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:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5135) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5133) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:814) 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:769) 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: 436) 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:396) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.SecurityException: Google App Engine does not support subclasses of java.util.logging.Logger: scala/runtime/Equality $1EqualityLogger at com.google.appengine.runtime.Request.process-fe7fd4d84408e047 (Request.java) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at scala.runtime.BoxesRunTime.equals(Unknown Source) at scala.collection.immutable.$colon$colon.readObject(List.scala:480) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeReadObject(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source)
[appengine-java] Re: read file
yes, i was able to read a file directly from a folder data/abc.csv using normal java APIs. I didn't configure it as a resource or static file. -Sanjith. On Tue, Nov 3, 2009 at 4:15 AM, Jason (Google) apija...@google.com wrote: You should be able to read it if you put it in your war directory and configure it as a resource file. I believe the second step is done automatically -- all files are configured as both resource and static by default, though you can override it by following the instructions at http://code.google.com/appengine/docs/java/config/appconfig.html#Static_Files_and_Resource_Files . You should be able to read resource files using the same APIs that you use to read files from disk in other Java application environments. - Jason On Thu, Oct 29, 2009 at 2:21 PM, Andreas Blomqvist blomqvist.andr...@gmail.com wrote: stupid question, but anyway I want to include a myData.csv file and read it from my app. Where do I put it ? and what is the path to the file when I read it in the code? 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: DeadlineExceededException while executing a server method.
yeah I realized that. Since I was trying to read a big .csv file, I spit it to three parts and read it thrice. thanks for the reply Jason. -Sanjith. On Wed, Nov 4, 2009 at 12:56 AM, Jason (Google) apija...@google.com wrote: Hi Sanjith. All App Engine requests must return within 30 seconds or this exception will be thrown. If you have a larger task, you can divide it into several parts and execute these in separate tasks, but each task must also return in 30 seconds or less. - Jason On Sat, Oct 31, 2009 at 11:12 AM, Sanjith Chungath csanj...@gmail.comwrote: in another word, is there a way to execute a server action through a normal server call or by tasks which can run more than 30 seconds? -Sanjith On Sat, Oct 31, 2009 at 12:40 AM, Sanjith Chungath csanj...@gmail.comwrote: Hi all, While executing a server method which talks to another system and get details from there, I get a DeadlineExceededException at the appengine. I don't have much control on the time taken by the other system. I just call a method from an interface of that system and wait for the response. What is the best practice in these situations? Below are the exceptions that I got at server. javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.sanchu.clicks.client.GreetingService.greetServer(java.lang.String)' threw an unexpected exception: com.google.apphosting.api.DeadlineExceededException: This request (e737f449255620d0) started at 2009/10/29 18:30:43.480 UTC and was still executing at 2009/10/29 18:31:12.207 UTC. at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 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:238) 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:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:814) 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:769) 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)
[appengine-java] Re: How not to Retain Values in development server?
If i am adding a new column to existing table, how do i migrate existing values? Okie. I have a table called User with columns First_Name, Last_name, email. And in some point i am adding a new column say DoB. When i query the existing values, i am getting exception like entity DoB is not present. So i need to go back and delete all the existing data available and then recreate java file. Is there any workaround atleast in local env. On Nov 2, 9:38 pm, Tito George tito...@gmail.com wrote: When ever i modify the PersistenceCapable classes i am getting error due to mismatch in the persisted data. Is there any way for not retaining data between sessions. In the jdoconfig i can see a property like -- property name=javax.jdo.option.RetainValues value=true/. What is this for, i tried setting it to false, but is not working. Values are retained. Tito --~--~-~--~~~---~--~~ You received this message 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: Problems with JDO Query.setCandidates(Collection)
App Engine's DataNucleus plugin doesn't support the setCandidates method Jason/Max, DataNucleus can do all of that for you, I'm sure I've mentioned this before. Here I'll even donate you some code that you can plug into your JDOQLQuery.performExecute() method code if (candidateCollection != null) { // Supplied collection of instances, so evaluate in-memory if (candidateCollection.isEmpty()) { return Collections.EMPTY_LIST; } else { ClassLoaderResolver clr = om.getClassLoaderResolver(); List candidates = new ArrayList(candidateCollection); JavaQueryEvaluator resultMapper = new JDOQLEvaluator (this, candidates, compilation, parameters, clr); return resultMapper.execute(true, true, true, true, true); } } /code So the query will be executed in memory using the user-supplied instances. No excuses now ;-) --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] Jdo: detaching objects vs. merging transient objects
I've used the merging of transient objects approach for a while as described in http://timepedia.blogspot.com/2009/04/google-appengine-and-gwt-now-marriage.html and it works quite fine. I only subsituted the proposed implementation of copying fields by dozer. However, I am still thinking to move to the detaching objects approach and played around with it a bit. So far, the detaching objects approachs seems more cumbersome to me... I would be happy to hear some thoughts... regards, andr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: thanking uuuuuuuuu
here u can find Netbeans plugin for App Engine http://kenai.com/projects/nbappengine/pages/NBInstall On Nov 3, 5:52 pm, raju k alias (billa) oxfordr...@gmail.com wrote: Thank for the java version Is there any plugin for netbeans IDE --~--~-~--~~~---~--~~ You received this message 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] App engine layout - servers around the world?
I was wondering - say a user from South Africa and a user from the U.S hits a webapp deployed on GAE. Do those users expirience the same speed of loading the site, downloaing images, etc., or GAE servers located in one data center (for example, California), and the nearest users will enjoy from faster download? 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: UnsupportedDatastoreFeatureException
If i change my authenticate filter to query.setFilter(ContactInfo.email == emailParam password == passwordParam); I now get this error. javax.jdo.JDOUserException: Identifier ContactInfo.email is unresolved (not a static field) On Nov 3, 9:32 pm, Max Ross (Google) maxr+appeng...@google.com wrote: Andy has pinpointed the issue. You most likely don't have a field on your MyUser class named email but the error isn't being triggered on the first query because your second call to setFilter() is overwriting the reference to the nonexistent field. You'll need to pass the entire filter to setfilter() and you most likely want 'contactInfo.email' instead of 'email' Hope this helps, Max On Tue, Nov 3, 2009 at 12:00 PM, datanucleus andy_jeffer...@yahoo.comwrote: Multiple calls to setFilter will overwrite the previous value. Do you really want to do that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
Why is BookFK trying to use Datastore Identity ? (as the message says) identityType=IdentityType.APPLICATION would be recommended --~--~-~--~~~---~--~~ You received this message 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: UnsupportedDatastoreFeatureException
Ok i figured it out now. I was trying to refer to the classname ContactInfo in my filter rather than the object name in my User class contactInfo. The difference in case for the leading 'C' was the culprit. On Nov 4, 10:19 am, IlyaE ilyaelk...@gmail.com wrote: If i change my authenticate filter to query.setFilter(ContactInfo.email == emailParam password == passwordParam); I now get this error. javax.jdo.JDOUserException: Identifier ContactInfo.email is unresolved (not a static field) On Nov 3, 9:32 pm, Max Ross (Google) maxr+appeng...@google.com wrote: Andy has pinpointed the issue. You most likely don't have a field on your MyUser class named email but the error isn't being triggered on the first query because your second call to setFilter() is overwriting the reference to the nonexistent field. You'll need to pass the entire filter to setfilter() and you most likely want 'contactInfo.email' instead of 'email' Hope this helps, Max On Tue, Nov 3, 2009 at 12:00 PM, datanucleus andy_jeffer...@yahoo.comwrote: Multiple calls to setFilter will overwrite the previous value. Do you really want to do that? --~--~-~--~~~---~--~~ You received this message 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 namespace for entity in bulkloader?
Maybe I didn't word my problem very well. Let me describe it again: Data push: 1. I am bulkloading data to an app using python appcfg and custom bulkloaders. 2. The custom bulk loaders are pushing data from a CSV. 3. The models of the data being pushed have simple names in python (no package namespace) 4. The entities all get successfully uploaded. Data query: 1. The application that uses the data pushed via bulk loading is in Java 2. Because it's in Java, there is a package namespace for where my entity classes exist 3. App Engine is supposed to ignore the long package namespace and just pick up the simple name (ie, the name of the class) 4. These simple names are supposed to match the simple names of the data that was pushed via bulk loading. The problem: 1. Queries for the simple name via the admin interface return data as expected 2. Queries for the simple name via Java code do NOT return data as expected. Instead I get a JDO error about the class not being found (sorry, don't have my code in front of me to list the trace). Basically, it seems that a query for a simple name throws an error when that simple class name exists in a fully named package. I am using JDO annotations in my classes as per the tutorials. Is there some magic that I am missing? Perhaps I am doing something wrong with my annotations? I would rather post details, but wanted to get a handle on the general problem before I bog down the list with a stack trace and entity code. Stuart On Nov 3, 5:06 pm, Stuart Moffatt stuartmoff...@gmail.com wrote: I am using Nick's excellent tutorials on bulk loading, and was able to push a huge pile of entities up to production. Problem is, they looked like this: MySpecialEntity in my custom python bulkloader class and in production. The gotcha is my application is Java, and queries for: SELECT FROM org.domain.app.MySpecialEntity fail because the Javanamespacewas not part of the python bulkloader. Anyone know a workaround? Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
BookFk is an embedded class intended to be used by entities like Chapter and others. It is NOT intended to be a standalone entity or have a Primary Key. So, when I try your fix I get the following compile error: SEVERE: Class struts2.example4.BookFk has application-identity and no objectid-class specified yet has 0 primary key fields. Unable to use SingleFieldIdentity. This pattern was submitted by Bryce as a way of better handling redundant data related to FK fields such as Chapter.book in this case. On Nov 4, 10:59 am, datanucleus andy_jeffer...@yahoo.com wrote: Why is BookFK trying to use Datastore Identity ? (as the message says) identityType=IdentityType.APPLICATION would be recommended --~--~-~--~~~---~--~~ You received this message 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 deploying app - Version not ready
Thanks, Jason. Indeed it did work when I tried it yesterday, though my recollection is that I tried it a few times over a couple of days last week, so it gave the impression of something less transient going on. But, indeed it works now! Thanks, Jed On Nov 2, 3:10 pm, Jason (Google) apija...@google.com wrote: Hi Jed. There was some deployment latency late last week, but this didn't last very long, and everything should be up and running smoothly. Please let me know if you continue to see this error and make sure to provide your application ID in future posts. - Jason On Thu, Oct 29, 2009 at 4:04 PM, JedIrv jed...@gmail.com wrote: Hello, I'm in my first days of experimenting with Google App Engine and am getting an error when I try to deploy using the eclipse plugin. My initial deploy went smoothly a couple of days ago, and several updates as well, but trying to redeploy now, I see the console output indicate some sort of connection issue develops: . . . Deploying new version. Will check again in 1 seconds. Will check again in 2 seconds. ...(falls back to waiting twice as long until it gets to 128)... Will check again in 128 seconds. Rolling back the update. javaj.lang.RuntimeException: Version not ready. the stack trace in the log has this: Unable to update: java.lang.RuntimeException: Version not ready. at com.google.appengine.tools.admin.AppVersionUpload.commit (AppVersionUpload.java:361) at com.google.appengine.tools.admin.AppVersionUpload.doUpload (AppVersionUpload.java:114) at com.google.appengine.tools.admin.AppAdminImpl.update (AppAdminImpl.java:56) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy (AppEngineBridgeImpl.java:271) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace (DeployProjectJob.java:148) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) yet, my admin console log page indicates the update went ok (or at least no problem is indicated). Checking the url reveals the update did not succeed. Any help would be greatly appreciated! Jed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
BookFk is an embedded class intended to be used by entities like Chapter and others. Needs a PK either way. Pick a field, any field. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
Needs a PK either way. Pick a field, any field. Or just set embeddedOnly as true ... if you really never want to persist one of those in its own right --~--~-~--~~~---~--~~ You received this message 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: JSF 1.2 - Session-scoped managed Bean not Behaving as Expected
I have the same problem with JSF 2.0,and I am looking for some solutions ,too. On Sep 5, 11:52 am, Traveler1980 jshar...@gmail.com wrote: Hi All, I recently upgraded an app that I'm working on from MyFaces 1.1.6 to JSF (Mojarra) 1.2_13 with Facelets. I used the jars (el and jsf) from this example --http://code.google.com/p/jsfongap/ Everything is working fine when running my app locally; however, when I deploy,session-scoped managed beans are being recreated on every page turn - almost as if they are request-scoped. To give a simple example, let 's say I have this bean defined in faces- config: managed-bean managed-bean-nameuser/managed-bean-name managed-bean-classfoo.bar.User/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean And the bean is used on page 1 of an application as follows: h:inputText id=firstName value=#{user.firstName} style= / And the value is then output on a second page like: h:outputText value=#{user.firstName}/ Regardless of what I type on the first page, the value is not retained and displayed on the second page. I did a simple test where I logged user.toString(). I expected the output from toString() to be the same for the entiresession. My expectation was met on my development server, but when deployed I saw this: First Page submit - 09-04 08:44PM 37.206 foo.bar.actions.impl.UserAction execute: foo.bar.u...@1515d5c Second Page Submit - 09-04 08:44PM 46.579 foo.bar.actions.impl.UserAction execute: foo.bar.u...@60999e Big surprise. Different objects!! In fact, a new instance of User is created for every page turn. Has anyone else noticed this odd behavior? Is it possible that I've missed something? I will probably end up going back to MyFaces 1.1. Thanks in advance for the help. Jamie --~--~-~--~~~---~--~~ You received this message 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] problem with using session.getAttribute()
in my application a servlet stores the user's details when she starts with the application as follows User user=new User(); HttpSession session=req.getSession(); user.setUser(userName); user.setRole(user); session.setAttribute(user, user); RequestDispatcher rd=req.getRequestDispatcher(/HomePage.jsp); rd.forward(req, resp); After this servlet stored the User object in session, every jsp in the application receives the User object from session using a helper class public class UserIdentifier { public static String getUser(HttpServletRequest req) { HttpSession session=req.getSession(false); User userObj=(User)session.getAttribute(user); String role=userObj.getRole(); // HERE IS THE ERROR String user=null; if(role.equals(admin)) { user=(String)session.getAttribute(user2); if(user==null) { return null; } } if(role.equals(user)) { user=userObj.getUser(); } return user; } } The User class is serializable and sessions-enabledtrue/sessions- enabled is present in appengine-web.xml it works fine on my local machine but when i deployed to app engine, it throws a nullpointer exception on the line where i called userObj.getRole(); it indicates that userObj is null, i dont understand why it is not able to pick the User object from the session --~--~-~--~~~---~--~~ You received this message 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] Cron job fired up twice
Hi All, My crontab is defined in the following way: ?xml version=1.0 encoding=UTF-8? cronentries cron url/cron/sendnotifs/url descriptionSend notification at 9 every Mon, Tue, Wed, Thu, Fri/ description scheduleevery mon,tue,wed,thu,fri 09:00/schedule timezoneEurope/Sarajevo/timezone /cron cron url/cron/sendnotifs/url descriptionSend notification at 10 every Sat, Sun/description scheduleevery sat,sun 10:00/schedule timezoneEurope/Sarajevo/timezone /cron /cronentries The problem is that it is fired up twice. Unfortunately I don't know how big is the problem because I don't receive notifications every time when cron hits the /cron/sendnotifs URL, but if the conditions for notification in my app are met, I receive two notifications. That leads me to the conclusion that cron was started twice. Today, cron was executed at 9 as it suppouse to, and at 09:05:09. Where is the problem? Am I missing something? Thanks in advance for any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] How to use JSON on server-side?
I'm newbie... I want to use JSON on server-side to do something... But I can't... Please help me! --~--~-~--~~~---~--~~ You received this message 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] Recommended scope for DatastoreService
Should I be creating a DatastoreService for each session, or are they inexpensive enough that I can have one for each Kind? I realise that for transactions, the latter doesn't work. A related question is how threadsafe is an instance of DatastoreService? --~--~-~--~~~---~--~~ You received this message 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] Cannot retrieve value of the newly created attribute in a JDO
Hi All, I created a JDO class, which had some attributes, and I created some CRUD operations, all of them worked correctly. Then I added a new attribute in the JDO class, and then set value to it and persisted it as usual when I executed CRUD operations. The problem is that I cannot retrieve the value of the new attribute in program, the value is always null. But when I check the value in Datastore - Data Viewer, the value is correct. So i'm wondering why it cannot be retrieved in application. Is there some cache mechanism? Thanks in advance! Jiakuan --~--~-~--~~~---~--~~ You received this message 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: does usage of buffered writer in servlet make sense
If you're calling print or println many times in your servlet, then it makes sense, although the resource savings you net may not be significant. In general, it's acceptable to use the default PrintWriter. - Jason On Mon, Nov 2, 2009 at 7:18 AM, Raphael André Bauer raphael.andre.ba...@gmail.com wrote: hey, i am wondering if it makes sense to wrap the printwriter of a servlet into a bufferedwriter. depending on the underlaying implementation that can make sense imho, but i am not sure about the google app engine... any recommendations? thanks! raphael --~--~-~--~~~---~--~~ You received this message 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: PDF Generator Library
Great news, Eugene! Can you please submit it to the open source projects page by following the instructions at the bottom of http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects ? - Jason On Sun, Nov 1, 2009 at 8:55 PM, edragoev drag...@gmail.com wrote: Hello Jason, I took Francois tweaks and also added support for PNG files that doesn't depend on the AWT classes. We have new GAE compatible Open Source version now: http://pdfjet.com/os/download.html Best Regards, Eugene P.S. The PNG decoder I wrote currently supports Truecolor PNG files with Bit Depth 8 and paletted PNG files with Bit Depth 4 and 8. Currently there is no support for grayscale images. If there is interest we may add support for more types of PNG files and possibly GIF support. On Oct 7, 4:14 pm, Jason (Google) apija...@google.com wrote: Hi mably. Can you describe the tweaks you need to make in more detail? I'd like to add this to the Will it play in App Engine page. Thanks, - Jason On Tue, Oct 6, 2009 at 6:44 AM, mably fm2...@mably.com wrote: The PDFJet library seems to works fine on GAE after a few tweaks to replace files by streams. It's a quite low-level library but should be ok for simple tasks. http://www.pdfjet.com/os/edition.html On 28 sep, 19:09, Jason (Google) apija...@google.com wrote: You're correct. As far as I know, no one has been able to use JasperReports within App Engine because of the reliance on iText which in turn requires several AWT classes that aren't currently on the JRE class white list. - Jason On Thu, Sep 24, 2009 at 10:12 AM, mably fm2...@mably.com wrote: Are you sure that JasperReports works fine on GAE ? I thought it was using iText which doesn't seem to run on GAE (it needs an unsupported patch). Mian Rashid a écrit : Use can use Jasper Report and there is also designer tool available for that is IReport. On Sep 23, 6:57 pm, mably fm2...@mably.com wrote: Does anybody know of a java PDF generator library working with Google App Engine ? Even a low-level one. Any help would be greatly appreciated. Thanx in advance. Francois Bordeaux, FRANCE --~--~-~--~~~---~--~~ You received this message 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 with using Federated Login (OpenID + OAuth)
Hi Pradheep. The library that you are using is attempting to spawn a new thread which is not permitted by App Engine's sandbox. You will have to either disable multithreading via configuration, if the library exposes this, or use another library. The Google Accounts API that is referenced in the paragraph that you quoted from our documentation is referring to the Google Accounts service that App Engine exposes: http://code.google.com/appengine/docs/java/users/ This App Engine API only returns the user's nickname and email address, however, so you'll need to use a different mechanism if other profile information is necessary. - Jason On Sun, Nov 1, 2009 at 8:24 PM, Pradheep A R pradheep@gmail.com wrote: Hello everyone, I am sure i am asking something that some one here knows the answer. I am trying to implement the OpenID client to authenticate my users in the Google App Engine website and then use Google Accounts API to access their profile (All i want is to show their profile pics, show their contacts when they want to notify some information to their friends when they use my websitewww.letsvoteonline.com) I am using OpenID for Java library for this purpose. The problem here is i am getting the following exception. java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:151) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkAccess(DevAppServerFactory.java:176) at java.lang.ThreadGroup.checkAccess(Unknown Source) at java.lang.Thread.init(Unknown Source) at java.lang.Thread.(Unknown Source) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ReferenceQueueThread.(MultiThreadedHttpConnectionManager.java:1039) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.storeRefer enceToConnection (MultiThreadedHttpConnectionManager.java:164) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.access $900(MultiThreadedHttpConnectionManager.java:64) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ConnectionPool.createConnection (MultiThreadedHttpConnectionManager.java:750) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConne ction (MultiThreadedHttpConnectionManager.java:469) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnect ionWithTimeout (MultiThreadedHttpConnectionManager.java:394) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:152) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:324) at org.openid4java.util.HttpCache.head(HttpCache.java:296) at org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsLocation (YadisResolver.java:360) at org.openid4java.discovery.yadis.YadisResolver.discover (YadisResolver.java:229) at org.openid4java.discovery.yadis.YadisResolver.discover (YadisResolver.java:221) at org.openid4java.discovery.yadis.YadisResolver.discover (YadisResolver.java:179) at org.openid4java.discovery.Discovery.discover (Discovery.java:134) at org.openid4java.discovery.Discovery.discover (Discovery.java:114) at org.openid4java.consumer.ConsumerManager.discover (ConsumerManager.java:527) at letsvote.webapps.Letsvote_test1Servlet.authRequest (Letsvote_test1Servlet.java:170) at letsvote.webapps.Letsvote_test1Servlet.doGet (Letsvote_test1Servlet.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 693) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 806) at org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:121) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360)
[appengine-java] Re: error 500 from server when starting the guestbook demo app
It looks like your system may not have Java configured correctly or otherwise can't invoke the javac compiler needed to compile your application. java.io.IOException: Cannot run program javac.exe: CreateProcess error=2 You may want to search the web for similar error messages, which might help you determine the source of the issue. Are you using the Eclipse plugin or the command line to start your app? - Jason On Mon, Nov 2, 2009 at 11:18 AM, Tomas tomasep...@gmail.com wrote: Hi I'm Tomas - a newbe. I get error 500 from server when trying a demo application to according to instructions: http://code.google.com/appengine/docs/java/gettingstarted/installing.html Response from localserver:8080 look here: http://docs.google.com/Doc?docid=0Afhb3u6SCF24ZGN2cjN2cTNfM2ZwODkyN2Yyhl=en what' wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
Datanucleus, both suggestions worked but I like the embeddedOnly best in order to avoid a dummy key on every FK class! Bryce, I no longer get the error above...I just added embeddedOnly=true to the PersistanceCapable tag in BookFk class. You're right, I could use the collection technique on the FKs but I wonder the pros/cons of such collections on what could be very large collections. For example, say Baylor with 25,000 members? Guess its a matter of using owned for small Sets versus unowned for large Sets of data. Regardless, your FK pattern will save a whole lot of code management!!! Any further feedback welcome...I'll continue testing! On Nov 4, 12:12 pm, datanucleus andy_jeffer...@yahoo.com wrote: Needs a PK either way. Pick a field, any field. Or just set embeddedOnly as true ... if you really never want to persist one of those in its own right --~--~-~--~~~---~--~~ You received this message 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: App Engine Refactoring / Adaptable Design
Unfortunately, the solution I proposed does not allow for adding additional filters when querying for all Campaigns with FundingOganization ABC. If this is a requirement, you'll have to consider several options -- either doing the filtering in memory, which is reasonable if you only expect a handful of matched Campaigns, or including the criterion field in the table so you can query on it directly, which may muddle your schema. Since App Engine's datastore doesn't support joins, most data models won't be completely normalized, which probably feels strange if you're coming from the RDBMS mindset. But storage is cheap and you can usually ignore the added redundancy if the data fields in question are not expected to change often. - Jason On Mon, Nov 2, 2009 at 3:27 PM, Hans gcbo...@gmail.com wrote: thanks Jason - I'll need to think more about how this would work in my case. It sounds like I'll be able to query that new kind (return all the Campaign keys for a FundingOrganization of ABC) to get a collection of keys. But then if I wanted to extract only the entities from that result that meet certain criteria (Campaign.Duration 30) , I'll need to do that outside of the query language. I'm sure my questions reflect a newness to OOD. I do appreciate your response. Hans On Nov 2, 3:27 pm, Jason (Google) apija...@google.com wrote: Hi Hans. Aside from the article on modeling entity relationships and the JDO ... It sounds like you want to add a new kind (as opposed to a new property for an existing kind) and establish a relationship with this new kind (FundingOrganization) and an existing kind (Campaign). For many-to-many relationships such as this, one approach you can take is similar to what you might do for an RDBMS schema: introduce a new table (kind) to model the relationship between FundingOrganization and Campaign entities. This third kind would have only two properties, one storing a FundingOrganization Key and the other a Campaign Key, then you can use it to query for all FundingOrganization entities associated with a given Campaign and vice versa. This approach doesn't require you to modify your Campaign kind at all, so you don't necessarily need to make it aware of the FundingOrganization kind, which was one of your requirements. Let me know if this answers your question or if you have any other questions. - Jason On Thu, Oct 29, 2009 at 1:55 PM, Hans gcbo...@gmail.com wrote: Hoping someone might help me with a somewhat OT question. I developed an object model for a GAE/J application that worked fairly ... Can someone point this rookie to intro material/URLs for building and refactoring designs that lend themselves to these type of changes? I'm looking for info on adaptable design, especially when you're using a datastore and not using a RDBMS, junction tables, etc. thanks, Hans --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Error while uploading app to GAE
Did your path always include the one \ delimiter with all of the other separators being /? - Jason On Mon, Nov 2, 2009 at 7:45 PM, Vik vik@gmail.com wrote: Hie Today all of a sudden when i tried to deploy my app to GAE throws errors: An internal error occurred during: Deploying SakshumWebProduction to Google. Received IOException parsing the input stream for D:/eclipse/vskumar/workspace/SakshumWebProduction/war\WEB-INF/web.xml The contents of web.xml are just fine. here it is: ?xml version=1.0 encoding=utf-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/javaee; version=2.5 servlet servlet-namesakshumweb/servlet-name servlet-classvik.sakshum.sakshumweb.SakshumWebServlet/servlet-class /servlet servlet-mapping servlet-namesakshumweb/servlet-name url-pattern/sakshumweb/ui/page/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list /web-app Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
Rusty, Thanks for the code sample! How do you decide when to use key type of Key vs String? On Nov 4, 1:45 pm, James H james.hollier...@gmail.com wrote: Datanucleus, both suggestions worked but I like the embeddedOnly best in order to avoid a dummy key on every FK class! Bryce, I no longer get the error above...I just added embeddedOnly=true to the PersistanceCapable tag in BookFk class. You're right, I could use the collection technique on the FKs but I wonder the pros/cons of such collections on what could be very large collections. For example, say Baylor with 25,000 members? Guess its a matter of using owned for small Sets versus unowned for large Sets of data. Regardless, your FK pattern will save a whole lot of code management!!! Any further feedback welcome...I'll continue testing! On Nov 4, 12:12 pm, datanucleus andy_jeffer...@yahoo.com wrote: Needs a PK either way. Pick a field, any field. Or just set embeddedOnly as true ... if you really never want to persist one of those in its own right- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message 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 namespace for entity in bulkloader?
Typo (I think): - Query q = new Query(package.MyClass) // manually pass full package name should be: - Query q = new Query(SELECT * FROM package.MyClass) // manually pass full package name Stuart On Wed, Nov 4, 2009 at 4:43 PM, Stuart Moffatt stuartmoff...@gmail.comwrote: Nick, I've used a java loader in hosted mode (to spare the expense of doing it in production) for all of my entities. When I load them locally, /_ah/admin reports the simple name of the entity, with the right data. But my java code needs to query with the full package name. For instance, these work in hosted mode after entities loaded via Java loader - Query q = new Query(MyClass.class) // automatically passes full package name - Query q = new Query(package.MyClass) // manually pass full package name But these do not work in hosted mode after entities loaded via Java loader - Query q = new Query(SELECT * FROM MyClass) // simple name fails to map to package name - Query q = new Query(MyClass.class.getSimpleName()) // simple name fails to map to package name I am hoping I have explained this correctly. I got so confused yesterday trying to distinguish between: - working / not working (ie JDO error) - combined with hosted/production - combined with python/java loaders In your example at http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-Part-5-Bulk-Loading-for-Java what is the corresponding java package name for the python model Film? Do Films pushed via the bulk loader get returned when your Java code queries for Film.class or SELECT * FROM Film? I guess I am looking for validation (ie, working code) that entities pushed with a python bulkloader can be queried properly using Java. Like I said, I have probably got either the Query syntax wrong in the servlet or the annotations wrong in the class. If you add some Java code to the Film example, it would help immensely. Stuart On Wed, Nov 4, 2009 at 4:24 PM, Nick Johnson (Google) nick.john...@google.com wrote: Hi Stuart, I'm not sure why this would be happening. Your best option might be to insert a record using Java, then check how it shows up in the admin console, and make sure to use the exact same name for the kind you use in the Java loader. -Nick Johnson On Wed, Nov 4, 2009 at 6:25 PM, Stuart Moffatt stuartmoff...@gmail.comwrote: Maybe I didn't word my problem very well. Let me describe it again: Data push: 1. I am bulkloading data to an app using python appcfg and custom bulkloaders. 2. The custom bulk loaders are pushing data from a CSV. 3. The models of the data being pushed have simple names in python (no package namespace) 4. The entities all get successfully uploaded. Data query: 1. The application that uses the data pushed via bulk loading is in Java 2. Because it's in Java, there is a package namespace for where my entity classes exist 3. App Engine is supposed to ignore the long package namespace and just pick up the simple name (ie, the name of the class) 4. These simple names are supposed to match the simple names of the data that was pushed via bulk loading. The problem: 1. Queries for the simple name via the admin interface return data as expected 2. Queries for the simple name via Java code do NOT return data as expected. Instead I get a JDO error about the class not being found (sorry, don't have my code in front of me to list the trace). Basically, it seems that a query for a simple name throws an error when that simple class name exists in a fully named package. I am using JDO annotations in my classes as per the tutorials. Is there some magic that I am missing? Perhaps I am doing something wrong with my annotations? I would rather post details, but wanted to get a handle on the general problem before I bog down the list with a stack trace and entity code. Stuart On Nov 3, 5:06 pm, Stuart Moffatt stuartmoff...@gmail.com wrote: I am using Nick's excellent tutorials on bulk loading, and was able to push a huge pile of entities up to production. Problem is, they looked like this: MySpecialEntity in my custom python bulkloader class and in production. The gotcha is my application is Java, and queries for: SELECT FROM org.domain.app.MySpecialEntity fail because the Javanamespacewas not part of the python bulkloader. Anyone know a workaround? Stuart -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine 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: Java namespace for entity in bulkloader?
Nick, Can you clarify what you mean by 'java loader' and 'hosted mode'? My java loader is a servlet which loads a CSV from disk, processes it and persists entities to the datastore. The CSV has the values for the properties I want my entity to have. The CSV and the data it points to is in WEB-INF, so I can get away with loading large sets in hosted mode and smaller sets in production (because of the static file limit and request timeout it is not possible to load all of my data in production using this method). The Kind is created when I persist that first entity. This is functionally similar to a python bulk loader, except it is a one-off servlet, and does not come with all of the configuration and transport mechanism options that provided by the python SDK. In the Python SDK, entities are named after the unqualified name of the class, by default - so a 'Film' gets loaded with an entity name of 'Film'. You can specify a custom entity type name with the kind() method. I'm still not hugely familiar with Java, so I'm not sure under which conditions it will use qualified and unqualified names - basically, you need to match those with your Python loaders. At one point I tried to convince bulkloader.py (using --kind=package.MyClass) and my custom bulk loader (bulkloader.Loader.__init__(self, 'package.MyClass')) to accept the full java package name, but even when I used namespaces in the python model, this did not work. Perhaps a python example for the kind() method you mention? Am I correct in assuming that I should provide a kind() method in my custom bulk loader which overrides the default in much the same way as handle_entity() or generate_key() gives you a hook into those functions? In other words, should I try this? class MyClass(db.Model): name = db.StringProperty() other_property = db.StringProperty() class MyClass(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'MyClass', [('name', str), ('other_property', str) ]) def kind(self, entity): return 'package.MyClass' I understand if you can't provide a Java example, no worries. In lieu of that, could you provide a full example of customizing the python model's namespace using the kind() method in a custom bulkloader, along with the command line syntax to push it (with appcfg.py using the custom loader). And if that's not enough grin it would be good to see the query syntax in the runtime application (e.g. SELECT * from package.MyName with the right python import statements). Thanks for your help on this. Stuart --~--~-~--~~~---~--~~ You received this message 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 namespace for entity in bulkloader?
On Wed, Nov 4, 2009 at 11:31 PM, Stuart Moffatt stuartmoff...@gmail.comwrote: Nick, Can you clarify what you mean by 'java loader' and 'hosted mode'? My java loader is a servlet which loads a CSV from disk, processes it and persists entities to the datastore. The CSV has the values for the properties I want my entity to have. The CSV and the data it points to is in WEB-INF, so I can get away with loading large sets in hosted mode and smaller sets in production (because of the static file limit and request timeout it is not possible to load all of my data in production using this method). The Kind is created when I persist that first entity. This is functionally similar to a python bulk loader, except it is a one-off servlet, and does not come with all of the configuration and transport mechanism options that provided by the python SDK. In the Python SDK, entities are named after the unqualified name of the class, by default - so a 'Film' gets loaded with an entity name of 'Film'. You can specify a custom entity type name with the kind() method. I'm still not hugely familiar with Java, so I'm not sure under which conditions it will use qualified and unqualified names - basically, you need to match those with your Python loaders. At one point I tried to convince bulkloader.py (using --kind=package.MyClass) and my custom bulk loader (bulkloader.Loader.__init__(self, 'package.MyClass')) to accept the full java package name, but even when I used namespaces in the python model, this did not work. Perhaps a python example for the kind() method you mention? Am I correct in assuming that I should provide a kind() method in my custom bulk loader which overrides the default in much the same way as handle_entity() or generate_key() gives you a hook into those functions? Pretty much, except kind() is a method for Model classes, not loaders. Like this: class Foo(db.Model): @classmethod def kind(self): return 'my.Foo' In other words, should I try this? class MyClass(db.Model): name = db.StringProperty() other_property = db.StringProperty() class MyClass(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'MyClass', [('name', str), ('other_property', str) ]) def kind(self, entity): return 'package.MyClass' I understand if you can't provide a Java example, no worries. In lieu of that, could you provide a full example of customizing the python model's namespace using the kind() method in a custom bulkloader, along with the command line syntax to push it (with appcfg.py using the custom loader). As above, and specify the kind you declared in the Python module on the command line and in the loader. And if that's not enough grin it would be good to see the query syntax in the runtime application (e.g. SELECT * from package.MyName with the right python import statements). If you're using GQL, you need to use the kind name, not the class name (so in this example it would be SELECT * FROM my.Foo). -Nick Thanks for your help on this. Stuart -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine 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 namespace for entity in bulkloader?
Nick, Pretty much, except kind() is a method for Model classes, not loaders. Like this: class Foo(db.Model): @classmethod def kind(self): return 'my.Foo' The above kind() method makes more sense (in the model instead of the loader). Was not aware of it as the docs don't give much of a hint ( http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_kind) as to other uses. Thanks for pointing it out. As above, and specify the kind you declared in the Python module on the command line and in the loader. Just to clarify, my loader will look like this: class Foo(db.Model): name = db.StringProperty() data = db.IntegerProperty() @classname def kind(self, entity): return 'my.Foo' class FooLoader(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'my.Foo', [('name', str), ('data', int) ]) and my command line will have --kind=my.Foo Correct? And if that's not enough grin it would be good to see the query syntax in the runtime application (e.g. SELECT * from package.MyName with the right python import statements). If you're using GQL, you need to use the kind name, not the class name (so in this example it would be SELECT * FROM my.Foo). Yes, GQL is how I will access, so I will use the full Kind name. It also seems that in Java if I use: Query q = new Query(Foo.class) that the resulting query will be generate a statement with SELECT * FROM my.Foo I will give this a shot (later tonight) and post my results to the list. Unfortunately, I pushed all of my data without the kind() method in the model exposing the full name of my corresponding Java class. I don't think there is any way fix the data in the store, except to delete it all and start again with the updated model and bulk loader. Correct? Stuart --~--~-~--~~~---~--~~ You received this message 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] JDO/JPA Snippets That Work - Unindexed Properties
http://gae-java-persistence.blogspot.com/2009/11/unindexed-properties.html --~--~-~--~~~---~--~~ You received this message 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: Recommended scope for DatastoreService
Hi Max Thx for the answer, especially the correction on the transaction implementation. The solution I'd arrived at is to use Guice to instantiate my DsS with a scope of @RequestScoped. Do you see any problems with that approach? best Roy On Wed, Nov 4, 2009 at 7:02 PM, Max Ross (Google) maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: A DatastoreService instance is extremely lightweight so feel free to create them as-needed. In addition, transactions are not tied to a specific DatastoreService instance but rather to the thread that started the transaction. Finally, assume that all classes in the api are _not_ threadsafe unless explicitly documented otherwise. Hope this helps, Max On Wed, Nov 4, 2009 at 4:35 AM, Roy roy.sm...@cleverthinking.co.ukwrote: Should I be creating a DatastoreService for each session, or are they inexpensive enough that I can have one for each Kind? I realise that for transactions, the latter doesn't work. A related question is how threadsafe is an instance of DatastoreService? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Master/Detail relations and redundant data handling
Thinking out loud here: When you use that encoded string format you can use it wherever you'd use Key. The apparent advantage of using the encoded string format is that your dto isn't exposing GAE's Key. With the encoded string your service layer can be oblivious about GAE's Key, without any extra code in your dao; otherwise, to hide the Key from the service layer it seems to me that you'd need to convert the Key to String via the KeyFactory methods. Even then it seems a bit dodgy; if you're using your persistence layer's dtos in your view layer, which seems to be fashionable these days, then your jsp is probably going to want to use the primary key, for the value in the selects, check boxes, etc. So one way to answer your question would be to say that you should (could) use String whenever your service layer, or above, uses a dto's primary key. My question is, what's the down side to using the encoded string in all of your dtos? My inclination is to just forget about Key and use the encoded string everywhere. My other question is, do other databases support String for a primary key? I've always used something that's autoincremented, for example, a sequence, and those are always longs and their ilk. James H wrote: Rusty, Thanks for the code sample! How do you decide when to use key type of Key vs String? On Nov 4, 1:45 pm, James H james.hollier...@gmail.com wrote: Datanucleus, both suggestions worked but I like the embeddedOnly best in order to avoid a dummy key on every FK class! Bryce, I no longer get the error above...I just added embeddedOnly=true to the PersistanceCapable tag in BookFk class. You're right, I could use the collection technique on the FKs but I wonder the pros/cons of such collections on what could be very large collections. For example, say Baylor with 25,000 members? Guess its a matter of using owned for small Sets versus unowned for large Sets of data. Regardless, your FK pattern will save a whole lot of code management!!! Any further feedback welcome...I'll continue testing! On Nov 4, 12:12 pm, datanucleus andy_jeffer...@yahoo.com wrote: Needs a PK either way. Pick a field, any field. Or just set embeddedOnly as true ... if you really never want to persist one of those in its own right- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message 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] Re: frame/object control with login
Hi, Framing the login page is strongly discouraged, and may in fact be contrary to the TOS. The only way for the user to determine that a login page for a Google account is legitimate is to check if it's being served off the google.com domain, and this is not possible inside a frame. -Nick Johnson On Mon, Nov 2, 2009 at 10:36 PM, reyelts reye...@gmail.com wrote: I apologize if I'm posting to the wrong place, I don't know if this is a basic HTML question, a Python question, a GAE question, or some combination of the set... Since we can't have much impact on the use login window for Google App Engine (ie to change the language or add an image), I'm looking at embedding the login page, like so: from google.appengine.extimport webapp from google.appengine.apiimport users class main(webapp.RequestHandler): def get(self): user = users.get_current_user() if user == None: self.response.out.write('html\nbody\n') self.response.out.write('pMy intro text/p\n') self.response.out.write('hr\n') self.response.out.write('object\n') self.response.out.write(' data=' + users.create_login_url (self.request.uri) + '\n') self.response.out.write(' type=text/html\n') self.response.out.write(' width=100% height=50%\n') self.response.out.write('/object') self.response.out.write('hr\n') self.response.out.write('/body\n/html\n') else: self.response.out.write('html\nbody\n') self.response.out.write('p' + user.nickname() + 'is logged in!/p\n') self.response.out.write('/body\n/html\n') This works fine: I get My intro text at the top of the window followed by a pane with the login. However, when I login, the result (user is logged in) is written to the pane where the login occurred, vs. replacing the whole window. I tried this with the older iframe, and get the same result. Is there a way to re-take over the complete window (ie make the frame I created go away) on the redirect? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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: Permission to view, which way is more efficient?
Hi Lynge, Storing a List of keys of users who may view a profile on the profile's entity is probably the best way to do this. -Nick Johnson On Tue, Nov 3, 2009 at 12:54 AM, Lynge como...@gmail.com wrote: Hi The app I am about to build is going to have some kind of profile page for each user. The user will then be able to select other users that is able to view his/her profile. (Like facebook, I guess) My question is, how should I store these permissions? Each user will most likely be giving permission to under 20 other users. Solution #1: Have one model looking something like this: viewer =user.id can_view = user.id And then simply look there to see if one user can view the other users profile. Solution #2: Since it is most likely be less than 20 users per user, then maybe one could just store it as CSV or a tuple, or something along with the users profile. I am thinking this wont be good for the (freakish) users that will have 200 users with permission, but would it be faster that solution #1? As that first model would eventually be huge, but does that matter on GAE? This is my first app, so I am still thinking like I am developing for en RDBM backend so that is why I am asking here. So to recap. 1st solution is more elegant in term of scaling permissions per user, but creates a huge datapile. The other solution solves this, but creates problems for the few users that will have more than normal amount of permitted friends Of course if you have an even better solution, then by all means, share it :) Many thanks in advance. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Data Size Differs in Stats and Quota Details
Hi Pavel, The stats don't include indexes - the difference in size is the overhead from your (automatic and composite) indexes. -Nick Johnson On Sun, Nov 1, 2009 at 11:14 AM, Pavel Kaplin pavel.kap...@gmail.comwrote: Datastore statistics says that Size of all entities is 18 Mbytes, however Quota Details shows 0.20 GBytes, which is ten times bigger. Where's the truth and why these values differ from each other? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Data Size Differs in Stats and Quota Details
Hi Nick, We have exactly the same problem with our GAE application (webwinewatch), but the ratio is even higher around 15. It's probably related to the way we try to manage full-text indexes via multi-value properties. Will the future native full-text indexes (http://code.google.com/p/ googleappengine/issues/detail?id=217 is started) take as much space as our current multi-value property solution ? Thanx for you help. François On 4 nov, 10:03, Nick Johnson (Google) nick.john...@google.com wrote: Hi Pavel, The stats don't include indexes - the difference in size is the overhead from your (automatic and composite) indexes. -Nick Johnson On Sun, Nov 1, 2009 at 11:14 AM, Pavel Kaplin pavel.kap...@gmail.comwrote: Datastore statistics says that Size of all entities is 18 Mbytes, however Quota Details shows 0.20 GBytes, which is ten times bigger. Where's the truth and why these values differ from each other? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Can't verify App Engine Account as my Phone number is already verified
Hi, If you are having trouble with SMS verification, or want an additional account activated, please fill out the following form: http://appengine.google.com/waitlist/sms_issues (This is from the following FAQ http://code.google.com/appengine/kb/sms .html#error ) Once you fill out this form, you should receive access within a day or two. Happy coding, Nick Johnson On Fri, Oct 30, 2009 at 10:04 PM, Damien dam...@echwa.com wrote: Is there a way around this please as I would like to use App Engine but can not get past the verification check and the message that I get on-screen says that it can not verify my mobile number as it has already done so. Damien -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: XMPP Requests
Hi Kevin, At the moment, App Engine XMPP bots can only receive XMPP messages of types 'normal' and 'chat'. -Nick Johnson On Fri, Oct 30, 2009 at 3:23 PM, kevinalle kevina...@gmail.com wrote: Hi. I am developing an app that uses the XMPP handler to make a chat bot.. my question is: is it possible to write an iqHandler to handle other type of requests? i want my bot to have a profile. and to do that i need to answer to an xmpp request that looks like: iq type='get' from='b...@shakespeare.lit/globe' to='ham...@denmark.lit' id='disco1' query xmlns='http://jabber.org/protocol/disco#info'/ /iq can i write a handler for this type of request? thanks! Kevin -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Seeking any Good Opinions / Design Pattern Input
On Nov 3, 9:06 pm, nolybab thardin...@gmail.com wrote: For the most part, I don't need/want to be able to query within the data, but i do need to query by date to get entries. For instance, assume I am showing a google visualization for Fights Won plotted over the last 30 days. Therefore, all I would need to be able to do is to query all mwProfile objects for the past 30 days and return ALL the data. A query can only return 1000 entities. You could pre-calculate the fights won/lost data every time a new profile is uploaded. i.e. save the profile, then retrieve a WinLoss30Day entity, snip the 31st days data from the json (or whatever) if the day has rolled over, append the new win/loss data to the end, save it back. Return the json blob on query. If there's likely to be = 1 upload a second (everyone updates at 12 after a hard day's fragging) you may run into the limit on concurrent updates to a single entity. You could try pushing the win/loss calculation into a task queue with concurrency 1. class mwProfile(db.Model): title=db.StringProperty() name=db.StringProperty() charclass=db.StringProperty() level=db.IntegerProperty() fb_sig_id=db.StringProperty() date=db.DateTimeProperty(auto_now_add=True) page=db.TextProperty(); 7 propertires, 6 indexes (x2, ascending and descending). If you are never going to query by eg. fb_sig_id, then you can add indexed=False to the property. This will make saving the entity faster, it will use less api_cpu time, and use less db space. try: thisProfile=self ... retcode=1 except: logging.error('...') Don't use a bare 'except'. See here: http://code.google.com/p/googleappengine/issues/detail?id=1409#c8 --~--~-~--~~~---~--~~ 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] AppEngine Appears to be Down, Hard
My app started returning 500 errors a few minutes ago. I checked my logs and saw tons of datastore timeout errors. Now, I can't even get into the web console anymore. --~--~-~--~~~---~--~~ 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: AppEngine Appears to be Down, Hard
Okay, it's working again. What was that all about? On Nov 4, 7:13 am, pdub pwj...@gmail.com wrote: My app started returning 500 errors a few minutes ago. I checked my logs and saw tons of datastore timeout errors. Now, I can't even get into the web console anymore. --~--~-~--~~~---~--~~ 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 Index partitioning
On Nov 3, 11:35 pm, Eli eli.jo...@gmail.com wrote: (This is just the first usage example that comes to mind. This row naming method could be used for all sorts of set intersection stuff, and would cut down on insert times due to the fact that it should partition out the indexes when dealing with humongous datasets). I don't think what your proposing is a physical optimisation because indexes are not discrete objects as they are in a traditional relational database: http://code.google.com/appengine/articles/index_building.html#Index%20Layout Forgetting about physical optimisation and thinking only about querying slices of the data, how about something like this: class Stats(db.Model): number = db.IntegerProperty() date = db.DateTimeProperty() dimensions = db.StringListProperty() e = Stats(number=42, date=datetime.datetime('1605-11-05'), dimensions=['1600', 'November', 'Q4', 'd5', 'Saturday']) Then you could query by date, as in your example, by simply querying against the date property. But you could also query for all numbers for any Saturday in the 4th quarter of any year: q4Saturdays = Stats.all().filter('dimensions =', 'Q4').filter ('dimensions =', 'Saturday') Anyway, this was just a side thought I had while wondering what the point of Expando was.. since it's so unstructured.. I couldn't imagine why someone would want such an undependable datasource.. http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: I am unable to update my cron.yaml
the command is update_cron, not update-cron, although a normal appcfg.py update should work too. On Nov 3, 3:57 pm, SK shanmu...@gmail.com wrote: Hi, I wrote the following cron.yaml file, but it is not being updated to the server. I have updated the folder with appcfg.py update foldername. I have also tried appcfg.py update-cron, but it has failed by saying 'unknown action'. Could some one please help me with this. cron.yaml: cron: - description: update the datastrore url: /newPuddle schedule: every 1 min app.yaml: application: appid version: 1 runtime: python api_version: 1 handlers: - url: /favicon.ico static_files: favicon.ico upload: favicon.ico - url: /.* script: pu.py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Possible saving of metadata space by having short model class name?
Since every full entity key includes the name of its model class (and its parents'), is the following scheme preferable in term of metadata space usage? Instead of class MyModelClassWithLongName(db.Model): ... I'd use: class MWLN(db.Model): ... MyModelWithLongName = MWLN aht --~--~-~--~~~---~--~~ 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: AppEngine Appears to be Down, Hard
Mine is down right now. I thought that i messed up something when rolling back update. On Nov 4, 2:17 pm, pdub pwj...@gmail.com wrote: Okay, it's working again. What was that all about? On Nov 4, 7:13 am, pdub pwj...@gmail.com wrote: My app started returning 500 errors a few minutes ago. I checked my logs and saw tons of datastore timeout errors. Now, I can't even get into the web console anymore. --~--~-~--~~~---~--~~ 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: Possible saving of metadata space by having short model class name?
Yes, that helps. Mainly, you want to make sure the keys for your most frequently used entities are the shortest (see Huffman Encoding) if you will have a large datastore (though, this may be good practice in general). It is discussed in the Building Scalable Web Apps IO talk from this year: Building Scalable, Complex Apps on App Engine http://www.youtube.com/watch?v=AgaL6NGpkB8 Anyway, I highly recommend everyone developing apps on Appengine watch any IO talks from 2008 or 2009 having to do with GAE or Bigtable or other stuff. Google has gone out of its way to explain to people how to make their applications radical.. or fast or scalable or whatever word pleases you. On Nov 4, 9:55 am, Anh Hai Trinh anh.hai.tr...@gmail.com wrote: Since every full entity key includes the name of its model class (and its parents'), is the following scheme preferable in term of metadata space usage? Instead of class MyModelClassWithLongName(db.Model): ... I'd use: class MWLN(db.Model): ... MyModelWithLongName = MWLN aht --~--~-~--~~~---~--~~ 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] HTTP Basic authentication
I think I read in some thread on this forum that HTTP Basic Authentication is possible somehow with GAE. Is this correct? If yes, how to do that? I have a very simple webservice backend for an iPhone app which I would like to protect from unintended access, so HTTP Basic Authentication would be by far the easiest solution... Thanks in advance for any pointers, Benjamin --~--~-~--~~~---~--~~ 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: Possible saving of metadata space by having short model class name?
And alternative would be to override 'kind'. Just make sure you remember when doing GQL queries in the console: class MyModelClassWithLongName(db.Model): def kind(self): return 'MWLN' On Nov 4, 6:55 am, Anh Hai Trinh anh.hai.tr...@gmail.com wrote: Since every full entity key includes the name of its model class (and its parents'), is the following scheme preferable in term of metadata space usage? Instead of class MyModelClassWithLongName(db.Model): ... I'd use: class MWLN(db.Model): ... MyModelWithLongName = MWLN aht --~--~-~--~~~---~--~~ 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] My app died
After some minor problems that happened with GAE my app throws error Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 507, in __call__ handler.get(*groups) File /base/data/home/apps/contacts-exporter/1-01a. 337517615887767102/contacts-list.py, line 197, in get self.response.out.write(template.render(path, template_values)) File /base/python_lib/versions/1/google/appengine/ext/webapp/ template.py, line 80, in render t = load(template_path, debug) File /base/python_lib/versions/1/google/appengine/ext/webapp/ template.py, line 108, in load template = django.template.loader.get_template(file_name) File /base/python_lib/versions/third_party/django-0.96/django/ template/loader.py, line 80, in get_template template = get_template_from_string(source, origin, template_name) File /base/python_lib/versions/third_party/django-0.96/django/ template/loader.py, line 88, in get_template_from_string return Template(source, origin, name) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 158, in __init__ self.nodelist = compile_string(template_string, origin) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 174, in compile_string return parser.parse() File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 273, in parse compiled_result = compile_func(self, token) File /base/python_lib/versions/third_party/django-0.96/django/ template/defaulttags.py, line 660, in do_if boolvars.append((False, parser.compile_filter(boolpair))) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 338, in compile_filter return FilterExpression(token, self) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 558, in __init__ raise TemplateSyntaxError, Could not parse the remainder: %s % token[upto:] TemplateSyntaxError: Could not parse the remainder: () Code is same, what could be a problem? This is my MainPage class. class MainPage(webapp.RequestHandler): def get(self): user = users.get_current_user() if user: text = 'Hello, ' + user.nickname() SyncPrivateEntity(user.email()) ## Loading lists from datastore listc = getContacts(user, prvEmailsList) sharedlist = getContacts() template_values = {'text' : text, 'listc' : listc, 'sharedlist' : sharedlist} else: self.redirect(users.create_login_url(self.request.uri)) path = os.path.join(os.path.dirname(__file__), 'index.html') self.response.out.write(template.render(path, template_values)) --~--~-~--~~~---~--~~ 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: My app died
Nevermind, my fault. Disregard this post please. On Nov 4, 5:15 pm, Michał Klich klich.mic...@gmail.com wrote: After some minor problems that happened with GAE my app throws error Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 507, in __call__ handler.get(*groups) File /base/data/home/apps/contacts-exporter/1-01a. 337517615887767102/contacts-list.py, line 197, in get self.response.out.write(template.render(path, template_values)) File /base/python_lib/versions/1/google/appengine/ext/webapp/ template.py, line 80, in render t = load(template_path, debug) File /base/python_lib/versions/1/google/appengine/ext/webapp/ template.py, line 108, in load template = django.template.loader.get_template(file_name) File /base/python_lib/versions/third_party/django-0.96/django/ template/loader.py, line 80, in get_template template = get_template_from_string(source, origin, template_name) File /base/python_lib/versions/third_party/django-0.96/django/ template/loader.py, line 88, in get_template_from_string return Template(source, origin, name) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 158, in __init__ self.nodelist = compile_string(template_string, origin) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 174, in compile_string return parser.parse() File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 273, in parse compiled_result = compile_func(self, token) File /base/python_lib/versions/third_party/django-0.96/django/ template/defaulttags.py, line 660, in do_if boolvars.append((False, parser.compile_filter(boolpair))) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 338, in compile_filter return FilterExpression(token, self) File /base/python_lib/versions/third_party/django-0.96/django/ template/__init__.py, line 558, in __init__ raise TemplateSyntaxError, Could not parse the remainder: %s % token[upto:] TemplateSyntaxError: Could not parse the remainder: () Code is same, what could be a problem? This is my MainPage class. class MainPage(webapp.RequestHandler): def get(self): user = users.get_current_user() if user: text = 'Hello, ' + user.nickname() SyncPrivateEntity(user.email()) ## Loading lists from datastore listc = getContacts(user, prvEmailsList) sharedlist = getContacts() template_values = {'text' : text, 'listc' : listc, 'sharedlist' : sharedlist} else: self.redirect(users.create_login_url(self.request.uri)) path = os.path.join(os.path.dirname(__file__), 'index.html') self.response.out.write(template.render(path, template_values)) --~--~-~--~~~---~--~~ 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 can i query the system time?
How can i query like this JDO select sysdate from dual ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: frame/object control with login
Nick, I think you're overestimating the proverbial average user. In fact, in user testing our own application, users are almost unanimously tripped up when they are redirected to Google to login. We frequently *heard* the user say this: Okay, now I click here to login and... oh... why am I asked to login to Google? I'm just pointing this out so that we don't all get stuck in a belief set that may not be accurate. Personally, I think Google needs to come up with an API (whether it be javascript or otherwise) for AppEngine apps to authenticate users more naturally. It's very jarring and, dare I say, short sited to force all users of all apps away from an application to an unbranded login screen. - ryan. On Wed, Nov 4, 2009 at 2:40 AM, Nick Johnson (Google) nick.john...@google.com wrote: Hi, Framing the login page is strongly discouraged, and may in fact be contrary to the TOS. The only way for the user to determine that a login page for a Google account is legitimate is to check if it's being served off the google.com domain, and this is not possible inside a frame. -Nick Johnson On Mon, Nov 2, 2009 at 10:36 PM, reyelts reye...@gmail.com wrote: I apologize if I'm posting to the wrong place, I don't know if this is a basic HTML question, a Python question, a GAE question, or some combination of the set... Since we can't have much impact on the use login window for Google App Engine (ie to change the language or add an image), I'm looking at embedding the login page, like so: from google.appengine.extimport webapp from google.appengine.apiimport users class main(webapp.RequestHandler): def get(self): user = users.get_current_user() if user == None: self.response.out.write('html\nbody\n') self.response.out.write('pMy intro text/p\n') self.response.out.write('hr\n') self.response.out.write('object\n') self.response.out.write(' data=' + users.create_login_url (self.request.uri) + '\n') self.response.out.write(' type=text/html\n') self.response.out.write(' width=100% height=50%\n') self.response.out.write('/object') self.response.out.write('hr\n') self.response.out.write('/body\n/html\n') else: self.response.out.write('html\nbody\n') self.response.out.write('p' + user.nickname() + 'is logged in!/p\n') self.response.out.write('/body\n/html\n') This works fine: I get My intro text at the top of the window followed by a pane with the login. However, when I login, the result (user is logged in) is written to the pane where the login occurred, vs. replacing the whole window. I tried this with the older iframe, and get the same result. Is there a way to re-take over the complete window (ie make the frame I created go away) on the redirect? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ 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] Snow Leopard
I'm running Snow Leopard and therefore by default Python 2.6. I know that I need Python 2.5. I'm running the first Hello, World example, and trying the following at the Unix prompt in Terminal: %python2.5 /usr/local/bin/dev_appserver.py helloworld/ and this is what I get: Traceback (most recent call last): File /usr/local/bin/dev_appserver.py, line 60, in module run_file(__file__, globals()) File /usr/local/bin/dev_appserver.py, line 57, in run_file execfile(script_path, globals_) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/dev_appserver_main.py, line 65, in module from google.appengine.tools import os_compat ImportError: cannot import name os_compat What am I missing? 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] Specifying App Engine Server Locations
Hi - We're working on a project that requires we can specify only servers located within the European Union. Is this possible with Google App Engine? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Datastore writes are temporarily unavailable
Hi Jeff, Any update on the expected remaining time past 6:00? Thanks On Nov 3, 6:10 pm, Jeff S (Google) j...@google.com wrote: Hi all, Apologies for the delay, the status site has been updated to mention this planned maintenance. Thank you, Jeff P.S. As noted in the following blog post, we also plan maintenance on December 1st. http://googleappengine.blogspot.com/2009/09/migration-to-better-datas... On Nov 3, 5:42 pm, AS stripe...@gmail.com wrote: Yes. No fix still, and no good status On Nov 3, 8:31 pm, RollingCircle e.j.hard...@gmail.com wrote: Datastore writes are temporarily unavailable. Please seehttp://code.google.com/status/appengineformoreinformation.; 11-03 05:21PM 32.889 , application metutil. Hordes of the blighters. The status page was apparently repeating some mantra about everything being OK, despite everything being clearly Pete Tong on the App Engine datastore front. Anyone else? --~--~-~--~~~---~--~~ 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: After the scheduled maintenance, can no longer deploy app
I'm getting the same error. It just started about an hour ago. --~--~-~--~~~---~--~~ 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 Index partitioning
Stephen, My thinking on this is.. Say you have a Month Column.. and it has the default lexically sorted asc,dsc indexes on it. My assumption is, when you insert a new row with a Month value defined, the entire index will have to be updated (no matter how many shards or tablets it's broken up into). This is supported by this quote from the Index Building document you linked to: When an entity is created or deleted, all of the index rows for that entity must be updated. So.. when you roll around to the June 2010 time period and start inserting rows for that.. if you have a generic Month column, all the indexes for every month for every year will have to be updated. Now, if you had them partitioned out in the way I described, presumably, you would just need to rebuild the indexes for entries with a June column. Granted this isn't most optimal, why not just go all out and do June2009, June2010 columns (and still have the y2009,y2010 columns too for quickly grabbing yearly data).. that way.. once the month of the year is past, those indexes would never need to be rebuilt again.. yet, since you were using the Expando model, you wouldn't need seperately defined Models for each MonthYear combo. Mainly, I see this method as a way of helping BigTable out in understanding how to partition out my data... Does this make sense? I think your ListProperty idea sounds efficient to implement, but I think it would run into that index updating issue once you got into the 100s of millions and billions of rows.. every new insert would require the dimensions and date columns to be rebuilt. Now, these are my assumptions.. which are fraught with peril... so, I'm trying to post it here to see if anyone else out there is of a mind to think it through with me. Thanks for any input. On Nov 4, 9:10 am, Stephen sdea...@gmail.com wrote: On Nov 3, 11:35 pm, Eli eli.jo...@gmail.com wrote: (This is just the first usage example that comes to mind. This row naming method could be used for all sorts of set intersection stuff, and would cut down on insert times due to the fact that it should partition out the indexes when dealing with humongous datasets). I don't think what your proposing is a physical optimisation because indexes are not discrete objects as they are in a traditional relational database: http://code.google.com/appengine/articles/index_building.html#Index%2... Forgetting about physical optimisation and thinking only about querying slices of the data, how about something like this: class Stats(db.Model): number = db.IntegerProperty() date = db.DateTimeProperty() dimensions = db.StringListProperty() e = Stats(number=42, date=datetime.datetime('1605-11-05'), dimensions=['1600', 'November', 'Q4', 'd5', 'Saturday']) Then you could query by date, as in your example, by simply querying against the date property. But you could also query for all numbers for any Saturday in the 4th quarter of any year: q4Saturdays = Stats.all().filter('dimensions =', 'Q4').filter ('dimensions =', 'Saturday') Anyway, this was just a side thought I had while wondering what the point of Expando was.. since it's so unstructured.. I couldn't imagine why someone would want such an undependable datasource.. http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html --~--~-~--~~~---~--~~ 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: Snow Leopard
You have to switch to 2.5. Easy to do. Open a terminal and throw this command to the wind: defaults write com.apple.versioner.python Version 2.5 Enjoy! - ryan. On Wed, Nov 4, 2009 at 8:37 AM, Glenn glenn.down...@gmail.com wrote: I'm running Snow Leopard and therefore by default Python 2.6. I know that I need Python 2.5. I'm running the first Hello, World example, and trying the following at the Unix prompt in Terminal: %python2.5 /usr/local/bin/dev_appserver.py helloworld/ and this is what I get: Traceback (most recent call last): File /usr/local/bin/dev_appserver.py, line 60, in module run_file(__file__, globals()) File /usr/local/bin/dev_appserver.py, line 57, in run_file execfile(script_path, globals_) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/dev_appserver_main.py, line 65, in module from google.appengine.tools import os_compat ImportError: cannot import name os_compat What am I missing? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: frame/object control with login
+1. We've abandoned using google's user authentication for exactly this reason. It confused the hell out of all our users. When we started using google apps for our email, it started confusing the hell out of us. -Joshua On Nov 4, 2009, at 1:44 PM, ryan baldwin wrote: Nick, I think you're overestimating the proverbial average user. In fact, in user testing our own application, users are almost unanimously tripped up when they are redirected to Google to login. We frequently heard the user say this: Okay, now I click here to login and... oh... why am I asked to login to Google? I'm just pointing this out so that we don't all get stuck in a belief set that may not be accurate. Personally, I think Google needs to come up with an API (whether it be javascript or otherwise) for AppEngine apps to authenticate users more naturally. It's very jarring and, dare I say, short sited to force all users of all apps away from an application to an unbranded login screen. - ryan. On Wed, Nov 4, 2009 at 2:40 AM, Nick Johnson (Google) nick.john...@google.com wrote: Hi, Framing the login page is strongly discouraged, and may in fact be contrary to the TOS. The only way for the user to determine that a login page for a Google account is legitimate is to check if it's being served off the google.com domain, and this is not possible inside a frame. -Nick Johnson On Mon, Nov 2, 2009 at 10:36 PM, reyelts reye...@gmail.com wrote: I apologize if I'm posting to the wrong place, I don't know if this is a basic HTML question, a Python question, a GAE question, or some combination of the set... Since we can't have much impact on the use login window for Google App Engine (ie to change the language or add an image), I'm looking at embedding the login page, like so: from google.appengine.extimport webapp from google.appengine.apiimport users class main(webapp.RequestHandler): def get(self): user = users.get_current_user() if user == None: self.response.out.write('html\nbody\n') self.response.out.write('pMy intro text/p\n') self.response.out.write('hr\n') self.response.out.write('object\n') self.response.out.write(' data=' + users.create_login_url (self.request.uri) + '\n') self.response.out.write(' type=text/html\n') self.response.out.write(' width=100% height=50%\n') self.response.out.write('/object') self.response.out.write('hr\n') self.response.out.write('/body\n/html\n') else: self.response.out.write('html\nbody\n') self.response.out.write('p' + user.nickname() + 'is logged in!/p\n') self.response.out.write('/body\n/html\n') This works fine: I get My intro text at the top of the window followed by a pane with the login. However, when I login, the result (user is logged in) is written to the pane where the login occurred, vs. replacing the whole window. I tried this with the older iframe, and get the same result. Is there a way to re-take over the complete window (ie make the frame I created go away) on the redirect? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: frame/object control with login
I admit to not having been through all of the Java documentation on http://code.google.com/appengine/docs/. I have, however, been through the Python stuff extensively and never came across anything that suggests framing the login page is strongly discouraged. In fact, some information on recommended HTML usage would be a very welcome addition to the Google App Engine Docs. I also was unable to find anything to suggest there was a problem with the TOS. I'm not modifying anything from Google nor am I usurping or reverse engineering or bypassing any Google interfaces. In fact, I am trying desperately to use a Google interface as-is and in such a manner as is not confusing to my user population. The frame/object *is* being served from the google.com domain. I have no desire to nor have I made any attempt to bypass that. Depending on the browser, there are multiple ways of verifying the source of the frame. For example, IE's Properties and Chrome's Inspect Element clearly show the source address. Finally, if you have alternatives to suggest, I welcome them. I'm just trying to do what's best for my users while staying within the limits of the tools you provide. As evidenced by other contributors to this thread, you can see that I am not alone in this endeavor. On Nov 4, 1:40 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi, Framing the login page is strongly discouraged, and may in fact be contrary to the TOS. The only way for the user to determine that a login page for a Google account is legitimate is to check if it's being served off the google.com domain, and this is not possible inside a frame. -Nick Johnson On Mon, Nov 2, 2009 at 10:36 PM, reyelts reye...@gmail.com wrote: I apologize if I'm posting to the wrong place, I don't know if this is a basic HTML question, a Python question, a GAE question, or some combination of the set... Since we can't have much impact on the use login window for Google App Engine (ie to change the language or add an image), I'm looking at embedding the login page, like so: from google.appengine.ext import webapp from google.appengine.api import users class main(webapp.RequestHandler): def get(self): user = users.get_current_user() if user == None: self.response.out.write('html\nbody\n') self.response.out.write('pMy intro text/p\n') self.response.out.write('hr\n') self.response.out.write('object\n') self.response.out.write(' data=' + users.create_login_url (self.request.uri) + '\n') self.response.out.write(' type=text/html\n') self.response.out.write(' width=100% height=50%\n') self.response.out.write('/object') self.response.out.write('hr\n') self.response.out.write('/body\n/html\n') else: self.response.out.write('html\nbody\n') self.response.out.write('p' + user.nickname() + 'is logged in!/p\n') self.response.out.write('/body\n/html\n') This works fine: I get My intro text at the top of the window followed by a pane with the login. However, when I login, the result (user is logged in) is written to the pane where the login occurred, vs. replacing the whole window. I tried this with the older iframe, and get the same result. Is there a way to re-take over the complete window (ie make the frame I created go away) on the redirect? -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: frame/object control with login
I did find a rather ugly workaround. If imbed the login as an iframe (not an object), I can use a bit of Javascript to reload the parent page and make the iframe go away. To do this, I have the the login redirect generates the following: self.response.out.write('html\n') self.response.out.write('head\n') self.response.out.write('script type=text/javascript\n') self.response.out.write('function test()\n') self.response.out.write('{\n') self.response.out.write(' if (self != parent) parent.window.location.reload();\n') self.response.out.write('}\n') self.response.out.write('/script\n') self.response.out.write('/head\n') self.response.out.write('body onload=test();\n') self.response.out.write('pLoading.../p\n') self.response.out.write('/body\n') self.response.out.write('/html\n') On the resulting reload, I can tell that someone is logged in (users.get_current_user()) and then proceed as normal. The same approach works fine for an object with Chrome and Firefox. But it does not work with IE for some reason. It seems the resulting frame (though we're using the object tag to generate it) isn't built with same parent-child relationship as is done under Chrome and Firefox. Consequently, with IE, the reload() only affects the frame, not the window. So, I do have a working solution if I'm willing to give up adhering to XHTML Strict. --~--~-~--~~~---~--~~ 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: Specifying App Engine Server Locations
No. On Nov 4, 11:07 am, Nick T n...@blasttheory.co.uk wrote: Hi - We're working on a project that requires we can specify only servers located within the European Union. Is this possible with Google App Engine? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: ClassNotFoundException: void
I got the same exception with JSF 2.0.1. The page showed once but when I tried to move forward with a button click I got the exception. I guess I'll go back to 1.2 for the time being. /napu On Nov 1, 2:28 am, Bryan Harper brnh...@gmail.com wrote: I have been playing with a fairly simple app locally with not problems. In my workspace I'm using google sdk 1.2.6 plugin for eclipse, jsf 2.0. The app has 2 main functions. 1 Persist user object, Delete user object. The persist seems to work, but the delete will sometimes throws the exception below. I know I didn't provide a lot of info about the rest of the app, but I'm really not sure where to start since it works fine locally. Thanks in advance for any help. public void persistUserRecord(User u)throws Exception{ PersistenceManager pm = PMF.get().getPersistenceManager(); pm.makePersistentAll(u); pm.close(); } public void deleteUserRecord(User u)throws Exception{ PersistenceManager pm = PMF.get().getPersistenceManager(); pm.deletePersistent(pm.getObjectById(User.class, u.getId())); pm.close(); } EXCEPTION javax.servlet.ServletException: java.lang.RuntimeException: java.lang.ClassNotFoundException: void at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:240) ... --~--~-~--~~~---~--~~ 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 Index partitioning
On Nov 4, 6:48 pm, Eli eli.jo...@gmail.com wrote: Stephen, My thinking on this is.. Say you have a Month Column.. and it has the default lexically sorted asc,dsc indexes on it. My assumption is, when you insert a new row with a Month value defined, the entire index will have to be updated (no matter how many shards or tablets it's broken up into). No. One new entry will be added to the ascending index bigtable, and one new row will be added to the descending index bigtable. This is supported by this quote from the Index Building document you linked to: When an entity is created or deleted, all of the index rows for that entity must be updated. - By 'entity' they mean a single instance of an etity, i.e. a row, not a 'type'. - And by 'all indexes' they mean index entries for all attributes of that single entity, i.e. an entity with two integer attributes would have four index entries created, 1 asc and 1 desc for each attribute. They are just trying to draw a distinction between when an entity which is created or deleted, and when it is updated, which they cover in the next sentence: However, when an existing entity is updated, the datastore determines the delta, i.e. the properties that were changed, and only updates the index rows that include those properties. I guess this optimisation is worth mentioning in the docs because you can't do an SQL-like: update Entity set attr_1 = 42 where key = 99. ...you can only overwrite all attributes, and so you may expect this to trigger index updates for all attributes. But no, apparently this is optimised out. --~--~-~--~~~---~--~~ 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 Requests
ok.. and is it possible to give the bot a profile? and a profile picture? thanks! On Wed, Nov 4, 2009 at 7:52 AM, Nick Johnson (Google) nick.john...@google.com wrote: Hi Kevin, At the moment, App Engine XMPP bots can only receive XMPP messages of types 'normal' and 'chat'. -Nick Johnson On Fri, Oct 30, 2009 at 3:23 PM, kevinalle kevina...@gmail.com wrote: Hi. I am developing an app that uses the XMPP handler to make a chat bot.. my question is: is it possible to write an iqHandler to handle other type of requests? i want my bot to have a profile. and to do that i need to answer to an xmpp request that looks like: iq type='get' from='b...@shakespeare.lit/globe' to='ham...@denmark.lit' id='disco1' query xmlns='http://jabber.org/protocol/disco#info'/http://jabber.org/protocol/disco#info%27/ /iq can i write a handler for this type of request? thanks! Kevin -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] java mail unauthorized user
I'm trying to send an email from a servlet and got this exception. avax.servlet.ServletContext log: javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Illegal Arguments (java.lang.IllegalArgumentException: Unauthorized Sender: Unauthorized sender)) my code Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); String msgBody = e.getMessage() == null ? e.toString() : e.getMessage (); try { Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress(s...@myappstop-domain)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress (s...@recipient.com)); msg.setSubject(some subject); msg.setText(msgBody); Transport.send(msg); this.getServletContext().log(Email sent...); } catch (Exception ex) { this.getServletContext().log(ex.toString()); } Any clue what should be an authorized user ??? --~--~-~--~~~---~--~~ 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 Index partitioning
I want to get our wordology clear (let me know where I am going wrong): A Model in AppEngine is equivalent to a Table in SQL (or, if you like, it is equivalent to the Table Schema). An Entity in a Model is equivalent to a Row in a Table. (so.. a Model is potentially a collection of Entities in the same way a Table is potentially a collection of Rows) Properties (of the Entities) in a Model are equivalent to Columns (of the Rows) in a Table. Maybe the confusion comes in with the wordage: all of the index rows for that entity must be updated What is an index row? I am assuming that an index row for a certain property is a row entry in BigTable that contains all index information for all Entities in the given Model that have that property defined. So, there would be an index row for the Month Property of your Stats Model defined above. And, when an Entity was inserted or Deleted for this Stats Model, the index row for Month would have to be rebuilt. I am assuming they can't do a diff.. because you have to grow the index.. there is a new Entity. If later on you updated a few properties of this newly inserted entity, then the datastore would know which properties were changed, and only update the indexes for the changed properties... since the index space has already been allocated for this new Entity in the appropriate Index Rows. I understand that I can be completely wrong on this.. but let me know where the flaw in my understanding of Entities, Models and Indexes might be. Thanks. On Nov 4, 4:08 pm, Stephen sdea...@gmail.com wrote: On Nov 4, 6:48 pm, Eli eli.jo...@gmail.com wrote: Stephen, My thinking on this is.. Say you have a Month Column.. and it has the default lexically sorted asc,dsc indexes on it. My assumption is, when you insert a new row with a Month value defined, the entire index will have to be updated (no matter how many shards or tablets it's broken up into). No. One new entry will be added to the ascending index bigtable, and one new row will be added to the descending index bigtable. This is supported by this quote from the Index Building document you linked to: When an entity is created or deleted, all of the index rows for that entity must be updated. - By 'entity' they mean a single instance of an etity, i.e. a row, not a 'type'. - And by 'all indexes' they mean index entries for all attributes of that single entity, i.e. an entity with two integer attributes would have four index entries created, 1 asc and 1 desc for each attribute. They are just trying to draw a distinction between when an entity which is created or deleted, and when it is updated, which they cover in the next sentence: However, when an existing entity is updated, the datastore determines the delta, i.e. the properties that were changed, and only updates the index rows that include those properties. I guess this optimisation is worth mentioning in the docs because you can't do an SQL-like: update Entity set attr_1 = 42 where key = 99. ...you can only overwrite all attributes, and so you may expect this to trigger index updates for all attributes. But no, apparently this is optimised out. --~--~-~--~~~---~--~~ 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: Create and adding Task objects is expensive
A feature we have in the pipeline is batch inserting of tasks, i.e. inserting multiple tasks with a single API call. This will significantly increase the number of tasks that can be inserted in the context of a single request. On Nov 3, 1:07 pm, Eli eli.jo...@gmail.com wrote: Modify your task to allow emails to be sent out in batches 10 or 100 or 1000 users at a time.. This seems to be the most common approach to all bottlenecks.. inserting to the DB.. etc. On Nov 2, 8:55 pm, Greg Tracy greg.tr...@att.net wrote: I've found that creating and adding Task objects is quite expensive. Consider the following... for u in users: task = Task(url='/emailqueue', params= {'email':u.email,'body':body}) task.add('emailqueue') Each user in this loop adds another 34.5 cpu usages. It is by far the most expensive operation I have. Right now, I don't think it will scale much higher than 300 loop iterations before I start running into timeouts. Is there a better way to do 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] Re: Specifying App Engine Server Locations
On Nov 4, 4:07 pm, Nick T n...@blasttheory.co.uk wrote: Hi - We're working on a project that requires we can specify only servers located within the European Union. Is this possible with Google App Engine? Please star this issue: http://code.google.com/p/googleappengine/issues/detail?id=193 --~--~-~--~~~---~--~~ 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: java mail unauthorized user
as FROM use e-mail you are using to login to your GAE account On Nov 4, 2009, at 16:37 , rasensio wrote: I'm trying to send an email from a servlet and got this exception. avax.servlet.ServletContext log: javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Illegal Arguments (java.lang.IllegalArgumentException: Unauthorized Sender: Unauthorized sender)) my code Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); String msgBody = e.getMessage() == null ? e.toString() : e.getMessage (); try { Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress(s...@myappstop-domain)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress (s...@recipient.com)); msg.setSubject(some subject); msg.setText(msgBody); Transport.send(msg); this.getServletContext().log(Email sent...); } catch (Exception ex) { this.getServletContext().log(ex.toString()); } Any clue what should be an authorized user ??? --~--~-~--~~~---~--~~ 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: Specifying App Engine Server Locations
NO 2009/11/5 Stephen sdea...@gmail.com On Nov 4, 4:07 pm, Nick T n...@blasttheory.co.uk wrote: Hi - We're working on a project that requires we can specify only servers located within the European Union. Is this possible with Google App Engine? Please star this issue: http://code.google.com/p/googleappengine/issues/detail?id=193 -- gae-django-cms (GD-cms) a multi-user CMS running on GAE sample http://gae-django-cms.appspot.com/ projects http://code.google.com/p/gae-django-cms/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Expando and Index partitioning
On Nov 4, 10:20 pm, Eli eli.jo...@gmail.com wrote: I want to get our wordology clear (let me know where I am going wrong): A Model in AppEngine is equivalent to a Table in SQL (or, if you like, it is equivalent to the Table Schema). An Entity in a Model is equivalent to a Row in a Table. (so.. a Model is potentially a collection of Entities in the same way a Table is potentially a collection of Rows) Properties (of the Entities) in a Model are equivalent to Columns (of the Rows) in a Table. Maybe the confusion comes in with the wordage: all of the index rows for that entity must be updated What is an index row? I am assuming that an index row for a certain property is a row entry in BigTable that contains all index information for all Entities in the given Model that have that property defined. No, there is an single index row for each property of each entity. So, there would be an index row for the Month Property of your Stats Model defined above. Yes. And, when an Entity was inserted or Deleted for this Stats Model, the index row for Month would have to be rebuilt. No. The index rows are like the entity rows. Only the rows in the index which correspond to the properties for that particular entity need to be inserted/deleted. I understand that I can be completely wrong on this.. but let me know where the flaw in my understanding of Entities, Models and Indexes might be. I like to think of it something like this: create table BigTable ( key varchar primary key, properties blob ); All the properties are serialised (using Protocol Buffers) into the blob. This is how you can have entities of the same type with different properties. When you put() an entity, the db looks at the properties blob (because it understands the serialisation format) and if it finds eg. a single integer property, it inserts a row into the AscendingIndexBigTable, and another into the DescendingIndexBigTable. The indexes could look similar to the entity table, except imagine changing the key key to eli/E1/a1=42 for the a1 property. --~--~-~--~~~---~--~~ 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: import os
Jairo, You'll see DeadlineExceededError if your request takes too long to complete. It's described here: http://code.google.com/appengine/docs/python/runtime.html Is this reproducible in your development environment? What's likely happening is that some operation or series of operations prior or around this import are expensive and causing you to hit the time limit. Are you doing anything before this import? Ikai On Nov 3, 6:57 am, Jairo Vasquez Moreno jairo.vasq...@gmail.com wrote: Hi, Im getting a google.appengine.runtime.DeadlineExceededError error when I call importos. Is this an error? -- Jairo Vasquez Moreno Mentez Developerwww.mentez.com Medellin - Colombia --~--~-~--~~~---~--~~ 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 Index partitioning
Hmm, that's interesting. So, this suggests that Inserts take the same amount of time.. whether a Model has 100,000,000 Entities or 100 Entities(presuming the Model has no extra indexes defined and all Properties of the Model are required). Is that really true? If so, I guess it's good and bad. Though, it's a little annoying since it means I need to do more reading/watching Datastore info since my understanding is flawed when it comes to Index structure.. I was watching the App Engine Datastore Under the Covers presentation again.. and I think I understand your description of the Index Rows now: http://www.youtube.com/watch?v=tx5gdoNpcZM On Nov 4, 7:34 pm, Stephen sdea...@gmail.com wrote: On Nov 4, 10:20 pm, Eli eli.jo...@gmail.com wrote: I want to get our wordology clear (let me know where I am going wrong): A Model in AppEngine is equivalent to a Table in SQL (or, if you like, it is equivalent to the Table Schema). An Entity in a Model is equivalent to a Row in a Table. (so.. a Model is potentially a collection of Entities in the same way a Table is potentially a collection of Rows) Properties (of the Entities) in a Model are equivalent to Columns (of the Rows) in a Table. Maybe the confusion comes in with the wordage: all of the index rows for that entity must be updated What is an index row? I am assuming that an index row for a certain property is a row entry in BigTable that contains all index information for all Entities in the given Model that have that property defined. No, there is an single index row for each property of each entity. So, there would be an index row for the Month Property of your Stats Model defined above. Yes. And, when an Entity was inserted or Deleted for this Stats Model, the index row for Month would have to be rebuilt. No. The index rows are like the entity rows. Only the rows in the index which correspond to the properties for that particular entity need to be inserted/deleted. I understand that I can be completely wrong on this.. but let me know where the flaw in my understanding of Entities, Models and Indexes might be. I like to think of it something like this: create table BigTable ( key varchar primary key, properties blob ); All the properties are serialised (using Protocol Buffers) into the blob. This is how you can have entities of the same type with different properties. When you put() an entity, the db looks at the properties blob (because it understands the serialisation format) and if it finds eg. a single integer property, it inserts a row into the AscendingIndexBigTable, and another into the DescendingIndexBigTable. The indexes could look similar to the entity table, except imagine changing the key key to eli/E1/a1=42 for the a1 property. --~--~-~--~~~---~--~~ 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: Snow Leopard
Ryan, Thank you very much for the tip. I did as you suggested, and as evidence of it making the switch, when I invoke python, I see that it's now 2.5.4: % defaults write com.apple.versioner.python Version 2.5 % defaults read com.apple.versioner.python { Version = 2.5; } % python Python 2.5.4 (r254:67916, Jul 7 2009, 23:51:24) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type help, copyright, credits or license for more information. quit() However, when I run the AppEngine I still get the same result: % python /usr/local/bin/dev_appserver.py helloworld/ Traceback (most recent call last): File /usr/local/bin/dev_appserver.py, line 60, in module run_file(__file__, globals()) File /usr/local/bin/dev_appserver.py, line 57, in run_file execfile(script_path, globals_) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/dev_appserver_main.py, line 65, in module from google.appengine.tools import os_compat The same happens if I use the AppEngine Launcher. On Nov 4, 12:51 pm, ryan baldwin ryanbald...@gmail.com wrote: You have to switch to 2.5. Easy to do. Open a terminal and throw this command to the wind: defaults write com.apple.versioner.python Version 2.5 Enjoy! - ryan. On Wed, Nov 4, 2009 at 8:37 AM, Glenn glenn.down...@gmail.com wrote: I'm running Snow Leopard and therefore by default Python 2.6. I know that I need Python 2.5. I'm running the first Hello, World example, and trying the following at the Unix prompt in Terminal: %python2.5 /usr/local/bin/dev_appserver.py helloworld/ and this is what I get: Traceback (most recent call last): File /usr/local/bin/dev_appserver.py, line 60, in module run_file(__file__, globals()) File /usr/local/bin/dev_appserver.py, line 57, in run_file execfile(script_path, globals_) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/dev_appserver_main.py, line 65, in module from google.appengine.tools import os_compat ImportError: cannot import name os_compat What am I missing? 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 -~--~~~~--~~--~--~---