GAE started in Java, Eclipse Indigo - unable to compile as 1.6

It seems to me that I continue in circles with this. I followed the Google App Engine Getting Started Guide ( https://developers.google.com/appengine/docs/java/gettingstarted/ ) in Eclipse and everything went pretty well until I downloaded it in App Engine.

I was getting 500 errors, so I checked the logs and found this: "guestbook / SignGuestbookServlet: Unsupported major.minor version 51.0]"

Then I searched for this problem (in stackoverflow, of course) and found this solution: Google App Engine and Java version?

So, I installed compliance level 1.6, and then at the bottom of the dialog box I get a warning: "When choosing compliance 1.6, make sure that a compatible JRE is installed and activated (currently 1.7)."

I am happy, click OK, and he will offer to rebuild. After the rebuild, I get this new error: "The Java compiler level does not match the version of the installed aspect of the Java project."

Having no conscious use of any aspects in the project, I search for some help (again in stackoverflow) and find this: "Boundary design error (Java version mismatch)" error message

Unfortunately, it is not even close to being useful, because I do not use Maven, and when I open the project properties, I do not have the Project Properties → Fac Facets panel for me to change the version.

So it seems like I'm stuck with something that either cannot be compiled in Eclipse or cannot be deployed to App Engine. I know that I probably missed something obvious here, but I can't put it on him.

UPDATE: I uninstalled all JRE and JDK and reinstalled only jdk1.6.0_32. The problem continues exactly the same.

+2
java eclipse google-app-engine facet eclipse-indigo
May 22 '12 at 1:20
source share
3 answers

I had the same problem. I was able to resolve it by browsing Navigator and editing .settings / org.eclipse.wst.common.project.facet.core.xml by changing to:

<?xml version="1.0" encoding="UTF-8"?> <faceted-project> <installed facet="java" version="1.6"/> </faceted-project> 

After this change, the error disappeared, and I was able to successfully launch the GWT project in DevMode using the compliance level jre1.7, but java 1.6.

There seems to be a way to edit this java facet through the project configuration, but I could not find it in Juno.

+7
Aug 25 2018-12-12T00:
source share

The answer, at least in my case, seems to be that if your Eclipse compiler level is 1.7 by default when creating a web application, you cannot successfully minimize it to 1.6.

Example 1: Using JRE 1.6

  • In eclipse, set Preferences-> Java-> Installed JREs in jdk 1.6.0_32
  • Configure settings-> Java-> Compiler to compliance level 1.6
  • Use the Google plugin to create a "new web application"
  • Run it locally - success
  • Deploy the application engine, run remotely - successfully

Example 2: Using JRE 1.7

  • In eclipse install Preferences-> Java-> Installed JREs in jdk 1.7.0_04
  • Set Settings-> Java-> Compiler to compliance level 1.7
  • Use the Google plugin to create a "new web application"
  • Run it locally - success
  • Download to application engine - crash (Unsupported major.minor version 51.0)
  • In the eclipse Preferences-> Java-> Compiler settings for compliance level 1.6, a failure (will not be compiled locally (the Java compiler level does not match the version of the installed aspect of the Java project).

Decision:

Before using the google plugin to create a web application, switch the JRE and compiler level to 1.6 (as shown in Example 1).

If your project already exists, then I hope you have not gone too far and can create it again.

+2
May 23 '12 at 5:39 a.m.
source share

After dealing with this problem for several hours, deleting my nocache.js in the war folder was the last piece of the puzzle.

Unlike the answer above, I was able to successfully go to compliance level 1.6 after creating the application in 1.7

+2
Oct 15 '12 at 8:40
source share



All Articles