A problem sometimes encountered when using Oracle Application Express Listener, is getting a blank page displayed when attempting to access an Oracle Application Express (APEX) page. For example getting a blank page when trying to display
Any of the following can cause this issue to occur:
- Forgetting to deploy
- Specifying an incorrect path when using the
java -jar apex.war staticcommand to generate
- Configuring APEX to use a non default context path for static resources (
/i) and not specifying the same context path (via the
--context-pathoption) when using
java -jar apex.war static.
- Moving, renaming or deleting the folder pointed to by
- When running in Standalone Mode, entering an incorrect path (or skipping specifying a path) when prompted, on the first run of Standalone Mode
- When running in Standalone Mode, entering an incorrect path via the
- And last, the one I most often forget myself, upgrading to a new version of APEX and forgetting to reconfigure and redeploy
i.warto point to the static resources for the new APEX version, or in Standalone Mode forgetting to update the location by using the
Confirming the problem
If you get a
404 Not Found error then you need to double check points 1-6 in the list above,
i.war is not deployed or is not pointing at a folder containing APEX static resources.
Otherwise a plain text file will be displayed with contents like the following:
Application Express Version: 4.2.1
Pay close attention to the version number displayed, it must match the version of APEX deployed on the database. If they differ then check point 7 on the list above, the Listener is not configured to use the correct version of APEX static resources to match the APEX version in the database.
Curing the problem
You can get detailed help on the
static listener command by typing the following at a command prompt:
java -jar apex.war help static
Listener 2.0 picks up changes to APEX static resources immediately
For Listener 1.1.x the deployment process for
i.war required zipping all the APEX static resources into
i.war and then deploying the resultant
The problem with this approach is that if the contents of the APEX static resources are updated (for example to add some custom style sheets), then
i.war needs to be recreated and redeployed.
In 2.0 we leverage capabilities in WebLogic and GlassFish (described in more detail in a previous post) to create an
i.war which does not actually contain the static resources, but instead points to the folder containing the static resources.
The advantage of this approach is that the static resources can be updated and the updates are immediately picked up by the server without requiring any restarting or redeploying of