Gaelyk with groovy 2.1 and java 7

202 views
Skip to first unread message

Kunal Dabir

unread,
Feb 15, 2013, 4:08:30 AM2/15/13
to gae...@googlegroups.com
GAE/J sdk 1.7.5 is out and google encourages user to switch to java7 (https://developers.google.com/appengine/docs/java/java7). Just wondering should gaelyk be upgraded to use groovy-2.1-indy with java 7? How the performance would be impacted (positively/negatively)? Any inputs?

Guillaume Laforge

unread,
Feb 15, 2013, 4:17:53 AM2/15/13
to gae...@googlegroups.com
The Google App Engine team tested its Java 7 and invoke dynamic support with Groovy and Gaelyk, so I'm confident that Gaelyk runs fine on GAE with the JDK 7 runtime.

However, I prefer to stay a little bit conservative here, as I know the JVM is not necessarily the latest one supporting the latest invoke dynamic optimizations, so I can't attest if it's going to be much faster or not.
Furthermore, the real optimizations (with the latest refactorings and rework in the JVM) is only really going to be there with JDK 8, because of the lambda support and its need of invoke dynamic :-(

Actually, the thing would be to spend some time benchmarking this! (if you fancy trying, I'd be delighted to hear about your feedback)

So for the release of Gaelyk 2.0, we'll stick with "normal" Groovy.
But that doesn't prevent you from trying it with the "indy" JARs of Groovy and report back.

Guillaume


On Fri, Feb 15, 2013 at 10:08 AM, Kunal Dabir <kunal...@gmail.com> wrote:
GAE/J sdk 1.7.5 is out and google encourages user to switch to java7 (https://developers.google.com/appengine/docs/java/java7). Just wondering should gaelyk be upgraded to use groovy-2.1-indy with java 7? How the performance would be impacted (positively/negatively)? Any inputs?

--
--
You've received this message because you've subscribed to the Gaelyk Google Group.
To send an email to the group, please write to: gae...@googlegroups.com
To unsuscribe from this group: gaelyk+un...@googlegroups.com
To show more options: http://groups.google.fr/group/gaelyk?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Gaelyk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaelyk+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware

Kunal Dabir

unread,
Feb 20, 2013, 10:58:19 AM2/20/13
to gae...@googlegroups.com
My existing gaelyk project when upgraded to 1.7.5, throws the exception pasted below, the same project still works flawlessly on 1.7.4. The Release Notes for 1.7.5 states the removal of the class AddResponse.

"The deprecated classes AddException, AddResponse, ListException, ListIndexesException, ListIndexesRequest, ListIndexesResponse, ListRequest, ListResponse, and RemoveException were removed from the Search API in the SDK. If your app references any of these classes, you must deploy a new version without these references before the next release of App Engine. If you do not do this, your app may stop working in production."

I briefly tried to search the gaelyk codebase for use of this class but couldn't find any. For now, i am reverting back to 1.7.4. Should I log a issue?

Here is the stacktrace:

java.lang.NoClassDefFoundError: com/google/appengine/api/search/AddResponse
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getDeclaredMethods(Class.java:1808)
at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.applyUse(GroovyCategorySupport.java:128)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:180)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:119)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:260)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:466)
at org.codehaus.groovy.runtime.dgm$595.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:313)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at groovyx.gaelyk.GaelykServlet.service(GaelykServlet.groovy:88)
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.sitemesh.webapp.contentfilter.ContentBufferingFilter.bufferAndPostProcess(ContentBufferingFilter.java:169)
at org.sitemesh.webapp.contentfilter.ContentBufferingFilter.doFilter(ContentBufferingFilter.java:126)
at org.sitemesh.config.ConfigurableSiteMeshFilter.doFilter(ConfigurableSiteMeshFilter.java:163)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at javax.servlet.FilterChain$doFilter.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at javax.servlet.FilterChain$doFilter.call(Unknown Source)
at groovyx.gaelyk.routes.RoutesFilter.doFilter(RoutesFilter.groovy:166)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at javax.servlet.FilterChain$doFilter.call(Unknown Source)
at glide.web.GlideLogFilter.doFilter(GlideLogFilter.groovy:34)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.ty.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.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:94)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at javax.servlet.RequestDispatcher$forward.call(Unknown Source)
at groovyx.gaelyk.cache.CacheHandler.serve(CacheHandler.groovy:84)
at groovyx.gaelyk.cache.CacheHandler$serve.call(Unknown Source)
at groovyx.gaelyk.routes.RoutesFilter.doFilter(RoutesFilter.groovy:150)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at javax.servlet.FilterChain$doFilter.call(Unknown Source)
at glide.web.GlideLogFilter.doFilter(GlideLogFilter.groovy:34)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:123)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:61)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
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.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:94)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:409)
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.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.jav12)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.ClassNotFoundException: com.google.appengine.api.search.AddResponse
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:213)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 84 more

Guillaume Laforge

unread,
Feb 20, 2013, 11:00:04 AM2/20/13
to gae...@googlegroups.com
Right, good point, we need to remove the use of those deprecated classes now :-(

Guillaume Laforge

unread,
Feb 20, 2013, 11:01:37 AM2/20/13
to gae...@googlegroups.com
I've created an issue to not forget:

Kunal Dabir

unread,
Feb 21, 2013, 10:52:45 AM2/21/13
to gae...@googlegroups.com
Just for the sake of documenting it for others who face the same issue while upgrading:

Gaelyk 1.2 doesn't work with GAE SDK 1.7.5 

1. Either stick to GAE 1.7.4 and Gaelyk 1.2 for now and use Gaelyk 2 (once its released) with GAE 1.7.5.

2. If you want to upgrade to GAE SDK 1.7.5 right now then, for the time being, you can point to Gaelyk 2.0-SNAPSHOT in your build.gradle

repositories {
  .......
  maven {
  }
}

dependencies {
  .....
  compile "org.gaelyk:gaelyk:2.0-SNAPSHOT",
}

Though this is not recommended for prod apps, feel free to try it out locally and report bugs (if any).

Regards,

Kunal

Guillaume Laforge

unread,
Feb 21, 2013, 11:03:34 AM2/21/13
to gae...@googlegroups.com
Great summary and great initiative to provide this advice!
Thank you.
Reply all
Reply to author
Forward
0 new messages