R12.2.x : How to create Autoconfig / Context File on the (RDBMS) database node ?

I was working on a project to migrate R12.2.3 database from HP UX Itanium to RedHat Linux 6.5. In the environment, database server have just the database and application server accommodates the web, oacore, weblogic, concurrent managers and so on. As part of the migration, I had to build new context file for the database on Linux.

The same process can be used when you are adding/deleting a database node to RAC for EBS environment or if you happen to create the EBS database without using Rapid Install.

1. Login to the Application Server (APPL_TOP) as APPLMGR and create appsutil.zip by running the following command:

$ perl <AD_TOP>/bin/admkappsutil.pl 
This will create appsutil.zip in <INST_TOP>/admin/out. 

2. Copy (scp/ftp) the appsutil.zip to Oracle Database Host  - ORACLE_HOME or RDBMS_ORACLE_HOME.

$ cd <RDBMS_ORACLE_HOME>/appsutil/admin
$ unzip -o appsutil.zip 

3. Install Java Runtime Environment (JRE) on the Database tier. The JRE resides in the <RDBMS_ORACLE_HOME>/appsutil/jre directory on the database tier. Use the MOS Note 'All Java SE Downloads on MOS (Doc ID 1439822.1)' to download the required JRE.

Note: Do NOT download the Java SE Development Kit (JDK). Instead, download the JRE that supports 64-bit JVM.

In my case, I downloaded p14558210_17070_Linux-x86-64.zip. I copied the zip file to $ORACLE_HOME/appsutil and unzipped the file.
  •  jdk-7u7-linux-x64.rpm
  •  jdk-7u7-linux-x64.tar.gz
  •   jre-7u7-linux-x64.rpm
  •   jre-7u7-linux-x64.tar.gz 
Untar the file and it will create the directory named jre1.7.0_07. Now rename the directory.

$ tar xvf jre-7u7-linux-x64.tar.gz 
$ mv jre1.7.0_07 jre 

4. From the ORACLE_HOME/appsutil/bin directory, create an instance-specific XML context file by executing the command:
$ adbldxml.pl appsuser=APPS appspasswd=APPSpwd 

Reference: 
Using Latest Java 6.0 Update With Oracle E-Business Suite Release 12 (Doc ID 455492.1)
Oracle E-Business Suite Release 12.2: Adding or Deleting 11gR2 Oracle RAC Nodes (Doc ID 1570554.1)
Export/Import Process for Oracle E-Business Suite Release 12.2 Database Instances Using Oracle Database 11.2 (Doc ID 1613716.1)
All Java SE Downloads on MOS (Doc ID 1439822.1)
Oracle® E-Business Suite Setup Guide - Release 12.2 (Part No. E22953-09)

ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission /XXXXXX/sqlcom/out/MISSING_ATTRIBUTE_ITEMS_2111201409:23:51.xls read) has not been granted to APPS.

I created a new Oracle E-Business Suite environment, our tech team developed a code to ftp a file to certain location and then send the file as email using concurrent program. The technical analyst received the following error:

exception in SendMail =ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission /XXXXXX/sqlcom/out/MISSING_ATTRIBUTE_ITEMS_2111201409:23:51.xls read) has not been granted to APPS. The PL/SQL to grant this is dbms_java.grant_permission( 'APPS', 'SYS:java.io.FilePermission', '/XXXXXX/sqlcom/out/MISSING_ATTRIBUTE_ITEMS_2111201409:23:51.xls', 'read' )

Solution: 
Even though the file location is added to UTL_FILE_DIR database init parameter, we have to give to grant Java permission explicitly to the APPS user to read and write.

Login as SYS or SYSTEM user and then assign the required permission using DBMS_JAVA.GRANT_PERMISSION package.

SYS@APPLE SQL>EXEC DBMS_JAVA.GRANT_PERMISSION('APPS', 'SYS:java.io.FilePermission','/XXXXXX/sqlcom/out/*','read,write');

PL/SQL procedure successfully completed.

SYS@APPLESQL>commit;

Commit complete.



Note: Please make sure the commit is important.

The permission information can be verified using the Oracle dynamic views - DBA_JAVA_POLICY and USER_JAVA_POLICY.

R12.1.x - adapcctl.sh: exiting with status 204/ HTTP_Server~1.log : libdb.so.2: cannot open shared object file

I cloned R12.1.2 environment from Production to a Linux 64 bit test system. The clone process completed successfully, When I was trying to start all the services using 'adstrtal.sh' . The HTTP/Apache process did not start up. I was receiving the following error :

You are running adapcctl.sh version 120.7.12010000.2

Starting OPMN managed Oracle HTTP Server (OHS) instance ...

adapcctl.sh: exiting with status 204


Research:

Verify the logs. I checked adapcctl.txt 
ias-component/process-type/process-set:
    HTTP_Server/HTTP_Server/HTTP_Server/

Error
--> Process (index=1,uid=1288926491,pid=31768)
    failed to start a managed process after the maximum retry limit

and it referred to HTTP_Server~1.log.

HTTP_Server~1.log showed the actual issue:
/tech_st/10.1.3/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory

Solution:

Shutdown the Oracle Application services and as a  unix root user, create a soft link as follows:

$ ll /usr/lib/libgdbm.so.2.0.0
-rwxr-xr-x 1 root root 24800 Jul 23  2010 /usr/lib/libgdbm.so.2.0.0
ll /usr/lib/libdb.so.2
ls: cannot access /usr/lib/libdb.so.2: No such file or directory
$ ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
$ ll /usr/lib/libdb.so.2
lrwxrwxrwx 1 root root 25 Oct 31 13:07 /usr/lib/libdb.so.2 -> /usr/lib/libgdbm.so.2.0.0

Reference:
Attempting to Start Apache (adapcctl.sh) Throws an 'Error While Loading Shared Libraries: libdb.so.2' on RedHat Linux 5 (Doc ID 879522.1)