Installing ORDS 3.0 (Early adopter) in Weblogic.
Now the Oracle REST Data Services 3.0 Early Adopter is available, let us have a look how it’s to be installed in Weblogic 12c!
I’ve ommitted the installation or upgrade of Apex here as there is plenty of documentation on that topic, and the ORDS can be applied for other uses than being an Apex Listener since v2.0.4.
Installing ORDS
Note: the installation of ORDS 2.0.10 (the latest 2.x version) is similar if not identical to the 3.0 installation. So you can use this tutorial for 2.0.x also.
Download the Application Express and ORDS 3.0 installer from the Oracle site. Unzip them.
ORDS is packaged with a java program called ords.war, which contains a lot of tools for ORDS installation.
As a prerequisite for use for deployment of Apex in combination with ORDS in Oracle Weblogic, a file needs to be created that contains all the references to the static content of Application Express (images and javascript). It does not package the images directory, but instead creates a pointer to the directory location of the images. So you have to keep the files on disk and available for weblogic!
For this we use the “static” feature of ords.war:
[oracle@wls ords]$ java -jar ords.war static /u01/app/oracle/apex426/apex/images/
Dec 22, 2014 5:40:51 AM oracle.json.ords.SodaShared startup
INFO: Starting up ORDS JSON service
WAR Generation complete
WAR location : /home/oracle/Downloads/ords/i.war
Context path : /i
Static resources : /home/oracle/Downloads/apex426/apex/images/
Ensure the static resources are available at path: /u01/app/oracle/apex426/apex/images/
on the server where the WAR is deployedDec 22, 2014 5:40:51 AM oracle.json.ords.SodaShared shutdown
INFO: Shutting down ORDS JSON service
[oracle@wls ords]$ ls -ltr
total 45144
drwxr-xr-x. 3 oracle dba 4096 Dec 9 07:58 docs
-rw-r–r–. 1 oracle dba 18138 Dec 9 08:03 readme.html
drwxr-xr-x. 5 oracle dba 4096 Dec 9 08:03 examples
drwxr-xr-x. 2 oracle dba 4096 Dec 22 04:55 params
-rw-r–r–. 1 oracle dba 46180389 Dec 22 04:56 ords.war
drwxr-xr-x. 3 oracle dba 4096 Dec 22 04:56 conf
-rw-r–r–. 1 oracle dba 0 Dec 22 04:57 derby.log
drwxr-xr-x. 2 oracle dba 4096 Dec 22 04:57 logs
-rw-r–r–. 1 oracle dba 1292 Dec 22 05:40 i.war
[oracle@wls ords]$
When running the command, you might think an error was returned. As you see in the output above, that is not true. A file called i.war is created.
Run the command
java -jar ords.war
You’re guided through a wizard where the database credentials for your Apex database are requested. I didn’t use the RESTful services database accounts, so I choose to skip that step. Final step is the question if you want to run the service standalone. Choose No, because that is not a wise option for production environments.
Now you have 2 files, i.war and ords.war. These two files can be deployed to the weblogic server. Go to your Weblogic console and deploy the two files as applications, with the option “Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor.”.
In 11g, the documentation states to update the Weblogic config.xml (in the DOMAIN_HOME/config dir) and add the following line right above the </security-configuration> endtag:
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
I’ve tried that option in WebLogic Server Version: 12.1.3.0.0, and received an error message that the option was not allowed when restarting the server. Without this option the ORDS also works in 12c.
If you want another name for the URL where apex is available, choose another name for the ORDS deployment. Default your Apex URL will be http://host:port/ords/f?p=111:1. The bold part is the name of the deployment.
Conclusion
Although installing ORDS 3.0 EA is similar to ORDS 2.x, the installation guide has become a whole lot more comprehensive since v2.x. Configuration of ORDS is no more than creating an images reference war (i.war) and deploying two warfiles (i.war and ords.war). No additional setup was needed for ORDS to work with Application Expres 4.2.6.
Overzicht blogs
Geen reacties
Geef jouw mening
Reactie plaatsenReactie toevoegen