Tuesday, 24 December 2013

UnsatisfiedLinkError exception loading native library: njni11 libnjni11.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)


In the process of R12.2 upgrade Generating database context file (adbldxml.pl) and running autoconfig (adautocfg.sh) throw java error.

Database 11g(11.2.0.3.0)
R12 12.2(Upgrading) 



bash-3.2$ perl adbldxml.pl


Starting context file generation for db tier..
Using JVM from /u01/oracle/ERP/db/tech_st/11.2.0/appsutil/jre/bin/java to execute java programs..
APPS Password:


The log file for this adbldxml session is located at:
/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/log/adbldxml_11201201.log
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)


Could not Connect to the Database with the above parameters, Please answer the Questions below



Enter Hostname of Database server:xxxx


Enter Port of Database server: 1521


Enter SID of Database server: xx


Enter Database Service Name: xx


Enter the value for Display Variable: xxxx:0.0


Context File  /u01/oracle/xxx/db/tech_st/11.2.0/appsutil/xxxxxxx.xml

already exists.


Overwriting Context File may cause loss of existing settings, hence
backing it up as: /u01/oracle/xxxx/db/tech_st/11.2.0/appsutil/xxxxx.xml.bak



The context file has been created at:
 /u01/oracle/xxx/db/tech_st/11.2.0/appsutil/xxxxxxx.xml


Even with the above errors it continues and creates context file (With the error it prompts few more values)
   
Autoconfig Error.


$ORACLE_HOME/appsutil/bin/adconfig.sh contextfile=/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/xxx.xml

AutoConfig will consider the custom templates if present.
Using ORACLE_HOME location : /u01/oracle/ERP/db/tech_st/11.2.0
Classpath                   : :/u01/oracle/ERP/db/tech_st/11.2.0/jdbc/lib/ojdbc6.jar:/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/java/xmlparserv2.jar:/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/java:/u01/oracle/ERP/db/tech_st/11.2.0/jlib/netcfg.jar:/u01/oracle/ERP/db/tech_st/11.2.0/jlib/ldapjclnt11.jar

Using Context file          : /u01/oracle/ERP/db/tech_st/11.2.0/appsutil/xxx.xml



Context Value Management will now update the Context file
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)



Root cause of the issue is 32 bit java , the program actually expects 64bit java instead of 32 bit java at $ORACLE_HOME/jre

Found java 64 under /u01/oracle/R122/fs1/FMW_Home/Oracle_EBS-app1/jdk/jre/bin so copied to $ORACLE_HOME/appsutil/

cp /u01/oracle/R122/fs1/FMW_Home/Oracle_EBS-app1/jdk/jre -RH /u01/oracle/ERP/db/tech_st/11.2.0/appsutil/

./java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

perl adbldxml.pl 


AFter copying the 64 bit jre to $ORACLE_HOME/appsutil/ location both adbldxml.pl and adautocfg.sh completed without errors.
 

Tuesday, 3 December 2013

Shirnking vmware virtual disk(vmdk) to reclaim unused space using command line


Virtual machine virtual disk grows very huge over time despite the fact that the guest os is not taking the space shown by the vmware virtual disk files.

This examples shows how to reclaim unused space using command line tools like vmware-mount and vmware-vdiskmanager.

The size of the virtual machine partitions, output of ls from the guest os


The total used space is only 10gb or so


The size of the virtual disk files on the host



To list the partition on a virtual partition use vmware-mount -p

ex: vmware-mount -p /u02/vm/vm_test_for_prod_handson/vm_test_for_prod_handson.vmdk

Partition has to be mounted to prepare it for shrinking, create a folder to mount the virtual machine partition

mkdir /tmp/vm

Mount the virtual disk partition

vmware-mount /u02/vm/vm_test_for_prod_handson/vm_test_for_prod_handson.vmdk 1 /tmp/vm (This will mount the first partition)








Now start preparing partition for shrinking

vmware-vdiskmanager -p /tmp/vm

After preparing is completed  unmount the partition

ex: vmware-vdiskmanager -d /tmp/vm

When all virtual partitions are prepared, unmount  partitions and start shrinking .

ex: vmware-vdiskmanager -k /u02/vm/vm_test_for_prod_handson/vm_test_for_prod_handson.vmdk

  

Virtual disk file size after shirnking 



Sunday, 1 December 2013

Online Patching Enablement patch(13543062:R12.AD.C) is failing with error "ORA-44305: service ebs_patch is running"

Online Patching Enablement patch: 13543062:R12.AD.C.

ORA-44305: service ebs_patch is running
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_SERVICE", line 454
ORA-06512: at "SYS.DBMS_SERVICE", line 375
ORA-06512: at "APPS.AD_ZD_PREP", line 308
ORA-06512: at line 4

Checked the error message with oerr utility

oerr ora 44305

44305, 0000, "service %s is running"
// *Document : Yes
// *Cause    : The specified service was running.
// *Action   : This message is informational only.

Actually the line 308 in package APPS.AD_ZD_PREP is where the error is happening.

The  line 308 in the package APPS.AD_ZD_PREP is executing the procedure dbms_service.start_service, as the service is already running the said error was thrown. So dbms_service.stop_service is executed explicitly to stop the service and adctrl is used to restart the failed worker. The adpatch continued to run and completed successfully.

Saturday, 30 November 2013

E-business Suite Data Only refresh without cloning 11i/R12

Data refreshing on e-business was queit challenging to do, our developers needed an instance with fresh data (ie: previous day data).

As rapid clone needs manual intervention we had to find a way to do it everyday with an automated way.

This is one of the methods used. This method assumes already a cloned instance is running for which only data has to be refreshed. The method requires the source database to be down for the database backup.

 
On the source server connect to sqlplus and issue "alter database backup controlfile to trace", This step has to be done whenever database undergoes some structural changes like adding datafile/logfile.

Shutdown the source database and make a backup of datafiles.

Move the generated trace file and backed up data files to the destination. 

Modify the generated trace file to to match the destination database


Clear everything up to "Set #2. RESETLOGS case"

Change "CREATE CONTROLFILE REUSE DATABASE "SOURCE" RESETLOGS  ARCHIVELOG" to "CREATE CONTROLFILE SET DATABASE "DEST" RESETLOGS"


Modify the data/log/temp files path to reflect correct location on the destination

After doing the modification the file looks like

STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "VMERP" RESETLOGS
    MAXLOGFILES 32
    MAXLOGMEMBERS 5
    MAXDATAFILES 512
    MAXINSTANCES 8
    MAXLOGHISTORY 2921
LOGFILE
  GROUP 1 '/u03/vmproddata/redolog01.dbf'  SIZE 100M BLOCKSIZE 512,
  GROUP 2 '/u03/vmproddata/redolog02.dbf'  SIZE 100M BLOCKSIZE 512,
  GROUP 3 '/u03/vmproddata/redolog03.dbf'  SIZE 100M BLOCKSIZE 512,
 ----removed few lines here
-- STANDBY LOGFILE
DATAFILE
  '/u03/vmproddata/system01.dbf',
  '/u03/vmproddata/system02.dbf',
  '/u03/vmproddata/system03.dbf',
  '/u03/vmproddata/system04.dbf',
  '/u03/vmproddata/system05.dbf',
   ----removed few lines here
  '/u03/vmproddata/system06.dbf',
  '/u03/vmproddata/discoverer01.dbf',
  '/u03/vmproddata/APEXTS01.dbf'
CHARACTER SET US7ASCII
;
.........................few lines are removed for brevity

--RECOVER DATABASE USING BACKUP CONTROLFILE
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;

ALTER TABLESPACE TEMP ADD TEMPFILE '/u03/vmproddata/temp01.dbf'
     SIZE 2047M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/u03/vmproddata/temp02.dbf'
     SIZE 2047M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
exit;

save the file as recreate_database.sql




On the destination remove  all copies of controlfiles

start sqlplus and run the controlfile recreate script

sqlplus / as sysdba @recreate_database.sql

set the environment variable on dbtier

start the listener on database tier

run autoconfig on dbtier

run autoconfig on appstier




I am not sure if its supported way, but it serves the purpose

Monday, 18 November 2013

Creating web ADI document fails with error ‘1004: Method VBProject of object _Workbook failed’ on office 2013


Oracle R12 12.1.3
Office 2013





To create document successfully do the following steps

Add the site in trusted sites on explorer (Tools > Internet Options > Security > Sites)


Open excel File > Options > Trust center               





Click on Trust Center settings


Select Disable all macros with notification
Check Trust access to the VBA project object model
Click Ok


Now the document will get created but add in tab will be missing with oracle options
Right Click on the Ribbon area and click customize ribbon


Select Main Tabs from “Choose command from List”
Create a New Tab


Select Macro and select BneCreateOracleMenu and Click Add


Click on the New Tab > BneCreateOracleMenu
This will Display addin with oracle options


Save the file as macro enabled work book.
Use this file for future upload


Tuesday, 23 July 2013

FRM:41830: List of Values contains no entries while selecting payment document on payment screen - AP R12

 
After creating new bank account and adding payment documents, on payment screen after selecting the newly created bank account payment document field is showing “list of values contains no entries”


The payment profile option was also defaulting to US NACHA IAT (there are no other profile to select) instead of  laser check format which is actually selected as default format while creating payable documents with manage payment documents



Selected format during payment document creation




Created a new PPP and issue was solved.

Go to setup>payment > payment administrator



 Click on the payment process profile




Select processing type as printed and complete the creation process

Wednesday, 17 July 2013

RMAN-00571 auxiliary file name xxx conflicts with a file used by the target database

While duplicating, RMAN was continuously  giving the error "RMAN-00571 auxiliary file name xxx conflicts tiwh a file used by the target database"


Here is what oerr utility has to say about the error

oerr RMAN 5001

5001, 1, "auxiliary file name %s conflicts with a file used by the target database"
// *Cause: RMAN is attempting to use the specified file name as a restore
//         destination in the auxiliary database, but this name is already
//         in use by the target database.
// *Action: Use the CONFIGURE AUXNAME command to specify a name for the data
//          file that does not conflict with a file name in use by the
//          target db.

 



The cause of the error was the database file name. Rman by default prevents the datafiles and online redo logs  to have the same name as target to avoid overwriting of original database files.

I was actually duplicating to a different host with same location as target database with the same file name so rman was not allowing to complete the duplicating.

see "NOFILENAMECHECK" at   DUPLICATE and nofilenamecheck option to have better understanding .

As i was doing it on different host i don't mind it using same filename as target so i used NOFILENAMECHECK option with the duplicate command and rman completed the duplication successfully.



ex:
run
{
duplicate database to dup
backup location '/u01/oracle/bkp/DUP/'
spfile

NOFILENAMECHECK;
}


Use this option with care, if you are on duplicating same host this will overwrite original database files.




Tuesday, 18 June 2013

VMware workstation bios setup selection screen clears too quickly

Not able to select VMware worksation bios set up. The delay at boot is too little to select the bios

To increase the delay edit the .vmx file and add an entry like

bios.bootDelay = "10000" .

This will make system wait 10 seconds 

Saturday, 13 April 2013

Enabling audit trail for oracle e-business suite applications in R12

Define audit group
Security>Audittrail>Groups



Note: When you first create the audit group the group status will be 'Enable Requested' this will automatically be changed to 'Enabled' once thAuditTrail Update Tables concurrent request is run

Define columns to be audited
Security > AuditTrail>Tables


Enable auditing for schema owners

Security > Audittrail>install


Enable ‘AuditTrail Activate’ profile option


Submit the AuditTrail Update Tables concurrent request

If Request fails with   “Fatal error in fdasql, quitting Fatal error in fdacv, quitting Fatal error in fdaupc, quitting “ check this out Fatal error in fdasql



Fatal error in fdasql - AuditTrail Update Tables program error on R12


While running AuditTrail Update Tables concurrent request on e-business suite R12(12.1.3) as part of audittrail enable process the request completed with Fatal error in fdasql, quitting.... Fatal error in fdacv, quitting.... Fatal error in fdaupc, quitting error.
  


To fix the issue Check if you have enabled auditing for  APPLSYS,APPS and the application schema owner you want to audit, if not enable the auditing for the schema you wish to audit.




And also check the logfile to see if its failing at View AP_SYSTEM_PARAMETERS_ALL_AC1, If so change the group status for the Audit Group AP_SYSTEM_PARAMETERS_ALL to disable – purge table

 



Now submit the AuditTrail Update Tables program again

Thursday, 11 April 2013

Creating Domain failed while installing oracle forms 11g2 11.1.2.1.0 on windows xp


Configuration Action Creating domain has failed please check logs for details




Few lines from install log file

oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:686)
........
.......
oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
at java.lang.Thread.run(Thread.java:662)


Few from orainstall.out as well


Creating Weblogic Domain.
oracle.as.provisioning.exception.ASProvWorkflowException
at oracle.as.provisioning.weblogic.ASDomain._createDomain(ASDomain.java:2630)
at oracle.as.provisioning.weblogic.ASDomain.createDomain(ASDomain.java:2476)
.......................................
........................................ 
at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:686)
at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:391)
at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
... 13 more


I had two reasons which were stopping domain creation the Node Manager service and environment variables with space in it.


Check for "Server Node Manager" service, if it is running stop it


I had a service with name "Oracle Enterprise Pack for Eclipse NodeManager (C_Oracle_Middleware_wlserver_10.3)"

see forms installation guide section 2.2.4 Stopping Node Manager Before Installing Oracle Forms and Reports (Windows Only)

http://docs.oracle.com/cd/E38115_01/doc.111210/e23960/install.htm#CHDBFJBE


Check the user environment variables

Check the user environment  variables(temp/tmp) if they are pointing to directories with spaces, change those to point to directory path without space

my computer > properties > Advanced > Environment Variables > User Variables for

change to
temp=c:\temp
tmp=c:\tmp

make sure given folders exist

if you are hitting same error again check path variable has any folders with space, if so remove it temporarily and continue installation


Oracle forms 11g2 (11.1.2.1.0) on windows XP can be installed in the following way


Install weblogic server

Download Weblogic server from
http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html

WLS 10.3.5 , WSL 10.3.6 are supported with  forms 11g2 (as of this writing)

See certification matrix here
http://www.oracle.com/technetwork/developer-tools/forms/oracle-forms-11gr2certmatrix-519680.xls

Then install  oracle forms 11g2 (11.1.2.1.0)

http://docs.oracle.com/cd/E38115_01/doc.111210/e23960/install.htm