DBA Tips Archive for Oracle
by Jeff Hunter, Sr. Database Administrator
The following article provides the steps necessary to install and verify OC4J (9.0.3) Standalone.
Oracle9iAS Containers for J2EE (OC4J) is a J2EE-compliant application server. Applications residing in OC4J are completely portable and can therefore be deployed to any J2EE-compliant application server.
OC4J is written entirely in Java and can execute on the Java 2 Software Development Kit (J2SE) virtual machine. The latest release of OC4J, 9.0.3, provides a fully J2EE 1.3 certified environment.
The core components (or technology areas) of OC4J (9.0.3) are:
JDBC 2.0 Java Database Connectivity JNDI 1.2 Java Naming and Directory Information Servlet 2.3 Java Servlet API JSP 1.2 JavaServer Pages EJB 2.0 Enterprise JavaBeans RMI-IIOP Remote Method Invocation (RMI) over the OMG IIOP standard JTA 1.0 and JTS Java Transaction Management API and Java Transaction Service JMS 1.0 Java Message Service JavaMail 1.2 Java Mail API JAF 1.0 JavaBeans Activation Framework JAXP 1.1 Java API for XML Processing JAAS 1.0 Java Authentication and Authorization Service JCA 1.0 Java Connector Architecture (Connecting EJBs and enterprise applications)
OC4J is based on technology licensed from Ironflare Corporation, which develops the Orion server--one of the leading J2EE containers. Although OC4J is integrated with the Oracle9iAS infrastructure, the product and some of the documentation still contains some reference to the Orion server.
For development environments or simple business needs, Oracle provides OC4J Standalone - complete with documentation.
For larger environments, Oracle also provides Oracle9iAS Enterprise Edition. This version includes the following software components:
- Oracle HTTP Server
- Oracle9iAS Containers for J2EE
- Oracle9iAS Portal
- Oracle9iAS Reports Services
- Oracle9iAS Discoverer
- Oracle9iAS Clickstream Intelligence
- Oracle9iAS Personalization
- Oracle9iAS Forms Services
- Oracle9iAS Wireless
- Oracle9iAS Web Cache
- Oracle9iAS Unified Messaging
- Oracle9iAS Security
- Oracle Internet Directory
- Oracle Enterprise Manager
OC4J is installed within Oracle9iAS with the goal of managing J2EE enterprise systems. Oracle9iAS Enterprise Edition can manage multiple clustered OC4J processes. When using Oracle9iAS Enterprise Edition, you cannot locally manage your OC4J process using the
admin.jartool or by hand editing a single OC4J process' configuration files.
NOTE: OC4J Standalone is purely for standalone purposes. This version CANNOT be used to replace the OC4J running in ANY existing Oracle9iAS Installation.
You can download the stand-alone version of OC4J from Oracle Technology Network (OTN) at either:
or directly from:
Prerequisites and Environment Variables Settings
Java2 Standard EditionBefore installing OC4J, you will first need to install Java2 Standard Edition release 1.3.1 or 1.4. Java2 Standard Edition (J2SE) can be downloaded from http://java.sun.com.Environment VariablesAfter installing J2SE, ensure to set the following environment variables:
Environment Variable Value JAVA_HOME The location of the Java2 Standard Edition SDK installation. PATH Should include the bin directory of the J2SE SDK.
Installing OC4J 9.0.3 Standalone
The installation of OC4J is nothing more than unzipping the OC4J download file (oc4j_extended.zip) into a directory. For the purpose of this document, assume we want to install OC4J to the
/u01/app/oracle/product/oc4j903directory and set the environment variable $OC4J_HOME to that location:% cd /u01/app/oracle/product % mkdir oc4j903 % cd oc4j903 % mv oc4j_extended.zip /u01/app/oracle/product/oc4j903 % jar -xvf oc4j_extended.zip % rm oc4j_extended.zip % OC4J_HOME=/u01/app/oracle/product/oc4j903; export OC4J_HOMENOTE (Solaris Users) - You will be unable to start or install oc4j when trying to unzip the
oc4j_extended.zipfile using the Solaris unzip utility. If you attempt to use the unzip utility, no execute permissions for any user on the unzipped files and directories will exist. The workaround is:
Use command: jar -xvf oc4j_extended.zip instead of using command unzip.
- or -
Go to $OC4J_HOME and issue command: chmod -R u+x *
The default HTTP web server port is 8888. If there are any conflicts or you want to change the port number, go to the
$OC4J_HOME/j2EE/home/configdirectory. Open the file
http-web-site.xmlfile and change 8888 to another port.
Before starting OC4J, you will need to update the administrative password with the following command from the
$OC4J_HOME/j2ee/homedirectory:% cd $OC4J_HOME/j2ee/home % java -jar oc4j.jar -install Auto-unpacking /db/u01/app/oracle/product/oc4j903/j2ee/home/applications/dms0.war... done. Auto-unpacking /db/u01/app/oracle/product/oc4j903/j2ee/home/applications/dms.war... done. Enter an admin password to use: manager Confirm admin password: manager Installation doneYou will be prompted to enter the password after issuing the command. This command will actually modify the administrative user called "admin". The command will rewrite the
$OC4J_HOME/j2ee/home/config/principal.xmlconfiguration file with the new password for the admin user.
NOTE (Windows Users) - Another OC4J installation problem I have ran into is a missing log and/or persistence directory. If you are unable to start or install OC4J, you may have to manually create the following directories:C:\> mkdir %OC4J_HOME%\j2ee\home\log C:\> mkdir %OC4J_HOME%\j2ee\home\persistence
Starting / Stopping OC4J
To start OC4J, enter the following command from the prompt:% cd $OC4J_HOME/j2ee/home % java -jar oc4j.jarPoint your web browser to the following URL to test the installation of OC4J:http://localhost:8888To stop OC4J, use the -shutdown option of the
admin.jartool. Open another terminal window and enter the following command:% cd $OC4J_HOME/j2ee/home % java -jar admin.jar ormi://localhost admin manager -shutdown
Copyright (c) 1998-2018 Jeffrey M. Hunter. All rights reserved.
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express, prior, written permission. Application to host any of the material elsewhere can be made by contacting me at email@example.com.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate, but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.