Tuesday, 22 May 2007

Making a new OC4J Instance ADF aware in Oracle IAS 10.1.3

... or simply copy shared library definitions from one OC4J instance to an other

When you create a new OC4J instance on an Oracle Application server 10g 10.1.3 using the createinstance utility, then the new instance does not have the ADF libraries installed and therefore you cannot deploy any ADF based applications that you usually create using JDeveloper.

To resolve this issue -- thanks to Oracle support -- you have to manually add references for the adf.*libraries to the new instance's server.xml file and add references to the bc4j application to both the server.xml and the default-web-site.xml. The correct configuration is only available in the default home instance created during installation, so we are going to copy the setup from there.

The detailed list of steps required are the following. let's suppose that the new oc4j instance name is OC4J_NEW.

  1. Shutdown the server.
  2. Open $ORACLE_HOME/j2ee/home/config/server.xml using any windowed text editor.
  3. Open $ORACLE_HOME/j2ee/OC4J_NEW/config/server.xml using any windowed text editor.
  4. Copy the two shared-library tags with name="adf.oracle.domain" and name="adf.generic.domain" found in the home/config/server.xml and paste them into the OC4J_NEW/config/server.xml after the last of the shared library tags already in the file. (The same technique can be used for practically copying any server library definitions from one instance to an other).
  5. Close the home/config/server.xml file.
  6. Move towards the end of the OC4J_NEW server.xml and locate a line like:
  7. <application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="false"/> 
  8. insert a blank line after it and add the following :
  9. <application name="bc4j" path="../../../BC4J/redist/bc4j.ear" start="true"/>
  10. Close and save the OC4J_NEW server.xml file.
  11. Open the OC4J_NEW/config/default-web-site.xml file. Add a line like :
    <web-app application="bc4j" name="webapp" startup="true" root="/webapp"/> 
    right after the <default-web-app> tag located in the top. Close and save the file and restart the instance.In case of any typing errors, the instance log provides very detailed error messages -- at least it did so for me.

No comments :