简体   繁体   中英

Java 6 preventing deployment to appengine

When I try and deploy my app to Google Appenginge, I get the following response:

Caused by: java.io.IOException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=kittysplit&version=1& 400 Bad Request Java 6 applications are prevented from being deployed to Google App Engine from any version of the SDK, including older ones. If you need to continue to deploy Java 6 applications for compatibility reasons, you can request that your application be whitelisted for Java 6 deployment by visiting http://goo.gl/ycffXq.

I have set the project SDK to Java 1.7. My suspision is that a dependency in my POM.xml (included below) is causing this problem. Any ideas?

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <!-- The Basics -->
  <groupId>com.kittysplit</groupId>
  <artifactId>kittysplit</artifactId>
  <version>1.0</version>
  <packaging>war</packaging>

  <name>kittysplit</name>

  <dependencies>

    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <version>2.42.0</version>
    </dependency>

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-remote-api</artifactId>
      <version>1.7.7.1</version>
    </dependency>

    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.1</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-server</artifactId>
      <version>1.5</version>
    </dependency>

    <!-- Google App Engine meta-package -->
    <dependency>
      <groupId>net.kindleit</groupId>
      <artifactId>gae-runtime</artifactId>
      <version>${gae.version}</version>
      <type>pom</type>
    </dependency>

    <dependency>
      <groupId>org.datanucleus</groupId>
      <artifactId>datanucleus-core</artifactId>
      <version>${datanucleus.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>jta</artifactId>
      <version>1.1</version>
    </dependency>

    <!--
      J2EE Servlet API. We need it to compile IndexServlet class. You can
      probably remove it, if you don't explicitly use Servlets
    -->
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-servlet_2.5_spec</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
    </dependency>

    <!--
        Make use of JSP tags. Remove, if you don't use JSPs
      -->
    <dependency>
      <artifactId>standard</artifactId>
      <groupId>taglibs</groupId>
      <version>1.1.2</version>
      <type>jar</type>
      <scope>runtime</scope>
    </dependency>

    <!-- These dependencies are here just for enabling logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.6.1</version>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>0.9.24</version>
    </dependency>

    <!-- Test scope -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.5</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-labs</artifactId>
      <version>${gae.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-stubs</artifactId>
      <version>${gae.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-testing</artifactId>
      <version>${gae.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>javax.jdo</groupId>
      <artifactId>jdo2-api</artifactId>
      <version>2.3-eb</version>
      <exclusions>
        <exclusion>
          <groupId>javax.transaction</groupId>
          <artifactId>transaction-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <webResources>
            <resource>
              <directory>src/main/webapp</directory>
              <filtering>true</filtering>
              <includes>
                <include>**/appengine-web.xml</include>
              </includes>
            </resource>
          </webResources>
        </configuration>
      </plugin>


      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
      </plugin>

      <!--
           The actual maven-gae-plugin. Type "mvn gae:run" to run project, "mvn
           gae:deploy" to upload to GAE.
         -->
      <plugin>
        <groupId>net.kindleit</groupId>
        <artifactId>maven-gae-plugin</artifactId>
        <version>0.9.2</version>

        <configuration>
          <splitJars>true</splitJars>
        </configuration>


        <dependencies>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
            <version>2.1.2</version>
          </dependency>
        </dependencies>
      </plugin>

      <!--
           Upload application to the appspot automatically, during
           release:perform
         -->
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <goals>gae:deploy</goals>
        </configuration>
      </plugin>

      <!-- Java compiler version -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
    </pluginManagement>
  </build>

  <!-- Specify hard-coded project properties here -->
  <properties>

    <!-- Sets the project's default encoding.
   http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!--
        This is just for "eclipse:eclipse" goal to always attempt downloading
        sources
      -->
    <downloadSources>true</downloadSources>

    <!--
        Specify AppEngine version for your project. It should match SDK
        version pointed to by ${gae.home} property (Typically, one used by
        your Eclipse plug-in)
      -->
    <gae.version>1.7.7</gae.version>

    <!--
        Upload to http://test.latest.<applicationName>.appspot.com by default
      -->
    <gae.application.version>test</gae.application.version>

    <datanucleus.version>1.1.5</datanucleus.version>
  </properties>

  <profiles>
    <!--
        We can configure our integration server to activate this profile and
        perform gae:deploy, thus uploading latest snapshot to the
        http://1.latest.<applicationName>.appspot.com automatically
      -->
    <profile>
      <id>integration-build</id>
      <properties>
        <gae.application.version>stage</gae.application.version>
      </properties>
    </profile>

    <!--
        This profile will activate automatically during release and upload
        application to the http://2.latest.<applicationName>.appspot.com (We
        might want to set the 2nd version as our applications Default version
        to be accessible at http://<applicationName>.appspot.com)
      -->
    <profile>
      <id>release-build</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <properties>
        <!--
              During release, set application version in appengine-web.xml to 2
            -->
        <gae.application.version>release</gae.application.version>
      </properties>
    </profile>
  </profiles>
</project>

Why are you using an incredible old version of GAE? Have you tried upgrade the version to 1.9.6?

<dependency>
  <groupId>com.google.appengine</groupId>
  <artifactId>appengine-remote-api</artifactId>
  <version>**1.9.6**</version>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM