... 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.
- Shutdown the server.
- Open $ORACLE_HOME/j2ee/home/config/server.xml using any windowed text editor.
- Open $ORACLE_HOME/j2ee/OC4J_NEW/config/server.xml using any windowed text editor.
- 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).
- Close the home/config/server.xml file.
- Move towards the end of the OC4J_NEW server.xml and locate a line like:
- insert a blank line after it and add the following :
- Close and save the OC4J_NEW server.xml file.
- 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.
<application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="false"/>
<application name="bc4j" path="../../../BC4J/redist/bc4j.ear" start="true"/>