CS6320:  SW Engineering of Web Based Systems

 

GAE tips

Google App Engine Tips

 

TIP 0: When you deploy to GAE first app after installing you get 500 server error

 

When you get to the GAE console logs you will see a message that says unsuported major.minor version

this means that you compiled with a version (52=java 1.8* and the GAE is currently supporting java 1.7*)

SOLUTION:
      1) setup your computer's class environment variable (for PATH and JAVA_HOME) to point to YOUR downloaded JDK 1.7* (you ofcourse have to
           download it first)


     2) Edit the eclipse.ini file located in the eclipse main folder and add the following in BLUE

            

     3) Restart Eclipse

     4) Edit Project Properties in Eclipse and change compiler to 1.7
              
 

       5) Now Project->Clean and redeploy (Note sometimes it still shows that there is some error with the project the red x but, shows no errors in the project) --I am not sure why this is (an error in elcipse) but, it should deploy and now you can run it.
           





               


 

TIP 1: (app not updating with code changes ---caching problem on localhost)

I have found that sometimes when I edit in Eclipse and try to re-run my project the localhost:8888 running Google App Engine emulator (jetty) is caching my results. Here is the fix I found for this on the Internet:

 

  1. Delete Jetty_127_0_0_1_8888_war__.g0qk00 and any other similar items in Temp folder e.g, (C:\Users\username\AppData\Local\Temp),
  2. stop and re-start the app.

 

This worked for me ---one of the fun things of free code!!!!

 

 

TIP 2: Project won't run and get message below:

> > getting this message when trying to run my gae/j app in Eclipse:
 Usage: <dev-appserver> [options] <war directory> 
Options:  
  --help, -h                 Show this help message and exit.
  --server=SERVER            The server to use to determine the latest
  -s SERVER                   SDK version.
  --address=ADDRESS          The address of the interface on the local machine
  -a ADDRESS                  to bind to (or 0.0.0.0 for all   interfaces).
 --port=PORT                The port number to bind to on the local machine.
 -p PORT
 --sdk_root=root            Overrides where the SDK is located.
 --disable_update_check     Disable the check for newer SDK versions.

 

Problem ---somehow your launch configuration that Eclipse created got in a bad state (how? who knows)

Solution --- remove it --

1) go to Right click on project->Run As ->Run cofigurations

2) Select offending project and click red x at top to remove configruation (see image below)

3) Re-run (will generate new configuration)

 

 

remove launch config for project

 

Tip 3: Setup issue and Eclipse complaining about running with JRE not JDK

Depending on your installation of Elcipse you may or may not get a message when trying to deplopy a google app engine app that says something like:

"java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE." .....meaning Eclipse is runing iwht the JRE not the JDK

 

 

SOLUTION:

  • edit my eclipse.ini file, add the -vm switch with the path to the jdk bin YOU want eclipse to run under (you must have installed the JDK in some directory on your compluter)
  • EXAMPLE (NOTE the location and version of your JDK will be different and YOU need to know what it is)
    -vm
    C:\Program Files\Java\jdk1.6.0_38\bin\javaw.exe

Related Links



© Lynne Grewe