Deploying Oracle Rest Data Services (ORDS) on WebLogic

A web listener is needed in order to run Oracle APEX. Oracle Rest Data Services (ORDS), formerly called the APEX listener, is a great option for the web listener. This article details the configuration and deployment of ORDS on Oracle WebLogic Server.
This article assumes that WebLogic has been successfully installed. See our previous posts for steps in configuring WebLogic.
Relevant Topics: Oracle DBA, Oracle WebLogic, Managed Server, Oracle APEX, Oracle Rest Data Services, ORDS, Oracle Database Development
- Download and unzip Oracle ORDS. This will create a file named ords.war.
- Change to the directory where ORDS was unzipped and run the command:
java -jar ords.war
The following information will be entered.
- A location to store the ORDS configuration data
- The name of the database server
- The database listen port
- The database service name or SID
- The database password for ORDS_PUBLIC_USER. This user was created during the APEX installation on the database. See our previous post on installing APEX.
- Enter “1” when the following displays: Since APEX will be used, “Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.”
- The password for APEX_PUBLIC_USER. This user was created during the APEX installation on the database.
- Enter “1” to specify the passwords for APEX_LISTENER and APEX_REST_PUBLIC_USER. These users were also created during APEX installation on the database.
- Enter “2” to exit.
[oracle@Forge ords]$ pwd
/u01/app/ords
[oracle@Forge ords]$ java -jar ords.war
This Oracle REST Data Services instance has not yet been configured.
Please complete the following prompts
Enter the location to store configuration data:/apps/ords_config
.
.
.
Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2
[oracle@Forge ords]$
- Copy the images from the APEX installation to a location on the server hosting WebLogic.
For example,
/apps/apex_images/images
- Run the following command from the same directory as the previous command. This will create a file named i.war which will be deployed on WebLogic. The i.war file will contain references to the location of the APEX images from above.
java -jar ords.war static <location of the APEX images>
[oracle@Forge ords]$ java -jar ords.war static /apps/apex_images/images
WAR Generation complete
WAR location : /u01/app/ords/i.war
Context path : /i
Static resources : /apps/apex_images/images
Ensure the static resources are available at path: /apps/apex_images/images
on the server where the WAR is deployed[oracle@Forge ords]$
- Log into the WebLogic Admin Console.
Enter a change session by selecting “Lock & Edit” from the left side. Select Deployments from the left hand side.
- The Summary of Deployments screen displays.
Click Install.
- The Install Application Assistant screen displays.
Enter the location of the ords.war file.
Click Next.
- The Install Application Assistant – Choose targeting style screen displays.
Select “Install this deployment as an application”.
Click Next.
- The Install Application Assistant – Select deployment targets screen displays.
Select the managed server on which ORDS will be deployed (non-Admin Server).
Click Next.
- The Install Application Assistant – Optional settings screen displays.
Select the following:
Name: ords
Security: Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor.
Source Accessibility: Use the defaults defined by the deployment's targets
Plan Source Accessibility: Use the same accessibility as the application
Click Next.
- The Install Application Assistant – Review your choices screen displays.
Additional Configurations: Yes, take me to the deployment's configuration screen.
Click Finish.
- The Settings for ORDS screen displays.
Click Save.
- The screen indicates that the settings have been saved.
- Deploy i.war using the same steps used to deploy ords.war.
- First go back to the Summary of Deployments screen by clicking Deployments.
Click Install.
- The Install Application Assistant screen displays.
Enter the location of the i.war file – or select i.war.
Click Next.
- The Install Application Assistant – Choose targeting style screen displays.
Select “Install this deployment as an application”.
Click Next.
- The Install Application Assistant – Select deployment targets screen displays.
Select the managed server on which ORDS including i.war will be deployed (non-Admin Server).
Click Next.
- The Install Application Assistant – Optional settings screen displays.
Select the following:
Name: i
Security: Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor.
Source Accessibility: Use the defaults defined by the deployment's targets
Plan Source Accessibility: Use the same accessibility as the application
Click Next.
- The Install Application Assistant – Review your choices screen displays.
Additional Configurations: Yes, take me to the deployment's configuration screen.
Click Finish.
- The Settings for i screen displays.
Click Save
- The screen indicates that the settings have been saved.
Click Activate Changes.
- The screen indicates that the changes have been activated.
- In order for the installation to operate properly, the WebLogic default behavior of intercepting all HTTP Basic Authentication challenges must be changed. Go to the server and edit the config.xml file. This file can usually be found in:
$MW_HOME/user_projects/domains/<domain_name>/config/config.xml
Find the <security-configuration> element and add the following to it:
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
For example:
<security-configuration>
.
.
.
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
</security-configuration>
.
.
.
- Now, start the ORDS and I applications that were deployed.
Select Deployments and then select the Control tab.
Select the check box next to i and ords. Select Start and Servicing all requests.
- The Start Application Assistant – Start Deployments screen displays.
Click Yes.
- Both ords.war and i.war are now deployed with a State of “Active”.
- ORDS is now configured to work with APEX. Access APEX with the port to the managed server on which ords.war and i.war were installed and use ords as the context path.
For example:
https://anewserver.com:7006/ords/
