Unable to stage: java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7

359 views
Skip to first unread message

Dhyanandra Singh

unread,
Oct 20, 2016, 9:21:08 AM10/20/16
to Google App Engine
Hello,

I am working on java and I just started work on gce.
I simply started project and deploy it on gce.
but when i added appengine-web.xml it throw me an error
 
Unable to stage:
java
.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7.


appengine-web.xml
<?xml version="1.0" encoding="utf-8"?>

<!-- [START config] -->
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
 
<application>yugma-146007</application>
 
<!--<version>YOUR-VERSION-ID</version> -->
 
<threadsafe>true</threadsafe>
 
<use-google-connector-j>true</use-google-connector-j>
 
<!-- <system-properties>
    <property name="ae-cloudsql.cloudsql-database-url" value="jdbc:google:mysql://[INSTANCE_CONNECTION_NAME]/DATABASE-NAME?user=USERNAME&amp;password=PASSWORD" />
    <property name="ae-cloudsql.local-database-url" value="jdbc:mysql://localhost/DATABASE-NAME?user=USERNAME&amp;PASSWORD=password&amp;useSSL=false" />
  </system-properties> -->

</appengine-web-app>
<!-- [END config] -->



 

Jordan (Cloud Platform Support)

unread,
Oct 21, 2016, 2:59:51 PM10/21/16
to Google App Engine
The App Engine Standard Environment only supports Java 7. Therefore if any of your libraries are built for Java 8 you will see this warning. The solution is to either remove any reference to Java 8 in your code, or to deploy your code to the App Engine Flexible Environment which does support Java 8.

If you experience any further issues after performing the above, you can provide details about your setup and stack trace to Stack Overflow. Google groups is intended for general discussions rather than 1-on-1 support assistance. You can see our Community Support [1] page for a list of the tags we monitor.

Before posting a question to Stack Overflow it's a good idea to read over the guidelines at 'How do I ask a good question' [2].

Dhyanandra Singh

unread,
Oct 22, 2016, 8:49:58 AM10/22/16
to Google App Engine
 i implemented this code using flexible enviornment.

Robert Fox

unread,
Oct 22, 2016, 9:13:02 AM10/22/16
to Google App Engine
Dhyanandra you're not using Flexible Environment unless your appengine-web.xml contains  <vm>true</vm>

Robert Fox

unread,
Oct 22, 2016, 9:13:54 AM10/22/16
to Google App Engine
Reply all
Reply to author
Forward
0 new messages