In this post, I shall talk about deploying HTB with standalone OC4J.
Note: This needs to be done on the web tier in case you have a multi-node installation.
1. Download standalone OC4J from
here. As far as I know, only OC4J versions upto 10.1.2.0.2 are certified with HTB.
2. Unzip the downloaded file to any directory.
3. Install the standalone OC4J using the below command:
$java -jar oc4j.jar –installNote: During the installation, you would be asked the enter the admin username (? - I do not really remember if it asks for admin username. If not, then the default username is admin) and the password. Do remember both as they are needed to stop OC4J.
4. Create a file called custom<$TWO_TASK>.env under APPL_TOP.
#!/bin/sh
OC4J_HOME=<Path_To_OC4J_Directory>
export OC4J_HOME5. Apply the patches 4178883 (Patch 11i.HC_PF.E) and 5178799 (HC_PF: 11I.HC_PF.E ROLLUP 3) and their pre and post requisites.
Note: It is interesting to note that the OC4J_HOME environment variable needs to be set for patches 4178883 and 5178799 to complete successfully since they run Autoconfig and during the Autoconfig run, if the environment variable OC4J_HOME is not set, then it will error with:
Executing script in InstantiateFile:
/oracle/applhtb/htbcomn/admin/install/HTB_dseiq-lab-vm2/ctbjdbc.sh
script returned:
****************************************************
ERRORCODE = 1 ERRORCODE_END
.end std out.
mv: cannot stat `/jdbc/lib/classes12dms.jar': No such file or directory
sed: can't read /tmp/tmp.txt: No such file or directory
mv: cannot stat `/jdbc/lib/nls_charset12.jar': No such file or directory
sed: can't read /tmp/tmp.txt: No such file or directory
cp: cannot create regular file `/jdbc/lib/classes12dms.jar': No such file or directory
sed: can't read /tmp/tmp.txt: No such file or directory
cp: cannot create regular file `/jdbc/lib/nls_charset12.jar': No such file or directory
sed: can't read /tmp/tmp.txt: No such file or directory
6. Perform any post patching steps such as compile apps schema, generate message files and compile flex fields.
7. Copy the htb.ear file to $OC4J_HOME
cp –p $CTB_TOP/java/ear/htb.ear $OC4J_HOME/j2ee/home8. Modify the file $OC4J_HOME/j2ee/home/config/application.xml to update the library paths. Add the following lines:
<library path="<Absolute Path to the $CTB_TOP>"/>
<library path="<Absolute Path to the $JAVA_TOP>"/>
<library path="../../../jdbc/lib/classes12dms.jar"/>9. Verify the ports in the XML config files - Make sure the default ports used in the following files are available in the host, else choose any free port available and edit the files
$OC4J_HOME/j2ee/home/config/rmi.xml
$OC4J_HOME/j2ee/home/config/jms.xml
$OC4J_HOME/j2ee/home/config/http-web-site.xml10. Replace the JDBC library files in /jdbc/lib with the JDBC library files from $JAVA_TOP using the following commands:
mv $OC4J_HOME/jdbc/lib/classes12dms.jar $OC4J_HOME/jdbc/lib/classes12dms.jarO
mv $OC4J_HOME/jdbc/lib/nls_charset12.jar $OC4J_HOME/jdbc/lib/nls_charset12.jarO
cp -p $JAVA_TOP/jdbc14.zip $OC4J_HOME/jdbc/lib/classes12dms.jar
cp -p $JAVA_TOP/nls_charset12.zip $OC4J_HOME/jdbc/lib/nls_charset12.jar11. Edit the file '$OC4J_HOME/j2ee/home/config/data-sources.xml'
Replace the existing <data-source> with the following <data-source>
<data-source class="com.evermind.sql.DriverManagerDataSource"
name="OracleAppsDS"
location="jdbc/OracleAppsCoreDS"
ejb-location="jdbc/OracleAppsDS"
xa-location="jdbc/OracleAppsXADS"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="apps"
password=""
url="jdbc:oracle:thin:@host:port:SID"
inactivity-timeout="30000"
/>
Replace "<appspass>" with the actual apps password and "@HOST:PORT:SID" with "@<real host name>:<DB Port#>:<ORACLESID>.12. Post-install steps for Outbound Message - create a directory htbclient under $OC4J_HOME. $OC4J_HOME/htbclient will now be addressed as $HTBCLIENT.
$ cd $OC4J_HOME
$ mkdir htbclient13. Copy the following jar files into $HTBCLIENT
$ cp -p $OC4J_HOME/j2ee/home/oc4j.jar .
$ cp -p $OC4J_HOME/j2ee/home/oc4jclient.jar .
$ cp -p $OC4J_HOME/j2ee/home/lib/servlet.jar .
$ cp -p $OC4J_HOME/j2ee/home/lib/ejb.jar .
$ cp -p $OC4J_HOME/j2ee/home/lib/jndi.jar .
$ cp -p $OC4J_HOME/j2ee/home/lib/jta.jar .
$ cp -p $OC4J_HOME/j2ee/home/lib/jmxri.jar .
$ cp -p $OC4J_HOME/j2ee/home/lib/jaas.jar .
$ cp -p $OC4J_HOME/diagnostics/lib/ojdl.jar .14. Update the AF_CLASSPATH in $APPL_TOP/admin/adovars.env to point to
AF_CLASSPATH=$HTBCLIENT:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/jre/lib/i18n.jar:$JAVA_TOP/appsborg2.zip:$IAS_HOME/rdbms/jlib/aqapi.jar:$IAS_HOME/rdbms/jlib/jmscommon.jar:$HTBCLIENT/oc4j.jar:$HTBCLIENT/oc4jclient.jar$HTBCLIENT/servlet.jar:$HTBCLIENT/jms.jar:$HTBCLIENT/ejb.jar:$HTBCLIENT/jndi.jar:$HTBCLIENT/jta.jar:$ORACLE_HOME/forms60/java:$HTBCLIENT/jmxri.jar:$HTBCLIENT/jaas.jar:$HTBCLIENT/ojdl.jar:$JAVA_TOPWhere:
$OC4J_HOME is the home directory where OC4J is installed.
$HTBCLIENT is the directory you created under $OC4J_HOME. For example:
$OC4J_HOME/htbclient.
$IAS_HOME is the location where Oracle E-Business Suite installs Oracle iAS.
The E-Business Suite ships with its own application server install, and
$IAS_HOME refers to that installation.
$JAVA_HOME is where the JDK is installed.
Please remove the following jar files if present, from the AF_CLASSPATH:
bc4jdomorcl.jar and bc4jct.jar.Note: Also modify the AF_CLASSPATH variable in the XML file so that the next time autoconfig is run, the value of the AF_CLASSPATH is not overwritten.
15. Create a file called jndi.properties under $HTBCLIENT with the following lines
java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://:/htb16. Start the OC4J Container
Navigate to $OC4J_HOME/j2ee/home
Use the following case sensitive parameters (the dbc file should be located in $FND_TOP/secure):
-Djbo.323.compatible=true
-DDBCFile=<absolute path to the dbc file including the file name>
-DJTFDBCFILE=<absolute path to the dbc file including the file name> For example (increase memory if required):
java -Xmx512M -Xms512M -DworkflowSupported=<N - if the worflow need to be disabled (OR) Y - if the workflow need to be enabled> -Djbo.323.compatible=true -DDBCFile=<absolute path to the dbc file including the file name> -DJTFDBCFILE=<absolute path to the dbc file including the file name> -jar oc4j.jarA message is displayed indicating that the OC4J container has been initialized.
17. Deploy the htb.ear file
$ cd $OC4J_HOME/j2ee/home
java -Xmx512M -Xms512M -jar admin.jar ormi://<host_name>:<rmi_port> admin admin -deploy -file htb.ear -deploymentName htbNote: You can get the RMI port number from the file $OC4J_HOME/j2ee/home/config/rmi.xml
18. Update the orion-application.xml files to include the absolute path to the dbc file name
$OC4J_HOME/j2ee/home/application-deployments/htb/orion-application.xml
$OC4J_HOME/j2ee/home/applications/htb/META-INF/orion-application.xml
<property name="DBC_FILE_PATH" value="<enter absolute path here>" />19. Shutdown the oc4j container:
cd $OC4J_HOME/j2ee/home
java -jar admin.jar ormi://<host_name>:<rmi port> <admin_username> <admin_password> -shutdown force
Note: The admin username and passwords are the same ones created during the installation of OC4J (Step 3).
20. Restart oc4j server - use the same steps as noted above.
21. Update the jserv.properties file to include the following lines between <#Begin customizations> and <#End customizations>:
wrapper.bin.parameters=-DAdaptorCatalog=$JAVA_TOP/oracle/apps/ctb/tools/bridge/catalog.xmlNote: Use physical path for $JAVA_TOP
wrapper.bin.parameters=-DClientMode=local22. Run the below sqls for DQM Setup and Implementation.
cd $AR_TOP/patch/115/sql
sqlplus apps_username/apps_password @arhdqcgr.sql
sqlplus apps_username/apps_password @ARHDCTXS.pls ctxsys_username ctxsys_password apps_username
sqlplus apps_username/apps_password @arhdqcpr.sql ctxsys_username ctxsys_password apps_username23. Restart the application services after disabling Maintenance Mode.
24. Modify the following profile options:
Profile Option Name = "FND: Framework Compatibility Mode"
Profile Option Application Name = Clinical Transaction Base (Short_name = CTB)
Profile Option Value = 11.5.10
Profile Option Name = "FND: Migrated to JRAD"
Profile Option Application Name = Clinical Transaction Base (Short_name = CTB)
Profile Option Value = YThis completes the deployment of HTB on standalone OC4J.
Comments