2011-12-19 11 views
1

私はJAVAとAppEngineを初めて使用しています。私はJDK-1.6をインストールしましたが、それでも例外が発生します。プロジェクトファイルはエラーなくサーバーに展開されますが、リンクを開くとエラーが発生します。私のアプリケーションログには、 "unsupportefclassversionerror"という例外が1つだけ表示されます。私はJDK-1.6をインストールしましたが、動作しません。私はJDK-1.5もインストールしましたが、展開段階では "すべての順列がコンパイルされません"というエラーが出ます。私のプロジェクトのXMLファイルは、java.lang.UnsupportedClassVersionError:com/google/mystorage/server/GreetingServiceImpl:サポートされていないmajor.minorバージョン51.0

XMLファイルがある下回っている

web.xmlの

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
       http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
     version="2.5" 
     xmlns="http://java.sun.com/xml/ns/javaee"> 

    <!-- Servlets --> 
    <servlet> 
    <servlet-name>greetServlet</servlet-name> 
    <servlet-class>com.google.mystorage.server.GreetingServiceImpl</servlet-class> 
    </servlet> 

    <servlet-mapping> 
    <servlet-name>greetServlet</servlet-name> 
    <url-pattern>/mystorage/greet</url-pattern> 
    </servlet-mapping> 

    <!-- Default page to serve --> 
    <welcome-file-list> 
    <welcome-file>index.jsp</welcome-file> 
    </welcome-file-list> 

</web-app> 



のappengine-web.xmlの

<?xml version="1.0" encoding="utf-8"?> 
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> 
    <application>cloudisapp</application> 
    <version>2</version> 

    <!-- 
    By default, App Engine sends requests serially to a given web server. 
    To allow App Engine to send multiple requests in parallel specify: 

     <threadsafe>true</threadsafe> 
    --> 

    <!-- Configure serving/caching of GWT files --> 
    <static-files> 
    <include path="**" /> 
    <include path="favicon.ico"/> 
    <!-- The following line requires App Engine 1.3.2 SDK --> 
    <include path="**.nocache.*" expiration="0s" /> 

    <include path="**.cache.*" expiration="365d" /> 
    <exclude path="**.gwt.rpc" /> 
    </static-files> 

    <!-- Configure java.util.logging --> 
    <system-properties> 
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> 
    </system-properties> 
    <sessions-enabled>true</sessions-enabled> 
</appengine-web-app> 



データストア-indexes.xmlの

<?xml version="1.0" encoding="UTF-8"?> 
<datastore-indexes autoGenerate="true"> 
</datastore-indexes> 

あなたは、Java 6が理解できないのJava 7のためにコンパイルしている私に

+1

これは既に質問していませんでした:http://stackoverflow.com/questions/8563817/the-server-encountered-an-error-and-could-not-complete-your-request-on-appengi – RichW

+1

@リッチーUm、彼はしなかった。質問を読んでください。ちょうど同じ人が2つの「私はJavaに新しい」イントロを掲示しているので、同じ質問ではありません。 –

+0

私は自分のプロジェクトで何をやっているのか分かりません。その例外の病気 – gr8sniper

答えて

3

を助けてください。

Java 6 javacを使用して再コンパイルします。

+0

Java 6で動作していない – gr8sniper

+1

"動作していません"はかなり曖昧です –

+1

または-target 1.6で再コンパイルし、Java 7の機能を使用しないようにしてください。 – EJP

1

共有プロジェクトで同じ問題が発生しました。コンパイルされたすべてのクラス(war/WEB-INF/classesディレクトリの下にある、ソースのコンパイル済みバージョンのようなものすべて)を削除してみてください。

関連する問題