In this short tutorial, I’ll show you how to configure EBS and APEX Environment to develop EBS extended Applications with APEX.

This guide is focused on Windows. It’ll let you set up the EBS Vision OCI instance Image on Oracle Cloud (v. 12.2.10 is recommended). It’ll show you how to give access to Weblogic and configure Firefox to access EBS. It’s worth pointing out that ESR is too old for APEX builder, but APEX apps can still be run. 

The article will also take you through the installation of APEX and ORDS – the latter will be standalone with a script to run in the background. That is a “supported option” for EBS 12.2. Finally, you’ll configure the supported schema for APEX to use alongside EBS.

Important: This guide switches between SU and Oracle users. There is not a lot of OPC login unless it’s with the sudo command. Be careful who you are logged in as.

Tools

SQLPlus

At some points after installation, you might need to run SQLPlus – to do this – you must run both of these commands.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo -i -u oracle
. /u01/install/APPS/19.0.0/ebscdb_apps.env
sqlplus / as sysdba
sudo -i -u oracle . /u01/install/APPS/19.0.0/ebscdb_apps.env sqlplus / as sysdba
sudo -i -u oracle
. /u01/install/APPS/19.0.0/ebscdb_apps.env
sqlplus / as sysdba

DB start-up and shutdown

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo -i -u oracle
sh /u01/install/APPS/scripts/stopdb.sh
sh /u01/install/APPS/scripts/startdb.sh
sudo -i -u oracle sh /u01/install/APPS/scripts/stopdb.sh sh /u01/install/APPS/scripts/startdb.sh
sudo -i -u oracle
sh /u01/install/APPS/scripts/stopdb.sh
sh /u01/install/APPS/scripts/startdb.sh

EBS and APEX Environment – setup instructions

1. Install EBS on OCI Cloud Compute by following this exact guide

However, don’t do step 3.10 (Enable Oracle E-Business Suite Integrated SOA Gateway for REST Services) and step 4.6 outlined there.

Windows hosts should be:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
my.public.ip.goes.here change to exact.url.eg.vcnplcinternalv.oraclevcn.com
my.public.ip.goes.here myapps.example.com
my.public.ip.goes.here apps.example.com
my.public.ip.goes.here change to exact.url.eg.vcnplcinternalv.oraclevcn.com my.public.ip.goes.here myapps.example.com my.public.ip.goes.here apps.example.com
my.public.ip.goes.here change to exact.url.eg.vcnplcinternalv.oraclevcn.com 
my.public.ip.goes.here myapps.example.com
my.public.ip.goes.here apps.example.com

2. Download Firefox “Firefox Setup 52.9.0esr.exe” and install it to a custom ESR folder (do not overwrite your existing folder)

However, don’t immediately run it after the installation. Instead, install Java “jdk-8u121-windows-i586.exe”. It will allow you to install the Firefox Add-Ons required for EBS.

3. Click Windows > Start > Configure Java

Click Security Tab and add the following to the Exception Site List:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
http://exact.url.eg.vcnplcinternalv.oraclevcn.com
http://exact.url.eg.vcnplcinternalv.oraclevcn.com:8000
http://myapps.example.com
http://myapps.example.com:8000
http://apps.example.com
http://apps.example.com:8000
http://exact.url.eg.vcnplcinternalv.oraclevcn.com http://exact.url.eg.vcnplcinternalv.oraclevcn.com:8000 http://myapps.example.com http://myapps.example.com:8000 http://apps.example.com http://apps.example.com:8000
http://exact.url.eg.vcnplcinternalv.oraclevcn.com 
http://exact.url.eg.vcnplcinternalv.oraclevcn.com:8000
http://myapps.example.com
http://myapps.example.com:8000
http://apps.example.com
http://apps.example.com:8000

Add the following to Windows hosts:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
127.0.0.1 www.mozilla.org
127.0.0.1 download.cdn.mozilla.net
127.0.0.1 aus5.mozilla.org
127.0.0.1 download.mozilla.org
127.0.0.1 www.mozilla.org 127.0.0.1 download.cdn.mozilla.net 127.0.0.1 aus5.mozilla.org 127.0.0.1 download.mozilla.org
127.0.0.1 www.mozilla.org
127.0.0.1 download.cdn.mozilla.net
127.0.0.1 aus5.mozilla.org
127.0.0.1 download.mozilla.org

4. Run Firefox ESR

Block automatic updates in Firefox. Then go to Add Ons > Enable all Java Addons and check/bookmark EBS in ESR.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apps.example.com:8000/OA_HTML/AppsLocalLogin.jsp
apps.example.com:8000/OA_HTML/AppsLocalLogin.jsp
apps.example.com:8000/OA_HTML/AppsLocalLogin.jsp

5. In OCI, follow the steps similar to the ones outlined here to add an Ingress 7001 port

Follow this guide to allow traffic to Web Logic. The config.xml file you need to edit is found in:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/u01/install/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain/config
/u01/install/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain/config
/u01/install/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain/config

To edit it, set up WinSCP in this way:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Protocol > SCP
Hostname > Public IP of instance
User > OPC
Password > BLANK
Advanced > SSH > Authentication > Private Key File > your private key file
Advnaced > SCP/Shell > Shell > sudo su -
Protocol > SCP Hostname > Public IP of instance User > OPC Password > BLANK Advanced > SSH > Authentication > Private Key File > your private key file Advnaced > SCP/Shell > Shell > sudo su -
Protocol > SCP
Hostname > Public IP of instance
User > OPC
Password > BLANK


Advanced > SSH > Authentication > Private Key File > your private key file
Advnaced > SCP/Shell > Shell > sudo su -

Once connected, edit the file linked above to change the deny to allow as per the guide mentioned above.

Add port 7001 to the firewall – see below:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo su -
firewall-cmd --add-port=7001/tcp --permanent
systemctl restart firewalld
sudo su - firewall-cmd --add-port=7001/tcp --permanent systemctl restart firewalld
sudo su - 
firewall-cmd --add-port=7001/tcp --permanent
systemctl restart firewalld

Restart apps:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo -i -u oracle
cd /u01/install/APPS/scripts
sh stopapps.sh
sh startapps.sh
sudo -i -u oracle cd /u01/install/APPS/scripts sh stopapps.sh sh startapps.sh
sudo -i -u oracle
cd /u01/install/APPS/scripts
sh stopapps.sh
sh startapps.sh

Check/Bookmark Weblogic in ESR

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apps.example.com:7001/console
apps.example.com:7001/console
apps.example.com:7001/console

If the above doesn’t work, try to find the URL using this command:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ps aux | grep weblogic
ps aux | grep weblogic
ps aux | grep weblogic

User/pass is weblogic/welcome1 (unless you changed it in step 4.4.e).

6. Download APEX

Ensure you’re still logged in as Oracle or use:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo -i -u oracle
sudo -i -u oracle
sudo -i -u oracle

Then use the following command:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
cd /home/oracle
wget https://download.oracle.com/otn_software/apex/apex-latest.zip
cd /home/oracle wget https://download.oracle.com/otn_software/apex/apex-latest.zip
cd /home/oracle
wget https://download.oracle.com/otn_software/apex/apex-latest.zip

And follow the APEX installation instructions outlined here.

It may display an error at the end. If that happens, check files:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/home/oracle/apex/apexins_cdb0.log
/home/oracle/apex/apexins_cdb1.log
/home/oracle/apex/apexins_cdb0.log /home/oracle/apex/apexins_cdb1.log
/home/oracle/apex/apexins_cdb0.log
/home/oracle/apex/apexins_cdb1.log

If it comes back with the following error, it can be ignored.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Application Express installation requires the Oracle XML Database database component.
Application Express installation requires the Oracle XML Database database component.
Application Express installation requires the Oracle XML Database database component.

You can check if XDB is installed anyway by running the SQL code below. I think it failed the reattempts by installing XDB in a second installation phase.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
select comp_id,
schema,
version,
status
from sys.dba_registry
where comp_id = 'XDB'
order by comp_id
select comp_id, schema, version, status from sys.dba_registry where comp_id = 'XDB' order by comp_id
  select comp_id,
         schema,
         version,
         status
    from sys.dba_registry
   where comp_id = 'XDB'
order by comp_id

It should be one row as above.

Finally, in SQLPus unlock the APEX_PUBLIC_USER account (more information here).

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alter user APEX_PUBLIC_USER account unlock;
alter user APEX_PUBLIC_USER account unlock;
alter user APEX_PUBLIC_USER account unlock;

7. Prepare APEX images.

In WinSCP make a folder /u01/software/apex (as suggested by Oracle Base). 

Find the /home/oracle/apex/images folder and then right-click and copy on the folder name.

Go back to /u01/software/apex and paste it so that the full folder name is /u01/software/apex/images.

Now, install by running

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo su -
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm
rpm -ivh jdk-17_linux-x64_bin.rpm
java -version
sudo su - wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm rpm -ivh jdk-17_linux-x64_bin.rpm java -version
sudo su -
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm
rpm -ivh jdk-17_linux-x64_bin.rpm
java -version

The last step (above) just verifies the installation, it should report Java 17. As an OPC user (log out of Oracle/Root by typing exit user if you’re still in), run the following:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo yum install ords
sudo yum install ords
sudo yum install ords

And then configure it (go back in as SU).

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo su -
ords --config /etc/ords/config install
sudo su - ords --config /etc/ords/config install
sudo su -
ords --config /etc/ords/config install

Use the following configuration:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Installation Type > Choose option [2] Enter
Connection Type > Choose option [1] Enter
host name > Enter
listen port > Enter
service name > ebsdb
administrator username > SYS
password > [enter SYS password]
default tablespace > Enter
temp tablespace > Enter
features > Enter
Start ORDS > [1] Enter <-- Standalone Mode
protocol > [1] < http
port > [1] <-- 8080
Static Resources > /u01/software/apex/images <-- from step above
Installation Type > Choose option [2] Enter Connection Type > Choose option [1] Enter host name > Enter listen port > Enter service name > ebsdb administrator username > SYS password > [enter SYS password] default tablespace > Enter temp tablespace > Enter features > Enter Start ORDS > [1] Enter <-- Standalone Mode protocol > [1] < http port > [1] <-- 8080 Static Resources > /u01/software/apex/images <-- from step above
Installation Type > Choose option [2] Enter
Connection Type > Choose option [1] Enter
host name > Enter
listen port > Enter
service name > ebsdb
administrator username > SYS
password > [enter SYS password]
default tablespace > Enter
temp tablespace > Enter
features > Enter
Start ORDS > [1] Enter <-- Standalone Mode
protocol > [1] < http
port > [1] <-- 8080
Static Resources > /u01/software/apex/images <-- from step above

ORDS will then install and configure. It will take around 1-2 minutes, and finally load:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
2022-12-22T10:28:39.079Z INFO Oracle REST Data Services initialized
Oracle REST Data Services version : 22.4.0.r3401044
Oracle REST Data Services server info: jetty/10.0.12
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 17.0.5+9-LTS-191
2022-12-22T10:28:39.079Z INFO Oracle REST Data Services initialized Oracle REST Data Services version : 22.4.0.r3401044 Oracle REST Data Services server info: jetty/10.0.12 Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 17.0.5+9-LTS-191
2022-12-22T10:28:39.079Z INFO        Oracle REST Data Services initialized
Oracle REST Data Services version : 22.4.0.r3401044
Oracle REST Data Services server info: jetty/10.0.12
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 17.0.5+9-LTS-191

At any time, if ORDS stops running (for example, due to an accidental Ctrl+C), it can be restarted by using this command:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo su -
ords --config /etc/ords/config serve
sudo su - ords --config /etc/ords/config serve
sudo su -
ords --config /etc/ords/config serve

In OCI, follow the steps similar to the ones outlined here to add an Ingress 8080 port. Then add port 8080 to the firewall.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo su -
firewall-cmd --add-port=8080/tcp --permanent
systemctl restart firewalld
sudo su - firewall-cmd --add-port=8080/tcp --permanent systemctl restart firewalld
sudo su - 
firewall-cmd --add-port=8080/tcp --permanent
systemctl restart firewalld

Then try it out:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apps.example.com:8080/ords
apps.example.com:8080/ords
apps.example.com:8080/ords

Running standalone is not ideal. Therefore you’ll need to go through the next step.

8. Configure ORDS as a service

To do this, we will take the ideas from the Oracle Base blog on this subject. Go through the following steps:

  • Ctrl+C in putty to quit ORDS
  • In WinSCP, create a folder /home/oracle/scripts
  • Enter the folder and then Right-Click > New File
  • Create a file named start_ords.sh containing this:
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
export _JAVA_OPTIONS="-Xms1126M -Xmx1126M"
LOGFILE=/home/oracle/logs/ords-`date +"%Y""%m""%d"`.log
nohup ords --config /etc/ords/config serve >> $LOGFILE 2>&1 &
echo "View log file with : tail -f $LOGFILE"
export _JAVA_OPTIONS="-Xms1126M -Xmx1126M" LOGFILE=/home/oracle/logs/ords-`date +"%Y""%m""%d"`.log nohup ords --config /etc/ords/config serve >> $LOGFILE 2>&1 & echo "View log file with : tail -f $LOGFILE"
export _JAVA_OPTIONS="-Xms1126M -Xmx1126M"
LOGFILE=/home/oracle/logs/ords-`date +"%Y""%m""%d"`.log
nohup ords --config /etc/ords/config serve >> $LOGFILE 2>&1 &
echo "View log file with : tail -f $LOGFILE"

Important: You have to do it this way (i.e through WinSCP) as creating/uploading from the Windows notepad corrupts the file (TBC. It might work via VSCode + LF)

Now, Right-Click>New File, then Create a file named stop_ords containing the following:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
kill `ps -ef | grep [o]rds.war | awk '{print $2}'`
kill `ps -ef | grep [o]rds.war | awk '{print $2}'`
kill `ps -ef | grep [o]rds.war | awk '{print $2}'`

Upload the two files in WinSCP to /home/oracle/scripts.

You can run the start script now. When you decide to do so, log on as SU:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo su -
And then run them like this:
sh /home/oracle/scripts/start_ords.sh
sh /home/oracle/scripts/stop_ords.sh
sudo su - And then run them like this: sh /home/oracle/scripts/start_ords.sh sh /home/oracle/scripts/stop_ords.sh
sudo su -
And then run them like this:
sh /home/oracle/scripts/start_ords.sh
sh /home/oracle/scripts/stop_ords.sh

9. Before logging in, change the Internal Admin Workspace password

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
cd /home/oracle/apex
cd /home/oracle/apex
cd /home/oracle/apex

Then in surplus, run the following from a local machine:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alter session set container ="ebsdb" from server
alter session set container ="ebsdb" from server
alter session set container ="ebsdb" from server

Important: This is experimental. You have to run from your local machine (not the terminal) because the server logs in to a PDB which the local machine doesn’t.

For this (i.e local machine approach), you need TNS names:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
EBSVISION=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apps.example.com)(PORT = 1521))
)
(CONNECT_DATA =
(SID = ebsdb)
)
)
EBSVISION= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = apps.example.com)(PORT = 1521)) ) (CONNECT_DATA = (SID = ebsdb) ) )
EBSVISION=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = apps.example.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ebsdb)
    )
  )

Then connect as SYS (using either the experimental or local approach) and run:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
@apxchpwd.sql
@apxchpwd.sql
@apxchpwd.sql

Then at the prompt:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Administrators Username > Enter
Administrators Email > [ADMIN] Enter
Administrators Password > Type a Complex Password
Administrators Username > Enter Administrators Email > [ADMIN] Enter Administrators Password > Type a Complex Password
Administrators Username > Enter
Administrators Email > [ADMIN] Enter
Administrators Password > Type a Complex Password

After that, try logging in at:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apps.example.com:8080/ords
Workspace > INTERNAL
Username > ADMIN
Password > The Complex Password
apps.example.com:8080/ords Workspace > INTERNAL Username > ADMIN Password > The Complex Password
apps.example.com:8080/ords


Workspace > INTERNAL
Username > ADMIN
Password > The Complex Password

If you cannot log in, then I think it’s PDB related… try the other approach i.e experimental/local approach.

10. Prepare the workspace for supported EBS extension with APEX

We are going to follow these flowcharts, specifically the “Recommended Database Architecture” in the “Supported Schema Usage” section.

First, click Create a Workspace.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Workspace Name: XX_APEX
Existing Schema: No
Schema Name: XX_APEX
Password > A Complex Password
Workspace Name: XX_APEX Existing Schema: No Schema Name: XX_APEX Password > A Complex Password
Workspace Name: XX_APEX
Existing Schema: No
Schema Name: XX_APEX
Password > A Complex Password

Then do the following:

  • Go to Manage Workspaces > Manage Developers and Users > Create / Edit User
  • Find the ADMIN / XX_APEX user and edit them
  • Set Require Change of Password on First Use to No
  • Click Apply Changes
  • Logout

Now, log back in with:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Workspace > XX_APEX
Username > ADMIN
Password > The Complex Password
Workspace > XX_APEX Username > ADMIN Password > The Complex Password
Workspace > XX_APEX
Username > ADMIN
Password > The Complex Password

Conclusion

And that’s it. You are now all set up for Oracle-supported development on EBS. If you want to know how to grant access from APPS to XX_APEX, read this. Also, see Insums’ Up and Running Package with EBS. And of course, check out my other APEX-related articles on the Pretius blog:

  1. Oracle APEX Global Notification messages: An easy way to make them look better
  2. How the Oracle APEX community helps shape the platform’s future
  3. Oracle APEX new features – the low-code platform keeps evolving
  4. Oracle 23c Free Docker, APEX & ORDS – all in one simple guide
  5. Oracle APEX CI/CD: Step-by-step guide aligned to the APEX Application Lifecycle Technical Paper
Share