gpt4 book ai didi

java - 将 GWT SQL 示例部署到 AppEngine,在 DB 上记录错误

转载 作者:行者123 更新时间:2023-12-04 06:05:54 26 4
gpt4 key购买 nike

我最近在 Google Cloud SQL 和 GWT 上学习了本教程:http://code.google.com/apis/sql/docs/developers_guide_java.html

在必须创建一个 GuestbookExample.gwt.xml 文件后,我将此应用程序部署到我的谷歌云 sql 服务器。我认为我正确地创建了它:




  <!-- Inherit the default GWT style sheet.  You can change       -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->

<!-- Other module inherits -->

<!-- Specify the app entry point class. -->

<!-- Specify the paths for translatable code -->
<source path='guestbook'/>

</module>

它能够部署到服务器而没有从 GWT 编译器编译的问题。

当我尝试访问链接到我的项目的 appspot 站点时,出现 HTTP 错误:
Error: Server Error
The server encountered an error and could not complete your request.

If the problem persists, please report your problem and mention this error message and the query that caused it.

我觉得这很奇怪,所以我检查了 Google Cloud SQL 数据库上的日志,我看到错误如下:
[02/Dec/2011:11:25:36 -0800] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0" "cst433t1proj.appspot.com" ms=109 cpu_ms=175 api_cpu_ms=0 cpm_usd=0.004894 instance=00c61b117cb6def6096f8754a01131e49502

C 2011-12-02 11:25:36.913

Uncaught exception from servlet
java.lang.UnsupportedClassVersionError: guestbook/GuestbookServlet : Unsupported major.minor version 51.0
at com.google.appengine.runtime.Request.process-0000000000000000(Request.java)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
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.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
at java.lang.Thread.run(Thread.java:679)

我能做些什么来解决这个错误?我是这个数据库方面的新手。我刚刚学习 GWT 以协助创建最终项目。任何帮助,将不胜感激。

最佳答案

您可能正在使用 Java 7? GAE 支持特定版本的 Java 检查 http://code.google.com/appengine/docs/java/overview.html看看你是否使用了不受支持的。

关于java - 将 GWT SQL 示例部署到 AppEngine,在 DB 上记录错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8361639/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com