How to Fix ‘Application Express files have not been loaded’ in Oracle APEX (EPG)

If you are setting up Oracle APEX and find yourself staring at a screen complaining that your “Application Express files have not been loaded,” you are not alone. This is a classic configuration hurdle, especially when using the Embedded PL/SQL Gateway (EPG).

In this post, we’ll walk through a specific scenario (Oracle 19c, APEX 18.2, Oracle Linux) where standard fixes fail, identify the root cause, and provide a step-by-step resolution plan.

The Problem: Images Directory Missing Error

You have just installed or cloned an Oracle APEX environment. However, when you try to hit the login pages at http://<server-IP>:8087/apex/apex_admin or /apex, you are greeted with a broken UI and the following error:

There is a problem with your environment because the Application Express files have not been loaded.

Please verify that you have copied the images directory to your application server as instructed in the Installation Guide.
In addition, please verify that your image prefix path is correct.
Your current path is /i/ (it should contain both starting and ending forward slashes, such as the default /i/).
Use the SQL script reset_image_prefix.sql if you need to change it.

Common (But Unsuccessful) Remediation Attempts

If you’ve already started Googling, you might have tried the following common fixes without success:

  • Checking the OS Files: You found that $ORACLE_HOME/apex/images was empty, so you copied the folder over from a working Oracle Home. (Result: Issue persists)
  • Resetting the Image Prefix: You ran @/apex/utilities/reset_image_prefix.sql from SQL*Plus. (Result: Script succeeds, but issue persists)
  • Updating XML DB Anonymous Access: You ran the PL/SQL block utilizing DBMS_XDB.cfg_update to set allow-repository-anonymous-access to true. (Result: Config updated, but issue persists)

The Root Cause: Why Standard Fixes Failed

The key clue in this scenario is the port number: 8087.

If you are connecting directly to the database port without an intermediate web server like Tomcat (running ORDS) or Oracle HTTP Server, you are using the Embedded PL/SQL Gateway (EPG).

When using EPG, the database listener serves the web pages directly from the Oracle XML DB. Therefore, simply copying the /images folder into the OS file system ($ORACLE_HOME/apex/images) does absolutely nothing. The static files (CSS, JS, images) must be physically loaded into the database’s XML DB repository.

The previous fixes you ran only corrected metadata and access permissions, but they couldn’t serve files that hadn’t been loaded into the database yet.

The Step-by-Step Resolution Plan

To fix this, we need to load the images into the database repository and ensure the listener is configured to serve them.

Step 1: Load Images into the XML DB Repository

Oracle provides a specific script to load the OS files into the database repository for EPG.

  1. Open your terminal and navigate to your apex installation directory.
  2. Log into SQL*Plus as SYSDBA.
  3. Run the apxldimg.sql script.

🚨 CRITICAL WARNING: You must pass the parent directory of the apex folder as the parameter, not the apex directory itself!

cd $ORACLE_HOME/apex
sqlplus / as sysdba
-- Example: If your apex folder is located at /u01/app/oracle/product/19.0.0/dbhome_1/apex
-- You pass the parent directory: /u01/app/oracle/product/19.0.0/dbhome_1
SQL> @apxldimg.sql /u01/app/oracle/product/19.0.0/dbhome_1

Note: This script takes several minutes to run as it is loading thousands of static files into the database.
If you have a CDB database, ensure that you are login to the PDB, before running the script.

Step 2: Verify XDB HTTP Port Binding

Next, ensure the database listener is actually configured to serve the XML DB on the port you are trying to access (8087).

sqlplus / as sysdba
-- Check the current port setting:
SQL> SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
-- If it returns 0 or the wrong port, set it to 8087:
SQL> EXEC DBMS_XDB.SETHTTPPORT(8087);
SQL> ALTER SYSTEM REGISTER;

Step 3: Validate Shared Servers / Dispatchers

The Embedded PL/SQL Gateway requires shared servers to be configured in the database to route HTTP traffic. If dispatchers aren’t running, your browser will never reach the APEX engine.

sqlplus / as sysdba
-- Check your current dispatcher settings:
SQL> show parameter dispatchers;
-- The expected output should include a protocol and service, like:
-- (PROTOCOL=TCP) (SERVICE=<your_sid>XDB)
-- If the parameter is empty, configure it (replace <your_sid> with your actual database SID):
SQL> ALTER SYSTEM SET DISPATCHERS='(PROTOCOL=TCP) (SERVICE=<your_sid>XDB)' SCOPE=BOTH;
SQL> ALTER SYSTEM REGISTER;

Summary

When troubleshooting missing APEX resources, always verify your web server architecture first. If you are using EPG (direct database HTTP access), OS-level file copies won’t cut it. You must use apxldimg.sql to push those files into the XML DB repository.

Once those files are loaded and your dispatchers are active, a quick refresh of your browser should finally reveal the beautifully styled Oracle APEX login screen!

(Note: If you plan to use Oracle REST Data Services (ORDS) on Tomcat/WebLogic instead of EPG, you would skip Step 1 and instead copy the $ORACLE_HOME/apex/images folder to your application server’s webapps/i directory).

Leave a Reply