Showing posts with label MSCA/MWA. Show all posts
MSCA Authentication Failed error R12.2
MSCA: MWA Authentication Failed error
$ cd $MWA_TOP/bin
$ ps -ef|grep 10200
oraprod 17027 1 0 Jun16 ? Sl 0:48 /opt/jdk/bin/java -DPID=17021 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10200
oraprod 21554 19963 0 05:00 pts/3 S+ 0:00 grep 10200
$ ps -ef|grep 10300
oraprod 17059 1 30 Jun16 ? Sl 742:11 /opt/jdk/bin/java -DPID=17053 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10300
oraprod 21580 19963 0 05:00 pts/3 S+ 0:00 grep 10300
$ ./mwactl.sh -login apps/password stop_force 10200
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
Telnet server shut down successfully.
$ ./mwactl.sh -login apps/password stop_force 10300
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
Error: ServerManagerListener returned 'AUTHENTICATION_FAILED'
mwactl: Error shutting down Telnet server
$ ./mwactl.sh -login apps/password stop_force 10400
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
Error: ServerManagerListener returned 'AUTHENTICATION_FAILED'
mwactl: Error shutting down Telnet server
$ ps -ef|grep 10300
oraprod 17059 1 30 Jun16 ? Sl 742:57 /opt/jdk/bin/java -DPID=17053 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10300
oraprod 22006 19963 0 05:01 pts/3 S+ 0:00 grep 10300
$ kill -9 17059
$ ps -ef|grep 10400
oraprod 7845 1 0 Jun17 ? Sl 0:59 /opt/jdk/bin/java -DPID=7843 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10400
oraprod 22063 19963 0 05:01 pts/3 S+ 0:00 grep 10400
$ kill -9 7845
$ ps -ef|grep 10200
oraprod 22169 19963 0 05:01 pts/3 S+ 0:00 grep 10200
$ ./mwactl.sh start 10200
Created server socket : listening on port 10200
Server startup is successful.
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
$ ./mwactl.sh start 10300
Created server socket : listening on port 10300
Server startup is successful.
$ ./mwactl.sh start 10400
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
$ Created server socket : listening on port 10400
Server startup is successful.
$ cd $MWA_TOP/bin
$ ps -ef|grep 10200
oraprod 17027 1 0 Jun16 ? Sl 0:48 /opt/jdk/bin/java -DPID=17021 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10200
oraprod 21554 19963 0 05:00 pts/3 S+ 0:00 grep 10200
$ ps -ef|grep 10300
oraprod 17059 1 30 Jun16 ? Sl 742:11 /opt/jdk/bin/java -DPID=17053 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10300
oraprod 21580 19963 0 05:00 pts/3 S+ 0:00 grep 10300
$ ./mwactl.sh -login apps/password stop_force 10200
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
Telnet server shut down successfully.
$ ./mwactl.sh -login apps/password stop_force 10300
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
Error: ServerManagerListener returned 'AUTHENTICATION_FAILED'
mwactl: Error shutting down Telnet server
$ ./mwactl.sh -login apps/password stop_force 10400
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
Error: ServerManagerListener returned 'AUTHENTICATION_FAILED'
mwactl: Error shutting down Telnet server
$ ps -ef|grep 10300
oraprod 17059 1 30 Jun16 ? Sl 742:57 /opt/jdk/bin/java -DPID=17053 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10300
oraprod 22006 19963 0 05:01 pts/3 S+ 0:00 grep 10300
$ kill -9 17059
$ ps -ef|grep 10400
oraprod 7845 1 0 Jun17 ? Sl 0:59 /opt/jdk/bin/java -DPID=7843 -Doracle.apps.mwa=/u02/appprod/prodappl/mwa/11.5.0 -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10400
oraprod 22063 19963 0 05:01 pts/3 S+ 0:00 grep 10400
$ kill -9 7845
$ ps -ef|grep 10200
oraprod 22169 19963 0 05:01 pts/3 S+ 0:00 grep 10200
$ ./mwactl.sh start 10200
Created server socket : listening on port 10200
Server startup is successful.
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
$ ./mwactl.sh start 10300
Created server socket : listening on port 10300
Server startup is successful.
$ ./mwactl.sh start 10400
MWA Telnet Server Release: 1.0.8.4 [December 12th 2002]
$ Created server socket : listening on port 10400
Server startup is successful.
Oracle Database Mobile Server Installation
Architecture:
Step 1: Pre-requisites,
1. Oracle Database.
2. Application Server,
Oracle Weblogic (I've used Oracle Weblogic 12c).
(or)
Oracle Glassfish.
(or)
Oracle Application Server.
Step 2: Installing Database Mobile Server,
Unzip the DMS_11.2.0.0.0_LINUX.zip
Go to Disk1-- you can find two folders one for linux 32 bit and another one linux 64 bit, In my case I'm using linux64 bit--> Go to Linux64 folder and run the runInstaller file.
mention JDK_HOME path
First Install Mobile Server
For testing purpose I've installed Mobile Server Demo Application
Here you have to mention your application home path, In my case I've used Oracle Weblogic 12c.
Specify JDK_HOME (Kindly maintain same JDK version)
Create Repository.
Database hostname, port number and service or SID.
Give Database SYSTEM user and password.
Give Mobile Server Repository password and select deploy demo application option (if you installed demo application before).
Creating new domain in weblogic sever.
Testing the Mobile Database Workbench.
Go to--mobile client home location--mobile--sdk--bin-- run the oramdw.sh file.
Step 1: Pre-requisites,
1. Oracle Database.
2. Application Server,
Oracle Weblogic (I've used Oracle Weblogic 12c).
(or)
Oracle Glassfish.
(or)
Oracle Application Server.
Step 2: Installing Database Mobile Server,
Unzip the DMS_11.2.0.0.0_LINUX.zip
Go to Disk1-- you can find two folders one for linux 32 bit and another one linux 64 bit, In my case I'm using linux64 bit--> Go to Linux64 folder and run the runInstaller file.
mention JDK_HOME path
First Install Mobile Server
For testing purpose I've installed Mobile Server Demo Application
Here you have to mention your application home path, In my case I've used Oracle Weblogic 12c.
Specify JDK_HOME (Kindly maintain same JDK version)
Create Repository.
Database hostname, port number and service or SID.
Give Database SYSTEM user and password.
Give Mobile Server Repository password and select deploy demo application option (if you installed demo application before).
Creating new domain in weblogic sever.
Testing the Mobile Database Workbench.
Go to--mobile client home location--mobile--sdk--bin-- run the oramdw.sh file.
MWA Services Start and Stop
Login as applmgr user :
Go to $ADMIN_SCRIPTS_HOME
Stop Mobile Application Services :
mwactl.sh -login apps/apps_password stop_force
mwactlwrpr.sh stop apps/apps_password
Start Mobile Application Services :
mwactl.sh -login apps/apps_password start
mwactlwrpr.sh start apps/apps_password
Check Mobile Services are up and Runing:
ps -ef | grep mwa
Find port Number of Mobile Services :
grep mwa $CONTEXT_FILE
Connect to Mobile Services :
telnet hostname.domainname portnumber(mobile application service port_number)
++++++++++++++++++++++++++++++++++++
Hot to configure Mobile applications on EBS – 11i
++++++++++++++++++++++++++++++++++++
1. Stop the current servers.
a. $ cd $MWA_TOP/bin
b. $ nohup mwactl.sh -login SYSADMIN/sysadmin1 stop 10260
$ netstat -na | grep 10260
c. $ ./mwactl.sh stop_dispatcher
2. Verify that MWA servers are stopped.
a. $ ps -ef | grep mwa
b. No processes should be found.
3. Locate the mwa.cfg file in the $MWA_TOP/secure directory.
4. Edit the mwa.cfg file and configure following parameters
a. Set mwa.DbcFolder=full directory of folder containing the .dbc file ending with “/”:
mwa.DbcFolder=/d01/oracle/SVRSUPTappl/fnd/11.5.0/secure/SVRSUPT_svrsuptsql1
b. Set mwa.DbcFile=dbc file name with extension:
mwa.DbcFile=SVRSUPT
c. Set mwa.logdir=full directory of log file without the trailing “/”:
mwa.logdir=/d01/oracle/SVRSUPTcomn/admin/log/SVRSUPT_svrsuptsql1
d. Set mwa.LogLevel=error or trace:
mwa.LogLevel=error
e. Set mwa.TelnetPortNumber=port number
mwa.TelnetPortNumber=10240
f. Set mwa.DropConnectionTimeout= no. of minutes:
mwa.DropConnectionTimeout=5
g. Set mwa.StaleSessionTimeout= no. of minutes:
mwa.StaleSessionTimeout=60
h. Specify the port number and machine for running the dispatcher:
mwa.Dispatcher=svrsuptsql1.d-rco.com:10328
i. Specify the server manager telnet server information
mwa.TelnetServer=svrsuptsql1.d-rco.com:10260;10262
5. Start the MWA telnet servers
a. $ cd $MWA_TOP/bin
b. $ nohup ./mwactl.sh start 10260 &
6. Start the dispatcher
a. $ nohup ./mwactl.sh start_dispatcher &
++++++++++++++++++++++++++++++++
how to check it is working or not:
Start à Run à cmd à telnet hostame:portnumber ß press enter , it will show 4 options select , appropriate option & give username & password.
++++++++++++++++++++++++++++++++
Another way we need to start up MWA ..
$MWA_TOP/bin/mwactl.sh -login sysadmin/<passwd> start <port no>
$MWA_TOP/bin/mwactl.sh -login sysadmin/<passwd> stop <port no>
netstat -a|grep <port no>
========================================
By default these scripts were not included in adstpall.sh and adstrtal.sh scripts. To add them enable
1. s_other_service_group_status
2. s_mwastatus
in context file and run autoconfig.
If you want to check port number for mwa. Look at following paramters in context file:
1. s_mwaPortNo.
2. s_mwaTelnetPortNo.
===================================
Find port Number of Mobile Services :
grep mwa $CONTEXT_FILE
Connect to Mobile Services :
telnet hostname.domainname portnumber(mobile application service port_number)
Go to $ADMIN_SCRIPTS_HOME
Stop Mobile Application Services :
mwactl.sh -login apps/apps_password stop_force
mwactlwrpr.sh stop apps/apps_password
Start Mobile Application Services :
mwactl.sh -login apps/apps_password start
mwactlwrpr.sh start apps/apps_password
Check Mobile Services are up and Runing:
ps -ef | grep mwa
Find port Number of Mobile Services :
grep mwa $CONTEXT_FILE
Connect to Mobile Services :
telnet hostname.domainname portnumber(mobile application service port_number)
++++++++++++++++++++++++++++++++++++
Hot to configure Mobile applications on EBS – 11i
++++++++++++++++++++++++++++++++++++
1. Stop the current servers.
a. $ cd $MWA_TOP/bin
b. $ nohup mwactl.sh -login SYSADMIN/sysadmin1 stop 10260
$ netstat -na | grep 10260
c. $ ./mwactl.sh stop_dispatcher
2. Verify that MWA servers are stopped.
a. $ ps -ef | grep mwa
b. No processes should be found.
3. Locate the mwa.cfg file in the $MWA_TOP/secure directory.
4. Edit the mwa.cfg file and configure following parameters
a. Set mwa.DbcFolder=full directory of folder containing the .dbc file ending with “/”:
mwa.DbcFolder=/d01/oracle/SVRSUPTappl/fnd/11.5.0/secure/SVRSUPT_svrsuptsql1
b. Set mwa.DbcFile=dbc file name with extension:
mwa.DbcFile=SVRSUPT
c. Set mwa.logdir=full directory of log file without the trailing “/”:
mwa.logdir=/d01/oracle/SVRSUPTcomn/admin/log/SVRSUPT_svrsuptsql1
d. Set mwa.LogLevel=error or trace:
mwa.LogLevel=error
e. Set mwa.TelnetPortNumber=port number
mwa.TelnetPortNumber=10240
f. Set mwa.DropConnectionTimeout= no. of minutes:
mwa.DropConnectionTimeout=5
g. Set mwa.StaleSessionTimeout= no. of minutes:
mwa.StaleSessionTimeout=60
h. Specify the port number and machine for running the dispatcher:
mwa.Dispatcher=svrsuptsql1.d-rco.com:10328
i. Specify the server manager telnet server information
mwa.TelnetServer=svrsuptsql1.d-rco.com:10260;10262
5. Start the MWA telnet servers
a. $ cd $MWA_TOP/bin
b. $ nohup ./mwactl.sh start 10260 &
6. Start the dispatcher
a. $ nohup ./mwactl.sh start_dispatcher &
++++++++++++++++++++++++++++++++
how to check it is working or not:
Start à Run à cmd à telnet hostame:portnumber ß press enter , it will show 4 options select , appropriate option & give username & password.
++++++++++++++++++++++++++++++++
Another way we need to start up MWA ..
$MWA_TOP/bin/mwactl.sh -login sysadmin/<passwd> start <port no>
$MWA_TOP/bin/mwactl.sh -login sysadmin/<passwd> stop <port no>
netstat -a|grep <port no>
========================================
By default these scripts were not included in adstpall.sh and adstrtal.sh scripts. To add them enable
1. s_other_service_group_status
2. s_mwastatus
in context file and run autoconfig.
If you want to check port number for mwa. Look at following paramters in context file:
1. s_mwaPortNo.
2. s_mwaTelnetPortNo.
===================================
Find port Number of Mobile Services :
grep mwa $CONTEXT_FILE
Connect to Mobile Services :
telnet hostname.domainname portnumber(mobile application service port_number)
MSCA/MWA services.
We can’t get connected to PROD thru Telnet.
first check the ports from mwa.cfg and map it with the running mwa ports with
ps ux | grep -i mwa
mwactlwrpr.sh stop apps/apps_pwd
mwactlwrpr.sh start apps/apps_pwd
telnet hostname mwaport
$ ps -ef|grep oratest oratest 29516 1 0 Oct21 ? 00:01:26 /u02/apptest/fs2/EBSapps/comn/util/jdk32/bin/java -Dxdo.xliff.source=EBS -DCLIENT_PROCESSID=29516 -Doracle.apps.mwa=/u02/apptest/fs2/EBSapps/appl/mwa/12.0.0 -Doracle.apps.jrad.mmd=/u02/apptest/fs2/FMW_Home/Oracle_EBS-app1/applications/oacore/html/jrad -Doracle.apps.inst=/u02/apptest/fs2/inst/apps/TEST_host -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10260 oratest 29540 1 0 Oct21 ? 00:01:24 /u02/apptest/fs2/EBSapps/comn/util/jdk32/bin/java -Dxdo.xliff.source=EBS -DCLIENT_PROCESSID=29540 -Doracle.apps.mwa=/u02/apptest/fs2/EBSapps/appl/mwa/12.0.0 -Doracle.apps.jrad.mmd=/u02/apptest/fs2/FMW_Home/Oracle_EBS-app1/applications/oacore/html/jrad -Doracle.apps.inst=/u02/apptest/fs2/inst/apps/TEST_host -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10262 oratest 29567 1 0 Oct21 ? 00:01:25 /u02/apptest/fs2/EBSapps/comn/util/jdk32/bin/java -Dxdo.xliff.source=EBS -DCLIENT_PROCESSID=29567 -Doracle.apps.mwa=/u02/apptest/fs2/EBSapps/appl/mwa/12.0.0 -Doracle.apps.jrad.mmd=/u02/apptest/fs2/FMW_Home/Oracle_EBS-app1/applications/oacore/html/jrad -Doracle.apps.inst=/u02/apptest/fs2/inst/apps/TEST_host -mx512m -ms128m oracle.apps.mwa.presentation.telnet.Listener 10264 oratest 29584 1 0 Oct21 ? 00:00:00 /bin/sh -f /u02/apptest/fs2/inst/apps/TEST_host/admin/scripts/mwactl.sh start_dispatcher oratest 29589 29584 0 Oct21 ? 00:00:01 /u02/apptest/fs2/EBSapps/appl/mwa/12.0.0/bin/MWADIS $ mwactlwrpr.sh stop apps/apps Stopping MWA Servers and the dispatcher .... Stopping MWA Server on Port number: 10260 Stopping MWA Server on Port number: 10262 Stopping MWA Server on Port number: 10264 Stopping MWA Dispatcher on Port number: 10830 $ ps -ef|grep oratest ... oratest 29584 1 0 Oct21 ? 00:00:00 /bin/sh -f /u02/apptest/fs2/inst/apps/TEST_host/admin/scripts/mwactl.sh start_dispatcher oratest 29589 29584 0 Oct21 ? 00:00:01 /u02/apptest/fs2/EBSapps/appl/mwa/12.0.0/bin/MWADIS $ mwactl.sh stop_dispatcher apps/apps MWA Telnet Server Release: 1.0.8.4 [December 12th 2002] Telnet dispatcher shut down successfully. $ ps -ef|grep oratest ... oratest 29584 1 0 Oct21 ? 00:00:00 /bin/sh -f /u02/apptest/fs2/inst/apps/TEST_host/admin/scripts/mwactl.sh start_dispatcher oratest 29589 29584 0 Oct21 ? 00:00:01 /u02/apptest/fs2/EBSapps/appl/mwa/12.0.0/bin/MWADIS
MWA connection by Machine:
sqlplus -s "/ as sysdba" <
set echo off
set pagesize 220
set markup html on spool on
spool ${SPOOL_FILE_MWA}
TTITLE CENTER 'Hourly Report - MWA sessions Count By Machine'
select count(machine),machine from v$session where module='MWAJDBC' group by machine
/
ALTER SESSION
SET NLS_DATE_FORMAT = 'YYYY MM DD HH24:MI:SS';
select machine,action,logon_time,last_call_et,status from v$session where module='MWAJDBC'
order by machine
/
spool off
set markup html off spool off
EOF
select count(machine),machine from v$session where module='MWAJDBC' group by machine
sqlplus -s "/ as sysdba" <
set echo off
set pagesize 220
set markup html on spool on
spool ${SPOOL_FILE_MWA}
TTITLE CENTER 'Hourly Report - MWA sessions Count By Machine'
select count(machine),machine from v$session where module='MWAJDBC' group by machine
/
ALTER SESSION
SET NLS_DATE_FORMAT = 'YYYY MM DD HH24:MI:SS';
select machine,action,logon_time,last_call_et,status from v$session where module='MWAJDBC'
order by machine
/
spool off
set markup html off spool off
EOF
select count(machine),machine from v$session where module='MWAJDBC' group by machine
===================================
MWA SETUP, TESTING, ERROR LOGGING AND DEBUGGING
Contains:
1. Where the Mobile Web Apps config files are located
2. MWA Startup and Shutdown Scripts and how those are used
3. Directory Structure for MWA R12.2
4. How to develop and test your pages
5. Where the log files are created, and tips to debug MWA Applications
Configuration Files
mwa.cfg: This file has information about the DBC file location, Log Dir Location, Telnet Port no Location, Error Logging Level etc.
This info will be used by Mobile Applications on runtime.
default_key.ini: This file is used to map the keys of the mobile device to some specific functionality.
Use the default file if you don’t want to customize anything.
deviceIP.ini: This file maps the configuration files and host name with the mobile device
MWA server start-up and shutdown:
mwactl.sh: This file is used to start/stop the MWA listener on specific port.
Basically, if you develop and deploy a Mobile page into the instance, you have to bounce the MWA server by
stopping and starting the Listener at your port to see your changes.
Start/stopping Listener
Start:
mwactl.sh start
Stop :
mwactl.sh -login stop_force
File Location
Directory structure in R12
$INST_TOP/admin/scripts
$INST_TOP/admin/install
(eg)In R12, INST_TOP may look like:
/u01/appapdba/DEV/inst/apps/DEV_w-apdbablog
MWA GUI Client Setup
In order to simulate the Mobile Device on your PC, you have to do the following setup:
Step 1:
Create 2 directories say C:\MWA\lib and C:\MWA\log
Extract the files from the patch 4205328 into C:\MWA\lib
Step 2:
Download jdk1.1.8 from java.sun.com and place it in C:
Step 3:
Create a batch file say Start_MWA.bat with the following contents
set MWA_GUI_TOP=C:\MWA\
set JAVA_TOP=c:\jdk1.1.8
%JAVA_TOP%\bin\java -classpath %JAVA_TOP%\lib\classes.zip;%MWA_GUI_TOP%\lib\j4205328.zip oracle.apps.mwa.awt.client.StartGUI
Step 4:
Whenever you run this batch file, you must be able to see the GUI client for MWA
Development and Deployment:
The development of Mobile Applications can be done using any IDE like JDeveloper, Eclipse etc. After that in order to
test the application, we have to deploy it in the Apps instance say in a directory like $JAVA_TOP/xxx/custom/server.
In order to test it, we should have our own function in AOL. This function should refer to the Function Java Class
name of the Mobile Application
(eg) xxx.custom.server.CustomTestFunction
we have to attach this function to submenu and then to the Mobile Navigation Menu
your menu entry will come into your mobile application and you can test your new pages
MWA Error Logging and Debugging:
When you develop and test mobile applications, you may need to write some logging information which will be useful in debugging.
There are different levels of Logging that can be set for obtaining more debug information.
The different Log level from highest to lowest is as follows:
fatal
error
warning
debug
trace
This logging information can be set using the “mwa.LogLevel” variable in mwa.cfg file.
How to write logging information?
While we code, we can call the APIs to log the information. The methods used for logging can be found in the following Java helper class.
oracle.apps.inv.utilities.server.UtilFns
For example, we can use the following code snippets and based on the log level set, we can find this information from the log files.
UtilFns.trace("#########Trace Level Logs#########");
UtilFns.log("#########Log level logs#########");
UtilFns.error("#####Error Level logs#########");
There are lot of other utility APIs available in this helper class (UtilFns.java) which can be used for various other aspects.
Example code snippet for error logging:
public void fieldEntered(MWAEvent mwaevent)
{
UtilFns.trace("Inside Field Entered");
ses = mwaevent.getSession();
String s = UtilFns.fieldEnterSource(ses);
// Prints the Current Bean's ID
UtilFns.trace("CustomFListener:fieldEntered:fldName = " + s);
}
In the above snippet, we print a message “Inside Field Entered” when the user enters any field in the Mobile Application
Also, we print the name of the field using the line
UtilFns.trace("CustomFListener:fieldEntered:fldName = " + s);
Please note that, the above log messages can be found only when the log level is set to “trace” in mwa.cfg file.
Where to look for log information?
The log files are located under $INST_TOP/logs (in R12).
Mainly we will be using the following log files to see our log files.
All the log files start with Telnet_port_no as a prefix.
Example log files for port no 10240:
[appapdba@w-apdbablog logs]$ pwd
/u01/appapdba/DEV/inst/apps/DEV_w-apdbablog/logs
[appapdba@w-apdbablog logs]$ ls -al 10240*
-rw-r--r-- 1 appapdba dba 255626 Feb 8 13:28 10240.INV.log
-rw-r--r-- 1 appapdba dba 83 Feb 8 13:26 10240.sta
-rw-r--r-- 1 appapdba dba 154063 Feb 8 13:50 10240.system.log
-rw-r--r-- 1 appapdba dba 3296 Feb 4 11:11 10240.WMS.log
[appapdba@w-apdbablog logs]$
All the log information written using the “UtilFns” will be located under .INV.log
All the system level log like page names, parameter passed to PLSQL APIs, LOVs etc can be found under .system.log
Easiest way to look at log files:
Since the volume of information written in the log file is huge, it is tough to go through the entire file.
A simpler way which I used to find the log information is to run the command
tail -f 10240.INV.log
you can see the updated log information as and when you click on the fields on mobile application.
MWA SETUP, TESTING, ERROR LOGGING AND DEBUGGING
Contains:
1. Where the Mobile Web Apps config files are located
2. MWA Startup and Shutdown Scripts and how those are used
3. Directory Structure for MWA R12.2
4. How to develop and test your pages
5. Where the log files are created, and tips to debug MWA Applications
Configuration Files
mwa.cfg: This file has information about the DBC file location, Log Dir Location, Telnet Port no Location, Error Logging Level etc.
This info will be used by Mobile Applications on runtime.
default_key.ini: This file is used to map the keys of the mobile device to some specific functionality.
Use the default file if you don’t want to customize anything.
deviceIP.ini: This file maps the configuration files and host name with the mobile device
MWA server start-up and shutdown:
mwactl.sh: This file is used to start/stop the MWA listener on specific port.
Basically, if you develop and deploy a Mobile page into the instance, you have to bounce the MWA server by
stopping and starting the Listener at your port to see your changes.
Start/stopping Listener
Start:
mwactl.sh start
Stop :
mwactl.sh -login stop_force
File Location
Directory structure in R12
$INST_TOP/admin/scripts
$INST_TOP/admin/install
(eg)In R12, INST_TOP may look like:
/u01/appapdba/DEV/inst/apps/DEV_w-apdbablog
MWA GUI Client Setup
In order to simulate the Mobile Device on your PC, you have to do the following setup:
Step 1:
Create 2 directories say C:\MWA\lib and C:\MWA\log
Extract the files from the patch 4205328 into C:\MWA\lib
Step 2:
Download jdk1.1.8 from java.sun.com and place it in C:
Step 3:
Create a batch file say Start_MWA.bat with the following contents
set MWA_GUI_TOP=C:\MWA\
set JAVA_TOP=c:\jdk1.1.8
%JAVA_TOP%\bin\java -classpath %JAVA_TOP%\lib\classes.zip;%MWA_GUI_TOP%\lib\j4205328.zip oracle.apps.mwa.awt.client.StartGUI
Step 4:
Whenever you run this batch file, you must be able to see the GUI client for MWA
Development and Deployment:
The development of Mobile Applications can be done using any IDE like JDeveloper, Eclipse etc. After that in order to
test the application, we have to deploy it in the Apps instance say in a directory like $JAVA_TOP/xxx/custom/server.
In order to test it, we should have our own function in AOL. This function should refer to the Function Java Class
name of the Mobile Application
(eg) xxx.custom.server.CustomTestFunction
we have to attach this function to submenu and then to the Mobile Navigation Menu
your menu entry will come into your mobile application and you can test your new pages
MWA Error Logging and Debugging:
When you develop and test mobile applications, you may need to write some logging information which will be useful in debugging.
There are different levels of Logging that can be set for obtaining more debug information.
The different Log level from highest to lowest is as follows:
fatal
error
warning
debug
trace
This logging information can be set using the “mwa.LogLevel” variable in mwa.cfg file.
How to write logging information?
While we code, we can call the APIs to log the information. The methods used for logging can be found in the following Java helper class.
oracle.apps.inv.utilities.server.UtilFns
For example, we can use the following code snippets and based on the log level set, we can find this information from the log files.
UtilFns.trace("#########Trace Level Logs#########");
UtilFns.log("#########Log level logs#########");
UtilFns.error("#####Error Level logs#########");
There are lot of other utility APIs available in this helper class (UtilFns.java) which can be used for various other aspects.
Example code snippet for error logging:
public void fieldEntered(MWAEvent mwaevent)
{
UtilFns.trace("Inside Field Entered");
ses = mwaevent.getSession();
String s = UtilFns.fieldEnterSource(ses);
// Prints the Current Bean's ID
UtilFns.trace("CustomFListener:fieldEntered:fldName = " + s);
}
In the above snippet, we print a message “Inside Field Entered” when the user enters any field in the Mobile Application
Also, we print the name of the field using the line
UtilFns.trace("CustomFListener:fieldEntered:fldName = " + s);
Please note that, the above log messages can be found only when the log level is set to “trace” in mwa.cfg file.
Where to look for log information?
The log files are located under $INST_TOP/logs (in R12).
Mainly we will be using the following log files to see our log files.
All the log files start with Telnet_port_no as a prefix.
Example log files for port no 10240:
[appapdba@w-apdbablog logs]$ pwd
/u01/appapdba/DEV/inst/apps/DEV_w-apdbablog/logs
[appapdba@w-apdbablog logs]$ ls -al 10240*
-rw-r--r-- 1 appapdba dba 255626 Feb 8 13:28 10240.INV.log
-rw-r--r-- 1 appapdba dba 83 Feb 8 13:26 10240.sta
-rw-r--r-- 1 appapdba dba 154063 Feb 8 13:50 10240.system.log
-rw-r--r-- 1 appapdba dba 3296 Feb 4 11:11 10240.WMS.log
[appapdba@w-apdbablog logs]$
All the log information written using the “UtilFns” will be located under .INV.log
All the system level log like page names, parameter passed to PLSQL APIs, LOVs etc can be found under .system.log
Easiest way to look at log files:
Since the volume of information written in the log file is huge, it is tough to go through the entire file.
A simpler way which I used to find the log information is to run the command
tail -f 10240.INV.log
you can see the updated log information as and when you click on the fields on mobile application.
Subscribe to:
Comments
(
Atom
)