Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class file is Java 8 but max supported is Java 7 #1365

Closed
grembek opened this issue Feb 9, 2017 · 6 comments
Closed

Class file is Java 8 but max supported is Java 7 #1365

grembek opened this issue Feb 9, 2017 · 6 comments

Comments

@grembek
Copy link

grembek commented Feb 9, 2017

Hi,

I am struggling for two days to deploy my code to Google App Engine and I am unable to do so because of the error "Class file is Java 8 but max supported is Java 7". I tried everything I could find on the web and it is very frustrating that I cannot do so. The App can run locally, but fails I deploy it to the remote server. Can you please advise.

"Beginning interaction for module default...
0% Scanning for jsp files.
0% Compiling jsp files.
Unable to stage app: Class file is Java 8 but max supported is Java 7: org/eclipse/jetty/apache/jsp/JettyJasperInitializer$1.class in /Users/grembek/Documents/DevelopmentApps/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/jetty93/jetty-distribution/lib/apache-jsp/org.eclipse.jetty.apache-jsp-9.3.14.v20161028-nolog.jar
Please see the logs [/var/folders/24/1d9xwv3536xf_z483zhs_n300000gn/T/appcfg110329673286093132.log] for further information."

screen shot 2017-02-09 at 10 26 59

screen shot 2017-02-09 at 10 28 01

screen shot 2017-02-09 at 10 28 25

screen shot 2017-02-09 at 10 29 36

screen shot 2017-02-09 at 10 30 17

@akerekes
Copy link
Contributor

akerekes commented Feb 9, 2017

Hi @grembek ,

can you please check what's schema version set in your web.xml?

Also can you share the web.xml used for staging? You can found it under <Eclipse workspace>/.metadata/.plugins/com.google.cloud.tools.eclipse.appengine.deploy/tmp/<timestamp>/staging/WEB-INF.

@grembek
Copy link
Author

grembek commented Feb 9, 2017

Sure. This is the web.xml within the project:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
</web-app>

There are two files in the metadata/plugin folder (different timestamps):

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
</web-app>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
</web-app>

@akerekes
Copy link
Contributor

akerekes commented Feb 9, 2017

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

@grembek
Copy link
Author

grembek commented Feb 9, 2017

Thanks
I'll try, anyway, I would suggest to specify a more clear message if that is the case

@elharo
Copy link
Contributor

elharo commented Feb 9, 2017

I wonder if this is something we could mark with a warning/error in Eclipse? @abbiefarr What do you think?

Also, there's a second issue here though it's not the cause of the problem you're seeing. You're using the old appengine SDK based maven plugin in your pom.xml whereas the IDES are using gcloud. The equivalent maven plugin is https://cloud.google.com/appengine/docs/java/tools/using-maven
Is that something we should warn about?

@chanseokoh
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants