[appengine-java] Proxy objects in the session?
Forgive me if this has been answered already...I looked around and found only this one unanswered post: http://groups.google.com/group/google-appengine-java/browse_thread/thread/636e7cb54d7ca505 It seems that if I create a proxy object and put it into the session, then I run into deserialization troubles when the server tries to restore the session on the next request. To break this down to the simplest thing possible, I created an interface called Foo: public interface Foo { void doFoo(); } And an equally simple implementation: public class FooImpl implements Foo, Serializable { public void doFoo() { System.out.println(Foo is good); } } I then created a proxy object for it and put the proxy into the session and redirected to another page. At that point, I get the following: javax.servlet.ServletException: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.social.connect.web.Foo at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 251) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 260) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $2.handleRequest(RuntimePb.java:9673) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 422) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java: 573) at com.google.tracing.TraceContext$TraceContextRunnable $1.run(TraceContext.java:448) at com.google.tracing.TraceContext.runInContext(TraceContext.java: 688) at com.google.tracing.TraceContext $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java: 326) at com.google.tracing.TraceContext $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java: 318) at com.google.tracing.TraceContext $TraceContextRunnable.run(TraceContext.java:446) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1110) at java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.social.connect.web.Foo at com.google.apphosting.runtime.jetty.SessionManager.deserialize(SessionManager.java: 386) at com.google.apphosting.runtime.jetty.MemcacheSessionStore.getSession(MemcacheSessionStore.java: 31) at com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java: 320) at com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java: 294) at org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java: 237) at org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java: 246) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 136) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 249) ... 19 more Caused by: java.lang.ClassNotFoundException: org.springframework.social.connect.web.Foo at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at com.google.apphosting.runtime.security.RuntimeClassLoader.loadFilteredClass(RuntimeClassLoader.java: 258) at com.google.apphosting.runtime.security.RuntimeClassLoader.loadPrivilegedClass(RuntimeClassLoader.java: 201) at com.google.apphosting.runtime.security.RuntimeClassLoader.loadClass(RuntimeClassLoader.java: 155) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java: 693)
[appengine-java] Re: is it possible to use Java 7 on GAE ?
Not currently. The docs say App Engine runs your Java web application using a Java 6 JVM... (http://code.google.com/appengine/ docs/java/runtime.html) As a follow-up question to anyone on the GAE team: Is there an ETA on when GAE will support Java 7 after it's released? On Mar 3, 2:00 pm, zixzigma zixzi...@gmail.com wrote: is it possible to use Java 7 on GAE ? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Bulkupload int key?
Can someone help me with this, please? I'm sure the answer is trivial, but another weekend of tinkering hasn't led me to the solution. On Fri, May 21, 2010 at 20:21, Craig Berry cdbe...@gmail.com wrote: I have an xml file containing data which I wish to bulkupload to GAE. I am using the preview version of the new bulk uploader, if that matters. How do I include an int value for the __key__ derived from a field in the xml data? If I specify no import transform, like so - property: __key__ external_name: id export_transform: transform.key_id_or_name_as_string it loads the key as a string 'name', so it sorts lexicographically rather than numerically. I want an int id instead. But I can't find what to put in as an import_transform to make this happen. Thanks in advance for any help on this. -- Craig Berry - http://lapidum.org/home.html Magicians lie to the universe, and the universe believes them. -- Lenore Berry -- Craig Berry - http://lapidum.org/home.html Magicians lie to the universe, and the universe believes them. -- Lenore Berry -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Bulkupload int key?
I have an xml file containing data which I wish to bulkupload to GAE. I am using the preview version of the new bulk uploader, if that matters. How do I include an int value for the __key__ derived from a field in the xml data? If I specify no import transform, like so - property: __key__ external_name: id export_transform: transform.key_id_or_name_as_string it loads the key as a string 'name', so it sorts lexicographically rather than numerically. I want an int id instead. But I can't find what to put in as an import_transform to make this happen. Thanks in advance for any help on this. -- Craig Berry - http://lapidum.org/home.html Magicians lie to the universe, and the universe believes them. -- Lenore Berry -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Server Code for Chat Service / Matchmaking
Great, thank you for the clarification. Craig On Nov 23, 10:32 pm, Timothy Spear tsp...@green20now.com wrote: Craig, The short answer is. No threads may not be spawned. Use the datastore to update/change status for the users. Only use memcache for reference information or information which a invalid current status may be acceptable. If the current status of a user must be valid, then the datastore is the only way to persist the information. Short reason for GAE thinking. The datastore handles replication between all the servers automatically. The application servers are load balanced and constantly in a state of flux. For example, server A may answer the initial request by one user and Server B may answer the request by the second user. Server A B may actually be located in separate data centers around the world. Tim On Nov 21, 2009, at 10:35 PM, Craig wrote: Hi, I have some questions regarding the limits of server code in GAE. Can I write server code that isn't tied to an http request - i.e. a thread that would always be running on the server and which servlets could communicate with? From what I've read it isn't possible but I just wanted to confirm. The application I'm writing is analogous to a chat system where 10 users would log in and indicate their status (busy, idle, etc). I would prefer to be able to write a single server thread which would maintain this information and could give it to the individual servlets as needed. I.e. if I could write a persistent thread to manage this data I wouldn't need to deal with the data store, memcache, etc. I understand that this isn't possible - but please let me know if it is and what term I need to search for. Next, please let me know if the following architecture for my app makes sense. Since I cannot write a central thread to manage the information and respond to requests, I'll accomplish that using the memcache data store. As users update their status the servlets will update the data. Then when the other clients refresh themselves, the servlets that they spawn will retrieve everyone's status from the data store and return it to the client. Does this structure make sense or am I missing something? (Eventually I'll use ServerPush to accomplish the refresh but I don't think that is relevant to the question). Thanks for your response and advice, Craig -- 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 athttp://groups.google.com/group/google-appengine-java?hl= . -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.