-
Notifications
You must be signed in to change notification settings - Fork 56
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 #1230
Comments
Hi @grembek, Thanks for reporting this issue in such detail. My first guess is that you're seeing an open bug we have right now with the App Engine SDK where a misleading error message is provided when you use a Java 7 app with a web.xml configured to servlet 3.1 (which doesn't support Java 7). Can you check your web.xml? If your web.xml looks like this:
Then you'll have a problem. It needs to be updated to:
If that's not your problem, the other thing I'm noting is that you're showing us the IDEA boot JDK, which is not the same as the one used by IntelliJ to build your project. Have you checked your project settings (⌘;) and verify that your project JDK and module JDKs are set to Java 7 language level? |
The workaround worked by specifying the version of the xml as 2.5 |
#1231 |
i am using Eclipse neon. in my case it was already 2.5, but when i changed the whole text as suggested by patflynn it worked. |
i am using eclipse Oxigen and my web-app version is 2.5, but is not working, i have the same error "Class file is Java 8 but max supported is Java 7" i am using java 8 but i can't chage to java 7 |
@narbigcito is your goal to use java 7, or java 8? You can use the Java 8 runtime on app engine standard if you choose. Could you perhaps post the contents of your appengine-web.xml (stripping out sensitive data)? |
Thanks @etanshaul , adding the following worked:
|
great! thanks for the update |
Just to be more clear, what fixed it for me is adding the |
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.
I did everything advised in the IntlliJ guide: https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under
I have the sane problem in Eclipse: GoogleCloudPlatform/google-cloud-eclipse#1365
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/.../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/appcfg585555938498236650.log] for further information.
Failed to deploy '[2017-02-09 10:45:20] Maven build: replies. Project: replies-server-production. Version: auto': Deployment failed due to an unexpected error while staging the project.
The text was updated successfully, but these errors were encountered: