IOException: tmpFile.renameTo Failed

On rare occasions, the Google App Engine dev server displays the following error:

The important part of the error is this text:

java.io.IOException: tmpFile.renameTo(classfile) failed

This exception crops up whenever an app file (in this case a JSP file) is currently being accessed by another program. If you see this exception, double check to ensure that the named file isn’t being accessed by another program.

If this error persists, close down and reopen Eclipse and the development app server – the file may have been left open from a previous run.

Whitelisted PHP Extensions

Google App Engine permits only specific whitelisted extensions to be used within PHP applications. If you use a non-whitelisted extension, you’ll see the below error:

The [php_extension_name] extension is missing. 
Please check your PHP configuration.

If you need a certain extension for your PHP application, ensure that it’s enabled in GAE: check the official list at https://developers.google.com/appengine/docs/php/#PHP_Enabled_extensions . If your preferred extension is not listed, you can also try searching for a pure-PHP implementation (Pure PHP extensions can always be uploaded as part of an application; C based extensions must be whitelisted.)

If you need an extension not listed in the above link, you can request it via the App Engine issues tracker. For example, here’s a feature request for the ImageMagick extension: https://code.google.com/p/googleappengine/issues/detail?id=9424

Downloading The Contents Of A MediaWiki Install

Here’s an useful wget command: it downloads a static copy of a MediaWiki installation while skipping unimportant pages, such as the talk sections. Downloading large sites can take a long time, so the nohupinstruction lets this command continue even when the user exits from the shell.

nohup wget --recursive --page-requisites --html-extension \
    --convert-links --no-parent -R "*Special*" -R "*action=*" \
    -R "*printable=*" -R "*title=Talk:*" \
    "http://example.com/example/wiki/path/"

You can use this command to archive old wiki installs, or keep a local copy for quick reference.