Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Thursday, April 17, 2008

Command line diagnostic tests for notification mailers

While searching for something else on metalink, my eyes caught the phrase "command-line diagnostic" in the search results. This was present in the readme of ATG_PF.H RUP6 patch:

You can now dedicate a notification mailer to process only instances of a particular message from a particular item type by specifying both the item type and the message name within the correlation ID.You can run command-line diagnostic tests for notification mailers through the new oracle.apps.fnd.wf.mailer.Mailer program.

* Test connectivity to the IMAP mail server.
* Test connectivity to the SMTP mail server.
* Test connectivity to the Web tier, which is required for the notification mailer to generate notifications that include Oracle Application Framework content.
* Check the number of messages in an IMAP folder or the total size of the messages in the folder in bytes, which indicates how much space you can regain by purging messages from the folder.

More details about these tests are given in Metalink Note 332152.1

Java Mailer Diagnostics for HTTP Framework Region:

You need to have minimum ATG CU2 applied:

$AFJVAPRG -classpath $AF_CLASSPATH -Dnid= \
-Ddbcfile= \
[ -Dappuser= \
-Dappresp= \
-Dappid=\
-Dhtp= \
-Durltimeout= (Default 30)]\
[ -DAFLOG_ENABLED=true \
-DAFLOG_FILENAME=test5b.log \
-AFLOG_LEVEL= ] \
oracle.apps.fnd.wf.mailer.Mailer

Note: When specifying -Dhtp=https, the LD_LIBRARY_PATH environment variable should be replaced with $AF_LD_LIBRARY_PATH. Otherwise, "java.lang.UnsatisfiedLinkError: initSSLContextNative" will be encountered.


NON-SSL TEST:

Modify in a text editor to make sure the command is listed on one line as it is one long statement. You need to specify the notification_id (-Dnid) of the failing notification and the dbc filename (-Ddbcfile).

==============Begin garymailertest.sh=================

. APPSORA.env

$AFJVAPRG -classpath /tmp:${AF_CLASSPATH} -Dnid=841969 -Ddbcfile=$FND_TOP/secure/orlncatst-02_vis.dbc -Dappuser=0 -Dappresp=20420 -Dappid=1 -Durltimeout=120 -Dhtp=http -DAFLOG_FILENAME=mailerTest.log -DAFLOG_LEVEL=STATEMENT -DAFLOG_ENABLED=true oracle.apps.fnd.wf.mailer.Mailer

=============End garymailertest.sh=====================


SSL TEST:

Modify in a text editor to make sure the command is listed on one line as it is one long statement. You need to specify the notification_id (-Dnid) of the failing notification and the dbc filename (-Ddbcfile).

==============Begin garymailertestSSL.sh===============

. APPSORA.env

export LD_LIBRARY_PATH=${AF_LD_LIBRARY_PATH}

$AFJVAPRG -classpath $AF_CLASSPATH -Dnid=841969 -Ddbcfile=$FND_TOP/secure/aoldev-pc_vis.dbc -Dappuser=0 -Dappresp=20420 -Dappid=1 -Durltimeout=120 -Dhtp=https -DAFLOG_FILENAME=mailerTest.log -DAFLOG_LEVEL=STATEMENT -DAFLOG_ENABLED=true oracle.apps.fnd.wf.mailer.Mailer

============End garymailertestSSL.sh===============

Java Mailer Diagnostics for HTTP Framework Region Screen Output:

Mailer : oracle.apps.fnd.cp.gsc.Logger.Logger(String, int) : Logging to System.out until necessary parameters are retrieved for Logger to be properly started.
URL {https://aoldev-pc.us.oracle.com:8443/OA_HTML/OA.jsp?page=/oracle/apps/fnd/wf/worklist/webui/NotifMailerPG&WFRegion=NtfDetail&NtfId=841969&dbc=aoldev-pc_vis&OALAF=blaf&OARF=email}
Connection to application server was successful and retrieved
3392 characters plus 4 referenced objects.
Time taken to establish the connection and
obtain the content was 31.627 seconds

Content ID File name and Content Type

========== ==========================

24537094 /OA_HTML/cabo/images/errorl.gif image/gif
5612344 /OA_HTML/cabo/images/cache/cmbte-1.gif image/gif
8344960 /OA_HTML/cabo/images/t.gif image/gif
16625677 /OA_HTML/cabo/images/cache/cmbbn-1.gif image/gif

NOTE: Upload the information echoed to your session and the -DAFLOG_FILENAME=mailerTest.log and test.log which contains quite a bit of Statement log level data.

1 comment:

Unknown said...

Hi Vikram,

I'm setting java Workflow mailer to connect using SSL to IMAP Server following the doc 1265949.1.

In step 8,
Test connectivity to the IMAP server using Command-Line Notification Mailer Diagnostics.

I'm getting below error, can you help me for this?

$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap \
> Ddbcfile=/tmp/s1mtb2/t847.dbc \
> Dport=993 -Dssl=Y \
> Dtruststore=/opt/orapp847/appst847/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/security/cacerts \
> Dserver=appsmailert847.swissre.com \
> Daccount=imapt847@appsmailert847.swissre.com \
> Dpassword=GtmhiYc16o \
> Dconnect_timeout=120 -Ddebug=Y \
> Dlogfile=/tmp/testing.log -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer
Exception in thread "main" java.lang.NoClassDefFoundError: Ddbcfile=/tmp/s1mtb2/t847/dbc
Caused by: java.lang.ClassNotFoundException: Ddbcfile=.tmp.s1mtb2.t847.dbc
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: Ddbcfile=/tmp/s1mtb2/t847.dbc. Program will exit.

Regards,
Wasim