Tuesday, December 02, 2014

Puriging a Complete Item Process and It's Child Process



If there is a situation to close the old itemtype and its child processes and all the itemkeys for that Workflow process, there could be 2 ways to do it:


Firstly using the WF_PURGE.TOTAL:

DECLARE
CURSOR c1 IS
SELECT /*+ FIRST_ROWS */ WI.ITEM_TYPE, WI.ITEM_KEY
FROM WF_ITEMS WI
WHERE end_date is not null and BEGIN_DATE < TO_DATE('30-SEP-2007','DD-MON-YYYY')
AND EXISTS
(SELECT NULL
FROM WF_ITEM_TYPES WIT
WHERE WI.END_DATE+nvl(WIT.PERSISTENCE_DAYS,0) <= SYSDATE
AND WI.ITEM_TYPE = WIT.NAME
AND WIT.PERSISTENCE_TYPE = 'TEMP');
v_count PLS_INTEGER := 0;
BEGIN
DBMS_OUTPUT.PUT_LINE('START DATE'||sysdate);
FOR i IN c1 LOOP
WF_PURGE.Total ( itemtype => i.item_type
, itemkey => i.item_key );
IF v_count = 50 THEN
v_count := 0;
COMMIT;
ELSE
v_count := v_count + 1;
END IF;

Second Method:

DECLARE
   t_result   VARCHAR2 (300);
BEGIN
   FOR c
      IN (SELECT item_type, item_key
            FROM wf_item_activity_statuses_v
           WHERE     activity_type_code = 'PROCESS'
                 AND activity_status_code != 'COMPLETE')
   LOOP
      wf_engine.abortprocess (c.item_type, c.item_key, t_result);
   END LOOP;

   COMMIT;
END;

Even this sometimes returns 0 records

Then just execute the following sql :


Run the WFRMITT.sql script which deletes all definitions for an Item

Wednesday, November 26, 2014

PROCESS and DISCARD folders are not accessile by Oracle Workflow mailer



Even after creating the PROCESS and DISCARD folders under the dedicated email account, we were getting the error as "The FOLDER DOES NOT EXIST for THE NOMINATED MAIL ACCOUNT"


Solution:


i) Login into MAIL SERVER IMAP using the telnet

telnet abc.mailer.com 143

Connected to abc.mailer.com
Escape character is '^]'.


ii) Login into IMAP server using the dedicated account created for the Oracle Workflow Mailer using the login command. (1 i.e. a number before the command is mandatory for all IMAP commands )

1 login <IMAP Account> <IMAP Account password>
1 OK LOGIN completed

iii) List all the folders under this account:

1 list "" "*"

The output will show the children and parent directories available for this account and all the folder information displayed in this command output is case sensitive.

In my case the PROCESS and DISCARD folders created at user level are created under the PARENT INBOX i.e. INBOX.PROCESS and INBOX.DISCARD.


Use the same listed folder names for configuring the workflow mailer to resolve the above error.




adopmnctl.sh: exiting with status 2



   After a brief OS update when we started the Oracle Apps Services, opmn services were stalled and it was ending with the following error for OACORE,FORMS,OAFM and FORMS-C4WS.

OPMN Services are failed to start with the error:
Starting Apache...
Apache started successfully.


Starting OACORE oc4j...
EXIT CODE is 2. Please check the log file for more details.


Starting FORMS oc4j...
EXIT CODE is 2. Please check the log file for more details.


Starting OAFM oc4j...
EXIT CODE is 2. Please check the log file for more details.


Starting FORMS-C4WS oc4j...
EXIT CODE is 2. Please check the log file for more details.



adopmnctl.sh: exiting with status 2


There is no entry in any of the log file even after enabled the logging and restarting the services.

Solution:

The Problem was due to the changes made automatically in /etc/hosts file.

Just need to correct the entries of your application server  host to IP details and restart the services. This will clear the error.

Friday, October 31, 2014

Installing acroread on Linux 6 (64-bit)

Download the latest Acrobat reader file from the below link:

ftp://ftp.adobe.com/pub/adobe/reader/unix/

In our example we have used the Acrobat Reader 9.5 i.e. AdbeRdr9.5.5-1_i486linux_enu.bin.

Install this file in /opt directory..

Before running the acroread it has some pre-requisite packages needs to be installed along with this:

error 1 : acroread: error while loading shared libraries: libxml2.so.2 linux

Install the libxml2 package using the YUM

Install Package :    yum install libxml2

error 2 : acroread: error while loading shared libraries: libgdk_pixbuf_xlib-2.0.so.0: cannot open shared object file: No such file or directory

Install Package :    yum install gdk-pixbuf2.i686

error 3:  acroread: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory



Install Package :    yum install gtk2.i686

acroread
dirname: missing operand

So, acroread is now installed successfully and ready to be used in Linux Server.

Tuesday, June 03, 2014

java.lang.NoClassDefFoundError 500 Internal Server Error



Very common error in Oracle Apps, either with the internal or external site.Examined the Apache,OPMN debug files but there are no specific errors.


As per Oracle, this error could be one of the PORT belongs to the jvm cache.

If the JVM is not available, Distributed Caching is unable to copy the class across to
other jvm's and you get the error "500 Internal Server Error java.lang.NoClassDefFoundError"

Solution:

1) Check the JVM Caching Port ("s_java_object_cache_port") in Context fine defined is used by any other application by stopping all the opmn services.

  If the Port is used by other applciation, change the port in the Context file and run the adautocfg.sh and start all the services.

2) Temporarily we can also disable the Distributed JVM Cache by changing the line in $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/config/oc4j.properties that says

LONG_RUNNING_JVM=true to LONG_RUNNING_JVM=false.


Disabling Distributed JVM Cache is achieved by changing "LONG_RUNNING_JVM=" from "true" to "false" in the oc4j.properties. This is controlled by AutoConfig parameter "s_long_running_jvm".



Friday, May 30, 2014

To find the Memory Details in AIX

To know the complete memory details the following script can be used to find it:

#!/usr/bin/ksh
#memory calculator
um=`svmon -G | head -2|tail -1| awk {'print $3'}`
um=`expr $um / 256`
tm=`lsattr -El sys0 -a realmem | awk {'print $2'}`
tm=`expr $tm / 1000`
fm=`expr $tm - $um`
echo "\n\n-----------------------";
echo "System : (`hostname`)";
echo "-----------------------\n\n";
echo "Memory Information\n\n";
echo "total memory = $tm MB"
echo "free memory = $fm MB"
echo "used memory = $um MB"
echo "\n\n-----------------------\n";





Database IP address change for integrated Discoverer 11g



If the Database integrated with the Oracle Discoverer is changed, then it will be ending with an error as "The Network Adapter could not establish the connection"

Resolution:

1)  Login into Weblogic console as weblogic user
2) Click Lock and Edit
3) Under Data Sources there will be 2 options

   a) Click each and goto the tab configuration. Under configuration click the Connection pool and change the IP address from OLD to NEW under "URL" and "PROPERTIES".

   b) Make the same changes in another data source with the same navigation and Save

    c) Click the Monitoring tab and the data sources and verify the test is Successful

4) Click "Activate Changes"

5) Restart WLS_DISCO and opmn services. Check the discoverer to access the reports.


Friday, February 28, 2014

SENDMAIL error "Collect:Cannot Write /jbdjbjbdj queueup:cannot create queue file ckdmkcd Permission denied




A strange error in the server and that too all of a sudden we are getting any none of the mails are sent from the server. After googling in internet found a strange answer and it worked too:

1) Login as root
2) cd /usr/sbin
3) ll sendmail 

4) cmod 4755  /usr/sbin/sendmail 

5) Recheck the script..and it s working....

Friday, February 21, 2014

How To make the changes in System Datastore if there any problems in OID Datastore to login




To Revert back the System Datastore, if the OID Datasotre was unable to login into OAMCONSOLE, Please follow the procedure:


i) cd $MW_HOME/iam/common/bin

ii) wlst.sh


Type help() for help on available commands

wls:/offline> connect()

Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :t3://erptest.xxxxx.com:7002
Connecting to t3://erptest.xxxxx.com:7002 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'IDMDomain'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

wls:/IDMDomain/serverConfig>

/*Now Enter the following to make changes in DataStore*/


wls:/IDMDomain/serverConfig>displayUserIdentityStore('UserIdentityStore1')

/*This will show the current System Datastore*/

wls:/IDMDomain/serverConfig>editUserIdentityStore(name="UserIdentityStore1",isPrimary="true",isSystem="true") 

/*This will change the Datastore to the Default where weblogic user can able to login )

wls:/IDMDomain/serverConfig>exit()

Restart all Managed Services and try to loin as weblogic into OAMCONSOLE and make necessary changes to OID Datastore.





Thursday, February 20, 2014

How to enable TRACE32 for OAM



How to Enable the TRACE32 for OAM



To Enable the TRACE32 for OAM related errors, please follow the procedure:


a) clear all the files /tmp or /usr/tmp
b) $IAM_HOME or $OAM_HOME/common/bin
c) execute the script wlst.sh
            The above command will provide the prompt as

                 wls:/offline> 

Now type connect() and enter the weblogic username and Password along with the url to which the console will be connected:

wls:/offline> connect()
Please enter your username :weblogic
Please enter your password :

Please enter your server URL [t3://localhost:7001] :t3://erptest.xxxx.com:7002

Connecting to t3://erptest.xxxxx.com:7002 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'IDMDomain'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.


wls:/IDMDomain/serverConfig> domainRuntime()

Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)

/* This will show the runtime logers and tracelevel)*/

wls:/IDMDomain/domainRuntime> listLoggers(pattern="oracle.oam.*",target="oam_server1")
------------------------------------------+-----------------
Logger                                    | Level
------------------------------------------+-----------------
oracle.oam                                | <Inherited>
oracle.oam.admin.foundation.configuration | <Inherited>
oracle.oam.agent-default                  | <Inherited>
oracle.oam.audit                          | <Inherited>
oracle.oam.binding                        | <Inherited>
oracle.oam.certvalidation.mbeans          | <Inherited>
oracle.oam.commonutil                     | <Inherited>
oracle.oam.config                         | <Inherited>
oracle.oam.controller                     | <Inherited>
oracle.oam.default                        | <Inherited>
oracle.oam.diagnostic                     | <Inherited>
oracle.oam.engine.authn                   | <Inherited>
oracle.oam.engine.authz                   | <Inherited>
oracle.oam.engine.policy                  | <Inherited>
oracle.oam.engine.session                 | <Inherited>
oracle.oam.engine.sso                     | <Inherited>
oracle.oam.engine.token                   | <Inherited>
oracle.oam.extensibility.lifecycle        | <Inherited>
oracle.oam.foundation.access              | <Inherited>
oracle.oam.idm                            | <Inherited>
oracle.oam.install                        | <Inherited>
oracle.oam.install.mbeans                 | <Inherited>
oracle.oam.plugin                         | <Inherited>
oracle.oam.proxy.oam                      | <Inherited>
oracle.oam.proxy.osso                     | <Inherited>
oracle.oam.user.identity.provider         | <Inherited>

wls:/IDMDomain/domainRuntime>setLogLevel(target='oam_server1',logger='oracle.oam',level='TRACE:32',persist="1",addLogger=1)

wls:/IDMDomain/domainRuntime> listLoggers(pattern="oracle.oam.*",target="oam_server1")
------------------------------------------+-----------------
Logger                                    | Level
------------------------------------------+-----------------
oracle.oam                                | TRACE:32
oracle.oam.admin.foundation.configuration | <Inherited>
oracle.oam.agent-default                  | <Inherited>
oracle.oam.audit                          | <Inherited>
oracle.oam.binding                        | <Inherited>
oracle.oam.certvalidation.mbeans          | <Inherited>
oracle.oam.commonutil                     | <Inherited>
oracle.oam.config                         | <Inherited>
oracle.oam.controller                     | <Inherited>
oracle.oam.default                        | <Inherited>
oracle.oam.diagnostic                     | <Inherited>
oracle.oam.engine.authn                   | <Inherited>
oracle.oam.engine.authz                   | <Inherited>
oracle.oam.engine.policy                  | <Inherited>
oracle.oam.engine.session                 | <Inherited>
oracle.oam.engine.sso                     | <Inherited>
oracle.oam.engine.token                   | <Inherited>
oracle.oam.extensibility.lifecycle        | <Inherited>
oracle.oam.foundation.access              | <Inherited>
oracle.oam.idm                            | <Inherited>
oracle.oam.install                        | <Inherited>
oracle.oam.install.mbeans                 | <Inherited>
oracle.oam.plugin                         | <Inherited>
oracle.oam.proxy.oam                      | <Inherited>
oracle.oam.proxy.osso                     | <Inherited>
oracle.oam.user.identity.provider         | <Inherited>
wls:/IDMDomain/domainRuntime>

wls:/IDMDomain/domainRuntime> exit()


Exiting WebLogic Scripting Tool.

TRACE entries written to the file $OAM_DOMAIN/servers/oam_server1/logs/oam_server1-diagnostic.log