Friday, March 29, 2019

Where are my static application files of Oracle APEX?

Ever got the error that there's an issue with your environment because the Application Express files have not been loaded when you try to open Oracle APEX in your environment?


Since the Announcement of the availability of Oracle APEX Static Resources on a Content Delivery Network I typically configure APEX to use the CDN.

Steps to do so for the entire environment:
  • Navigate to the apex/utilities subdirectory from the directory you unzipped APEX to
  • Connect to your database as the SYS user
  • Run:  @reset_image_prefix.sql
  • when prompted for the image prefix, enter the correct path, e.g. https://static.oracle.com/cdn/apex/18.2.0.00.12/
Now, when I got the above error, I forgot which images folder APEX was using. Was there an issue with the connection to the CDN, was it a local issue?

Below is how I found out how the APEX images directory was configured and if it was using the CDN or local files.
Connect as SYS in a SQL window (SQLcl, SQL Developer, SQL Plus, ...):

SQL> set serveroutput on
SQL> begin
  2  dbms_output.put_line(apex_180100.wwv_flow_image_prefix.g_image_prefix);
  3  end;
  4  /
/i/

PL/SQL procedure successfully completed.

SQL> begin
  2  dbms_output.put_line(apex_180200.wwv_flow_image_prefix.g_image_prefix);
  3  end;
  4  /
https://static.oracle.com/cdn/apex/18.2.0.00.12/

PL/SQL procedure successfully completed.

Above you see that in APEX 18.1 the /i/ directory is used on the local web server.
On APEX 18.2 the CDN is being used.

Note: whenever you run the above command change to the correct APEX user (version), so for APEX 19.1 you use apex_190100.

4 comments:

Peter van Garsel said...

This procedure terminates this error message when trying to run apex 19.2

There is a problem with your environment because the Application Express files are not up-to-date! The files for version 19.1.0.00.15 have been loaded, but 19.2.0.00.18 is expected. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide.

thx Peter

Pablo A Céspedes said...

I have the same problem

Ashish Sahay said...

Hey There,

Is there a way to change the image path mapping with /i/ ?

e.g.

/i/ is mapped with /user/01/apex/images/

now can we change this path as below

/i/ is mapped with /user/02/apex/images/

Anonymous said...

Hi there,

I want to know that as Oracle Apex offers CDN for static contents, does Oracle allow us to host these static files to our own/free CDN servers for personal projects?

Thanks,