[appengine-java] Re: Unsupported method contains while parsing expression:
Hey Google, If that really is a mistake in the documentation that Ftaylor pointed out, can you take the 5 minutes and update it? That 5 minutes sure would pay lots of dividends on the other side in terms of saved minutes trying to figure out why things aren't working. The documentation is posted here: http://code.google.com/appengine/docs/java/datastore/jdo/queries.html#Introducing_Queries In the Query Filters section, the example shown contradicts the JDO spec according to Andy's response. Now, if the documentation is correct, then I'm just confused, and I'll just crawl back into my computer screen and continue beating my head against this stuff until it makes sense. However, if it's not correct, can we get someone to update that please? It's been 3 years now. :) Thanks, James On Thursday, January 28, 2010 4:45:26 AM UTC-8, Ftaylor wrote: Code: Class Page { ListString aliases; ... query = pm.newQuery(Page.class); query.setFilter(:aliases.contains(alias)); query.declareVariables(String alias); ListPage results = (ListPage)query.execute(alias); ... } I want to select Page objects where the aliases property contains a given alias String value. Is there any way to do this? I tried as above and got an exception: Problem with query SELECT FROM getimgs.Page WHERE :aliases.contains (alias) VARIABLES String alias: Unsupported method contains while parsing expression: InvokeExpression{[ParameterExpression {aliases}].contains(VariableExpression{alias})} If this cannot be done with JDOQL, the only solution I can think of is selecting every Page object, then looping through them and using Java's contains method, but this sucks somewhat. Anyone? Cheers, Finbarr -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/XQkJadTLIg4J. 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: Unsupported method contains while parsing expression:
Sorry, it was 2 years ago. I added wrong :) James On Wednesday, February 3, 2010 9:40:27 AM UTC-8, Ftaylor wrote: There actually seems to be a mistake in the documentation: // Give me all Employees with lastName equal to Smith or Jones Query query = pm.newQuery(Employee.class, :p.contains(lastName)); query.execute(Arrays.asList(Smith, Jones)); Surely it should be: // Give me all Employees with lastName equal to Smith or Jones Query query = pm.newQuery(Employee.class, p.contains(:lastName)); query.execute(Arrays.asList(Smith, Jones)); On Feb 2, 10:29 pm, Ikai L (Google) ika...@google.com wrote: Oy, this is what I get for not running code before posting it. Good looking out. On Tue, Feb 2, 2010 at 1:06 AM, datanucleus andy_jeffer...@yahoo.com wrote: query.setFilter(aliases == alias); That is invalid JDOQL syntax; the spec is the spec and JDOQL uses Java syntax. If you have a collection field then the filter should be aliases.contains(:alias) The poster put the colon in front of a field name (wrong), and declared a parameter as a variable (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.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Enginehttp:// googleappengine.blogspot.com|http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/k-5OJNQMQmUJ. 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] Unable to load several versions of AppEngine Project and Seeing HardDeadLineExceeded Exceptions
** Since this site is not yet deprecated until March 5th, I've posted this question on both StackOverflow, as suggested by Ikai, as well as on Groups. Here is the StackOverflow link, which I'm assuming is the preferred place to post answers: http://stackoverflow.com/q/9421549/552792 ** Suddenly, without warning, my AppEngine project would no longer load in the browser. http://my.loopto.do. This also is happening with older versions of the application. Below is the 500 error. I know what a DeadlineExceededException is. What I don't understand is why this is happening, even on versions that were previously working fine with no problems. The log, turned all the way up to ALL, doesn't seem to shed any light on what the problem is. Another interesting point is that the same codebase, when uploaded to a different appspot domain, loads without issues. -Thus, the code runs on one appspot domain but not another, isolating the code as a constant. - Additionally, older versions that were previously working on the broken appspot domain are also experiencing the HardDeadlineExceededError. - The application also loads fine on localhost, using the latest SDK 1.6.2.1. I assume this is an Appengine problem, because the log doesn't show where exactly *my* code is breaking. **What do I need to do to resolve this issue?** **Here is the StackTrace:** 2012-02-23 12:50:06.744 /loop/?t=1330030019399 500 187376ms 1kb Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 50.43.101.83 - user.name [23/Feb/2012:12:50:06 -0800] GET /loop/? t=1330030019399 HTTP/1.1 500 1309 http:// 0-9-2012-2-23.loopaback.appspot.com/ Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/ 535.1 0-9-2012-2-23.loopaback.appspot.com ms=187376 cpu_ms=560 api_cpu_ms=0 cpm_usd=0.015809 loading_request=1 pending_ms=13 exit_code=104 instance=00c61b117c1a26c7b1ad046194db91806cb9d7 W 2012-02-23 12:50:06.616 Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@fe2558{/,/ base/data/home/apps/s~loopaback/0-9-2012-2-23.357026711120155741} com.google.apphosting.api.DeadlineExceededException: This request (c567eadbd5f794fd) started at 2012/02/23 20:47:09.524 UTC and was still executing at 2012/02/23 20:49:56.454 UTC. at java.util.zip.ZipFile.getNextEntry(Native Method) at java.util.zip.ZipFile.access$400(ZipFile.java:57) at java.util.zip.ZipFile$2.nextElement(ZipFile.java:342) at java.util.zip.ZipFile$2.nextElement(ZipFile.java:328) at java.util.jar.JarFile$1.nextElement(JarFile.java:240) at java.util.jar.JarFile$1.nextElement(JarFile.java:235) at sun.misc.URLClassPath $JarLoader.addJarEntriesToEntryMap(URLClassPath.java:813) at sun.misc.URLClassPath$JarLoader.access$1600(URLClassPath.java: 723) at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:900) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath $JarLoader.ensureOpenSynchronized(URLClassPath.java:846) at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java: 838) at sun.misc.URLClassPath$JarLoader.init(URLClassPath.java:785) at sun.misc.URLClassPath$JarLoader.init(URLClassPath.java:743) at sun.misc.URLClassPath$3.run(URLClassPath.java:412) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath.getLoader(URLClassPath.java:395) at sun.misc.URLClassPath.getLoader(URLClassPath.java:371) at sun.misc.URLClassPath.findResource(URLClassPath.java:201) at java.net.URLClassLoader$2.run(URLClassLoader.java:379) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:376) at com.google.apphosting.runtime.security.UserClassLoader.findResource(UserClassLoader.java: 723) at java.lang.ClassLoader.getResource(ClassLoader.java:977) at org.mortbay.resource.Resource.newSystemResource(Resource.java: 203) at org.mortbay.jetty.webapp.WebXmlConfiguration.configureDefaults(WebXmlConfiguration.java: 159) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java: 1230) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java: 202) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java: 171) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 123) at
[appengine-java] Re: Problem with Channel API
Hi Matthew, In your logging.properties file, can you set the logging level to ALL and see if that gives you more information? I've found that in these cases, it's helpful to see exactly what's going on under the hood, before the stack trace is generated. If it's not clear to you what's going on after showing all the logs, then post them here. James On May 15, 1:10 am, Matthew Smalley matthew.smal...@gmail.com wrote: Oops forgot the stack trace: (this is from the google appengine log viewer): Uncaught exception from servlet com.google.appengine.api.channel.ChannelFailureException: An unexpected error occurred. at com.google.appengine.api.channel.ChannelServiceImpl.getExceptionForError(ChannelServiceImpl.java:112) at com.google.appengine.api.channel.ChannelServiceImpl.sendMessage(ChannelServiceImpl.java:68) at com.webstersmalley.chessweb.web.ChannelTestController.sendMessage(ChannelTestController.java:74) at com.webstersmalley.chessweb.web.ChannelTestController.getChannelTestMessage(ChannelTestController.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:43) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at 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 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:439) 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: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 2: Unknown at com.google.net.rpc.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:1050) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448) at
[appengine-java] Adding the Ability to Set a Beta or Other Version of an Application To A Domain
At Google IO, one of the members of the audience asked if the App Engine team was considering adding the ability to map a subdomain to a specific version in an App Engine App, other than the default version. Currently, you can map a domain only to the default version. However, it would be nice to be able to map a second domain to another version in the Version Administrative panel. For instance: default - www.example.com - Mapped to version 5 beta - beta.example.com - Mapped to the new version 7 Then in the Version panel, users would select both a default version as well as a beta version. Since a picture speaks a thousand words, I've attached an example of what this feature might look like in the Google App Engine Version Panel: http://commondatastorage.googleapis.com/jem/forums/AppEngineVersions.png There may be a way to add more subdomains to specific versions to support more depth in managing versions, but I think this would be a great start. James -- 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: 1.4.0 Preview and Channel API
I just re-watched the video from Google IO. /_ah/channel/jsapi defaults to polling on the development server but should use comet on the live server by default. James On Nov 29, 8:31 pm, James M jmort...@gmail.com wrote: Thanks for the tip. I added the call to the controller to create the ChannelService. However, what's odd is that my implementation is like your first attempt. I had to use the channelId returned from ChannelService in the JavaScript when opening the socket. The other odd thing I'm seeing is that this is polling. Do you happen to have the javadocs for the ChannelAPI? So far I haven't turned up anything specific to Java. Thanks again, James On Nov 29, 12:01 pm, Scott shathaw...@gmail.com wrote: Is the HTML snippet the full client code? If so you need to call the createChannel service from the client prior to opening the socket. Also what does the ?key=dev do for you in your script import? Good luck! Scott On Nov 29, 7:20 am, James M jmort...@gmail.com wrote: Hi Scott, I'm trying to follow your example but am getting stuck. I've created the following controllers: /** create the channel **/ public ModelAndView createChannel(HttpServletRequest request, HttpServletResponse response) { ChannelService channelService = ChannelServiceFactory.getChannelService(); channelService.createChannel(coupoz); return constructModelAndView(example); } /** send a message **/ public ModelAndView sendMessage(HttpServletRequest request, HttpServletResponse response) { ChannelService channelService = ChannelServiceFactory.getChannelService(); channelService.sendMessage(new ChannelMessage(coupoz,test)); return constructModelAndView(example); } // NOTE: both controllers return a JSON string. I also have an HTML file: html head script src=_ah/channel/jsapi?key=dev/script script var channel = new goog.appengine.Channel(coupoz); var socket = channel.open(); socket.onopen = function() { console.info(socket opened...); } socket.onmessage = function(evt) { var o = JSON.parse(evt.data); alert(o); } /script /head body /body /html My steps to test are as follows: * Loadhttp://localhost:/business/createChannel.do * Loadhttp://localhost:/channel.html * Loadhttp://localhost:/business/sendMessage.do Here is the stack trace that I get when loading the channel.html file: WARNING: /_ah/channel/dev com.google.appengine.api.channel.dev.LocalChannelFailureException: Channel for application key null not found. at com.google.appengine.api.channel.dev.ChannelManager.getChannel(ChannelManag er.java: 58) at com.google.appengine.api.channel.dev.ChannelManager.getClientChannel(Channe lManager.java: 73) at com.google.appengine.api.channel.dev.ChannelManager.connectClient(ChannelMa nager.java: 122) at com.google.appengine.api.channel.dev.LocalChannelServlet.doGet(LocalChannel Servlet.java: 64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java: 58) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn gineWebAppContext.java: 70
[appengine-java] Re: 1.4.0 Preview and Channel API
Thanks for the tip. I added the call to the controller to create the ChannelService. However, what's odd is that my implementation is like your first attempt. I had to use the channelId returned from ChannelService in the JavaScript when opening the socket. The other odd thing I'm seeing is that this is polling. Do you happen to have the javadocs for the ChannelAPI? So far I haven't turned up anything specific to Java. Thanks again, James On Nov 29, 12:01 pm, Scott shathaw...@gmail.com wrote: Is the HTML snippet the full client code? If so you need to call the createChannel service from the client prior to opening the socket. Also what does the ?key=dev do for you in your script import? Good luck! Scott On Nov 29, 7:20 am, James M jmort...@gmail.com wrote: Hi Scott, I'm trying to follow your example but am getting stuck. I've created the following controllers: /** create the channel **/ public ModelAndView createChannel(HttpServletRequest request, HttpServletResponse response) { ChannelService channelService = ChannelServiceFactory.getChannelService(); channelService.createChannel(coupoz); return constructModelAndView(example); } /** send a message **/ public ModelAndView sendMessage(HttpServletRequest request, HttpServletResponse response) { ChannelService channelService = ChannelServiceFactory.getChannelService(); channelService.sendMessage(new ChannelMessage(coupoz,test)); return constructModelAndView(example); } // NOTE: both controllers return a JSON string. I also have an HTML file: html head script src=_ah/channel/jsapi?key=dev/script script var channel = new goog.appengine.Channel(coupoz); var socket = channel.open(); socket.onopen = function() { console.info(socket opened...); } socket.onmessage = function(evt) { var o = JSON.parse(evt.data); alert(o); } /script /head body /body /html My steps to test are as follows: * Loadhttp://localhost:/business/createChannel.do * Loadhttp://localhost:/channel.html * Loadhttp://localhost:/business/sendMessage.do Here is the stack trace that I get when loading the channel.html file: WARNING: /_ah/channel/dev com.google.appengine.api.channel.dev.LocalChannelFailureException: Channel for application key null not found. at com.google.appengine.api.channel.dev.ChannelManager.getChannel(ChannelManag er.java: 58) at com.google.appengine.api.channel.dev.ChannelManager.getClientChannel(Channe lManager.java: 73) at com.google.appengine.api.channel.dev.ChannelManager.connectClient(ChannelMa nager.java: 122) at com.google.appengine.api.channel.dev.LocalChannelServlet.doGet(LocalChannel Servlet.java: 64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java: 58) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn gineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326
[appengine-java] Re: Channel API ?
Hi Robert, Check out this thread here. We were able to get it working, but only with polling. We've yet to figure out the comet part of things: http://groups.google.com/group/google-appengine-java/browse_thread/thread/19f250b1ff0e4342 James On Nov 24, 7:41 am, Roberto Saccon rsac...@gmail.com wrote: Anybody figured out how to to use it ? Are there javadocs or any other new docs anywhere, beside of the probably now outdated dance robot ? -- Roberto -- 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.