Apps Log in Flow
Apps Log in Flow
Bookmark
Go to End
Doc ID: Note:273449.1 Subject:Diagnosing Login Problems with Apps 11.5.9 (FND.G) Type: BULLETIN Status: UNDER_EDIT
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT ORACLE INTERNAL USE ONLY - DO NOT SEND TO CUSTOMERS This document is very much work in progress, and is currently more like some notes I've made, rather than a note anyone can use ! By all means try to use this information, but come back frequently to see how I am getting on, as I do intend to make it more comprehensible ORACLE INTERNAL USE ONLY - DO NOT SEND TO CUSTOMERS
*** This article is being delivered in Draft form and may contain errors. Please use the MetaLink "Feedback" button to advise Oracle of any issues related to this article. ***
See note 226825.1 - Release 11i, Oracle Application Object Library Mini-pack FND.G This is a shortcut defined in zone.properties as below servlet.AppsLogin.code=oracle.apps.fnd.sso.AppsLogin "Self Service Personal Home Page Mode" profile option should be set to "Framework Only" to see the new Framework based Homepage. Setting to "Personal Home Page" reverts the Homepage to the old style look and feel.
Login Flow
/oa_servlets/Appslogin servlet
Gets WebAppsCOntext Sets requestURL = APPSHOMEPAGE unless passed as a parameter. Sets cancelUrl = oracle.apps.fnd.sso.SSOManager.getLoginUrl(); unless passed as a parameter. This finds profile option APPS_SERVLET_AGENT (Apps Servlet Agent) and returns error if cannot get. Sets variable "url" using oracle.apps.fnd.sso.SSOManager.getLoginRedirectUrl sets Mode using Utils.getSSOMode() which gets profile option APPS_SSO (Applications SSO Type) SSWA is set by default if not profile option. Depending on mode, sets url = LOCAL_LOGIN | SSO_LOGIN_REDIRECT | PORTAL if SSWA = SSOUtil.getLocalLoginUrl() This gets profile option APPS_LOCAL_LOGIN_URL (Applications Local Login URL) (AppsLocalLogin.jsp for example) and prepends '/OA_HTML/' if PORTAL = SSOUtil.getPortalUrl() This gets profile option APPS_PORTAL (Applications Portal) This is full URL normally pointing to /pls/XXX_portal30/portal30.home Then calls "constructUrl" to determine the URL to return, which builds URL consisting of url, requestURL, cancelURL, errCode, langCode, errText and home_url parameters If "url" is null, then returns FND-9930 error code, otherwise will redirect to the constructed URL At this point, we have got as far as rendering the Username/PAssword entry screen... /OA_HTML/AppsLocalLogin.jsp or portal30.home
/OA_HTML/AppsLocalLogin.jsp
Gets Profile options FND_BRANDING_SIZE (FND: Branding Size) and ICX_LANGUAGE (ICX: Language) Sets up some message text (Message.class) Uses Package FND_MESSAGE.GET_MESSAGE_INTERNAL () Once we click "Login" button we follow through as below:-
fndvald.jsp
Utils.getConnection() - this throws FND-9902 if cannot get DB connection. SessionMgr.createAppsSession which itself calls wctx.getSessionManager().validateLogin followed by createSession if username.password validated OK. There is some STATEMENT level diagnostics messages from here (for oracle.apps.fnd.sso.SessionMgr) Gets Cookie name from dbc file ICX_COOKIE_NAME or otherwise calls package FND_SESSION_MANAGEMENT.getsessioncookiename Creates SSO Cookie for new user session If requestURL = APPSHOMEPAGE it calls SSOUtil.getHomePage otherwise just passes requestURL through... This calls computeURL, which looks for profile option APPLICATIONS_HOME_PAGE (Self Service Personal Home Page mode) Runs getEnvStore90.getEnv(ICX_PV_SESSION_MODE) which I dont understand... but seems to be 115P | 115J ? If APPLICATIONS_HOME_PAGE = "PHP" or "PHP_FWK" then will set URL = PLSQL_AGENT/OracleNavigate.Responsibility else (for example "FWK") will set URL = "/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE&dbc=" + AppsAgent.getDBC()
OA.jsp
oracle.apps.fnd.framework.webui.OAPageBean.class oracle.apps.fnd.framework.webui.OAJSPHelper Uses OAJSPHelper to set character encoding for the session, mainly by getting ICX_CLIENT_IANA_ENCODING (ICX: Client IANA Encoding) profile option Then sets redirectURL = pageBean.preparePage Sets flag for Portlet or not Sets functionName from the parameters in the URL (OAHOMEPAGE for example, if URL param is ?OAFunc=OAHOMEPAGE) Sets redirectURL = preparePage() method... this calls "redirectURL = validateUser()" but I think this should return null if I have logged in (this seems to be to do with bookmarkable URLs) sets funcURL = createRFURL() This does some session validation, then calls OAPageContextImpl.createRFURL Which calls FunctionSecurity.getFunction and Function.getFunction... This bit runs SQL to find FunctionID "select function_id from fnd_form_functions where function_name = :1" Then "select function_name, context_dependence, maintenance_mode_support, parameters, type, web_agent_name, web_host_name, web_html_call, web_icon, form_id from fnd_form_functions where function_id = :1" For OAHOMEPAGE the following will be set web_html_call = "OA.jsp?page=/oracle/apps/fnd/framework/navigate/webui/HomePG&homePage=Y&OAPB=FWK_HOMEPAGE_BRAND"
1 of 4
10/20/2005 6:48 PM
http://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_...
type = "JSP" isOAFCall is set to TRUE (as the URL has OA.jsp in the URL) funcCall = web_html_call hasTransactionId = FALSE so adds "&transactionid=xxx" to the funccall then returns this as the new url This new URL is returned to OA.jsp as the redirectURL, so we call OA.jsp with some different parameters.....
OA.jsp - part 2
By now, we should have URL something like: OA.jsp?page=/oracle/apps/fnd/framework/navigate/webui/HomePG&homePage=Y&OAPB=FWK_HOMEPAGE_BRAND&transactionid=xxxxxxx Back into "redirectURL = pageBean.preparePage()" regionCode = OAPageContextImpl.getUrlParameter(request, "page") (page=/oracle/apps/fnd/framework/navigate/webui/HomePG) //Get the application module java class from AK. OAApplicationModule staticAppMod = OAJSPApplicationRegistry.getStaticAKApplicationModule(mRequest); This creates AM called "oracle.apps.fnd.framework.server.OAApplicationModule" with DB connection. Creates MDS context, seems to have handles to MDS repository. Gets page region, using WebBeanTypeData, from MDS repository. Gets transaction_ID Get profile option "FND_FORCE_PAGE_REFRESH" Get profile option "FND_CUSTOM_OA_DEFINTION" < This bit still WIP >
Check versions
Java
(adident Header $OA_JAVA/)
oracle/apps/fnd/sso/AppsLogin.class oracle/apps/fnd/sso/SSOManager.class oracle/apps/fnd/sso/Utils.class oracle/apps/fnd/sso/SSOUtil.class oracle/apps/fnd/common/Message.class oracle/apps/fnd/sso/SessionMgr.class oracle/apps/fnd/common/WebAppsContext.class oracle/apps/fnd/framework/webui/OAPageBean.class oracle/apps/fnd/framework/webui/OAJSPHelper.class oracle/apps/fnd/framework/webui/OAWebBeanConstants.class oracle/apps/fnd/framework/webui/OAPageContextImpl.class oracle/apps/fnd/framework/OAFwkConstants.class oracle/apps/fnd/functionSecurity/Function.class oracle/apps/fnd/framework/mds/OAMDSContextUtils.class
JSP
(adident Header $OA_HTML/)
AppsLocalLogin.jsp fndvald.jsp OA.jsp
Login to Applications using the Apps Username you specified above. Any error or problem you experiance will still occur, but the file /tmp/OAF_Debug.txt should be created with some diagnostics information. Please upload this file to Oracle Support for further analysis. After you have created this diagnostics file, you should disable logging by setting the USER level profile option listed below:Name Value --------------------------------------------FND: Debug Log Enabled No
Alternatively you can set parameters in the Jserv.properties file to turn on OAF logging for all user sessions (this is not a good idea as it sounds, as performance will be MASSIVELY slow)
wrapper.bin.parameters=-DAFLOG_ENABLED=TRUE wrapper.bin.parameters=-DAFLOG_LEVEL=STATEMENT wrapper.bin.parameters=-DAFLOG_MODULE=% wrapper.bin.parameters=-DAFLOG_FILENAME=/tmp/OAF_Debug.txt
Portal
In <Context>.xml set "s_fwk_debuglevel"
2 of 4
10/20/2005 6:48 PM
http://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_...
This adds servlet.framework.initArgs=debuglevel=x in the zone.properties and you get additional info into the jserv.log file
debugLevel not specified - no performance logging debugLevel=0 - switches on performance logging debugLevel=1 - switches on performance logging & Test Page debugLevel=2 - switches on performance logging & portletTimeout logging
Refer Portal Diagnostics note 242479.1 for more information (and also note 227798.1 possibly) and note 186586.1 for Performance analysis Enable logging by running $APACHE_TOP/portal30/admin/plsql/wwc/prodebug.sql and entering a value of 2. This will enable logging only for Web Provider framework. The following are the values that you could use for switching logging on different modules within Provider Framework.
All modules within Provider Framework : 1 Web Provider framework :2 Portlet Metadata Repository :3 Provider framework(PROPROV) :4 Dologin, LMD , Provider Signon(PROLOGIN) : 5 Provider registry APIs :6
Note: The options that this script suggests will be only 0 and 1, but you could enter any value. Perform the operation in portal that results in the call that you are debugging. Run Portal diags script below to query the log tables for informations.
PPE Logging
Add "servlet.page.initArgs=logmode=debug" to zone.properties (or logmode=perf perhaps) This data is written to jserv.log
Modplsql
Meybe setup modplsql logging - see note 116715.1 This data is collected in error_log
General
Use Note 169490.1 to run Portal Diagnostic Agent and look at the output. This output is prerequisite information if raising any Portal related bug anyway....
Check messages
REM START OF SQL REM REM Description : script to check messages REM REM spool messages.txt select message_text from fnd_new_messages m, fnd_application a where upper('&message_name') = m.message_name and upper('&language_code') = m.language_code and upper('&application_short_name') = a.application_short_name and m.application_id = a.application_id / spool off REM END OF SQL
3 of 4
10/20/2005 6:48 PM
http://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_...
and name = upper('&enter_package_name') order by line / spool off REM END OF SQL
4 of 4
10/20/2005 6:48 PM