This is short guide on how to run standalone Oracle APEX Listener 2.0 beta with Oracle 11g XE. I’m using Oracle Enterprise Linux 5.7 for running Oracle APEX Listener and Oracle Database 11g XE with APEX 4.1.1. Although running APEX Listener standalone is not supported I'm using it to run several internal applications for company needs.
When using APEX Listener with Oracle XE, APEX won't work properly and white screen appears when APEX is open. This is because the APEX images are stored in the XML DB repository, but APEX Listener have to be run with parameter --apex-images pointing to directory containing the images at the filesystem. To solve this I downloaded the latest patch of APEX and copied the images from the patch.
If you have another database running on the same machine, keep in mind this.
Install Oracle 11g XE and update Oracle APEX to latest version:
Download Oracle Database Express Edition 11g Release 2 for Linux x64
Install Oracle 11g XE:
rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
Configure Express Edition:
Update APEX to 4.1
Download APEX 4.1
unzip -q apex_4.1.zip
sqlplus / as sysdba
@apexins SYSAUX SYSAUX TEMP /i/
- Update APEX to version 4.1.1
Download patch set 13331096 from MOS
Disable Oracle XML DB HTTP server:
SQL> EXEC DBMS_XDB.SETHTTPPORT(0); PL/SQL procedure successfully completed. SQL> COMMIT; Commit complete. SQL> SELECT DBMS_XDB.GETHTTPPORT FROM DUAL; GETHTTPPORT ----------- 0
Run apxpatch.sql to patch the system:
Update the Images Directory When Running the Embedded PL/SQL Gateway:
@apxldimg.sql /tmp/patch Commit complete.
Once the update finished do not enable Oracle XML DB HTTP server, because we’ll be using Oracle APEX Listener, which will setup next.
Install APEX Listener 2.0.0
Download Oracle APEX Listener 2.0.0 beta
Download and install latest JRE 1.6 version, currently latest version is 1.6.34
Unpack to /opt/jre1.6.0_34
Unlock and set password for apex_public_user at the Oracle XE database:
alter user APEX_PUBLIC_USER account unlock;
alter user APEX_PUBLIC_USER identified by secret;
Patch Oracle APEX to support RESTful Services:
sqlplus / as sysdba @catpatch.sql
Set passwords for both users APEX_LISTENER and APEX_REST_PUBLIC_USER.
- Install Oracle APEX Listener:
Now this is tricky, for XE edition the images are kept in the XML DB repository, so images have to be copied from the patch to the listener home:
cp /tmp/patch/images .
- Configure Oracle APEX Listener:
Set APEX listener config dir:
java -jar apex.war configdir $PWD/config
Configure the listener:
java -jar apex.war
Once configuration is complete, listener is started. It has to be stopped and run with appropriate parameters, use Ctrl-C to stop it.
- Finally start the listener:
java -jar apex.war standalone --apex-images /oracle/apxlsnr/images
In case you want to run it in background here’s how to do it:
nohup java -jar apex.war standalone --apex-images /oracle/apxlsnr/images > apxlsnr.log &
Periodically I was seeing exceptions like these:
Caused by: oracle.ucp.UniversalConnectionPoolException: Universal Connection Pool already exists in the Universal Connection Pool Manager. Universal Connection Pool cannot be added to the Universal Connection Pool Manager
I found that if APEX Listener is not configured with RESTful Services then these messages appeared in the log and could be safety ignored.