When you plan to upgrade Oracle Application Express (APEX) from version 5.1.0 to 5.1.1 please be aware to download a patch from MOS instead the 5.1.1 version from OTN.
The text on the OTN page is a bit misleading – and a customer I work with downloaded the wrong version which led to a failed upgrade – even though the scripts seem to be made for this patch upgrade.
Even though the page says “This is a cumulative patch set for Application Express 5.1.0” the page offers you a full install and not the patch for an existing APEX 5.1.0 installation.
See the message in the middle of the page starting with “For existing Application Express 5.1.0 installations, please download … from My Oracle Support.”
The patch you’ll need is available via this download link: patch 25341386