0

我有一个谷歌图表应用程序,它从本地开发环境中的 mysql 和应用引擎环境中的 Cloud SQL 实例获取数据。在本地 eclipse 环境中,我遇到了同样的问题,我通过将番石榴罐添加到 eclipse 插件中解决了这个问题。我不确定我需要在远程 appengine 环境中做什么来解决此问题。

appengine 错误日志:

2013-08-20 05:30:56.160 /oldv2reports/getData?url=jdbc:google:rdbms://onlinederivatives2:oldd/oldd&table=rep_moti_5day_average_data&tq=select%20price_timestamp%2C%20price%20where%20symbol%20%3D%20'ABB'&tqx=reqId%3A1 500 11ms 0kb Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36
65.24.104.225 - - [20/Aug/2013:05:30:56 -0700] "GET /oldv2reports/getData?url=jdbc:google:rdbms://onlinederivatives2:oldd/oldd&table=rep_moti_5day_average_data&tq=select%20price_timestamp%2C%20price%20where%20symbol%20%3D%20\'ABB\'&tqx=reqId%3A1 HTTP/1.1" 500 0 "http://onlinederivatives2.appspot.com/OLDv2ReportsQuery.html" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" "onlinederivatives2.appspot.com" ms=12 cpu_ms=39 app_engine_release=1.8.3 instance=00c61b117ca0e915b029dbea0126709e88259c36
W 2013-08-20 05:30:56.157
Error for /oldv2reports/getData
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList;
    at com.google.visualization.datasource.query.QuerySelection.getColumns(Unknown Source)
    at com.google.visualization.datasource.query.Query.validate(Unknown Source)
    at com.google.visualization.datasource.query.parser.QueryBuilder.parseQuery(Unknown Source)
    at com.google.visualization.datasource.DataSourceHelper.parseQuery(Unknown Source)
    at com.google.visualization.datasource.DataSourceHelper.parseQuery(Unknown Source)
    at com.google.visualization.datasource.DataSourceRequest.createQueryFromRequest(Unknown Source)
    at com.google.visualization.datasource.DataSourceRequest.<init>(Unknown Source)
    at com.google.visualization.datasource.DataSourceHelper.executeDataSourceServletFlow(Unknown Source)
    at com.google.visualization.datasource.DataSourceServlet.doGet(Unknown Source)
    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.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
    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 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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:266)
    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:146)
    at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:439)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:435)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:442)
    at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:298)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:439)
    at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
    at java.lang.Thread.run(Thread.java:722)
4

1 回答 1

2

看起来您在类路径中有一个旧版本的 Guava,并且该com.google.visualization库需要一个更新的包含该ImmutableList.copyOf(Collection)方法的库。

在 webapp 的库中添加正确版本的 Guava。

于 2013-08-21T08:38:30.143 回答