Google app engine deployment error: class file is Java 8, but max is supported by Java 7

I am using IntelliJ and am following this tutorial to deploy a hello world sample app. When following the steps to deploy the application, I get the following error:

java.lang.IllegalArgumentException: class file is Java 8 but max is supported by Java 7 org / eclipse / jetty / apache / jsp / JuliLog.class in / Users / appengine -java-sdk-1.9.50 / jetty93 / jetty-distribution /lib/apache-jsp/org.eclipse.jetty.apache-jsp-9.3.16.v20170120-nolog.jar

Can't update app: class file is Java 8 but max is supported by Java 7: org / eclipse / jetty / apache / jsp / JuliLog.class in / Users / appengine -java-sdk-1.9.50 / jetty93 / jetty -distribution / Library / Apache-JSP / org.eclipse.jetty.apache-JSP-9.3.16.v20170120-nolog.jar

I am using java version 1.7.0_71 in a project structure. My compiler settings are set to generate 1.7 compatible bytecode: screenshot of IDE compiler settings

Anyone have any ideas on how to fix this?

EDIT Fixed issue with web.xml version. see here

+3


source to share


2 answers


According to this report , the issue is version-specific web.xml

.

So the problem is that web.xml uses version 3.1 and App Engine Standard only supports 2.5, which causes the error message stage to fail. Please change the version and try again.



A similar problem has also been reported here .

you are seeing an open bug we have right now with the App Engine SDK where a misleading error message is being thrown when using a Java 7 application with web.xml configured for servlet 3.1 (which does not support Java 7).

0


source


This resolved it Modified web.xml file at:

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

      



Thank.

0


source







All Articles