6 June 2012

Google Eclipse plugin issues: "Failed to initialize App Engine SDK" & "Missing required parameter: client_id"

I've started playing around with the google app engine recently and came across a couple of issues when setting up a new instance of my eclipse Galileo 3.5.0 IDE with the google plugin. It's a simple fix and hopefully if you're having the same problem's it will save you some time.

The problem - forward compatibility

The root cause of the problems where caused by forward compatibility. The GAE plugin classes had been complied with a JDK 1.6 and the Eclipse environment was running in 1.5. Very simple to fix but I confused myself by getting mixed up with the version of the Java JRE that the PROJECTS run with and the actual version of the VM that ECLIPSE run's with :) . Where plugin capability is concerned you're dealing with the version of the Eclipse VM aka you need to make sure the Eclipse plugin code was complied using the same JDK version or earlier as the running Eclipse VM, obviously.

How it manifested itself

A GAE could not be created since the App Engine SDK 1.6 would not intalise resulting in a "Failed to initialize App Engine SDK" message and the following stack trace in the eclipse error logs:

Similar to this issue here.

I worked around this by reverting back to my older 1.5 version of the GAE App Engine SDK but then I encountered a second issue which meant I was unable to log into Google. Clicking on the sign in to Google Link opened a browser window with an OAuth 2.0 error message of : Missing required parameter: client_id resulting in an invalid request.A similar issue has been raised here.

The fix - latest version of the GAE plugin requires Eclipse to be using JDK 1.6+

Ensure eclipse is using a 1.6 JDK. The eclipse Vm by default runs on the default Java version on the system to run itself but this can also be changed in the eclipse.ini file in your eclipse install folder, simply edit the vm property.

1 comment:

  1. I have Java 1.6 with Eclipse Indigo...a GAE application runs properly on the development server but i get the 'missing client id' error when i try to deploy it on the google server. I get the same error when I click 'Sign In to Google'.
    No error logs in workspace/.metadata/*.log