Monday, January 12, 2015

EBS R12 -- Missing class: _AppsLocalLogin error, jsp auto-compilation, Allowed JSP feature in EBS 12.2

We may encounter a login problem in both EBS 11i and R12
Our services may be up and running, our Http server may be responding, but in the background our oacore server may be in doubt with the error : Missing Class  _AppsLocalLogin ..

We can see this by analyzing the log files of oacore server.
Note that:
For all login problems or lets say for all oaf problem, we need to analyze the oacore server's log file beforehand...

In EBS R12 (12.0 and 12.1), the logfile is located in $LOG_HOME/ora/10.1.3/j2ee/oacore/oacore_default_group_1 or
$INST_TOP/logs/ora/10.1.3/j2ee/oacore/oacore_default_group_1

In 12.2, however, we have FMW infrastructure, thus it is in $EBS_DOMAIN_HOME/servers/oacore_server1/logs/

In this particular problem  (Missing Class  _AppsLocalLogin) , we are actually  against a cache corruption problem.
Clearing the cache and restarting the services , will do the job.

I mean;
The solution is;
perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p 2
Restart the application services
Clear browser caches (just in case) and retry

Okay .. That's it..
but there is someting wrong with this post :) It is so boring, right?

So , lets go a little bit further by examining the jsp caching process in EBS R12 ..
In EBS R12 (except 12.2) the jsp pages are cached in $COMMON_TOP/_pages directory.
In EBS 12.2 cached classes are stored in  $EBS_APPS_DEPLOYMENT_DIR/oacore/html/WEB-INF/classes/_pages
Anyways, when we execute ls in$ COMMON_TOP/_pages,  we will see the following;

ls -al |grep Apps
-rw-r--r-- 1 applprod dba  25723 Nov 25  2008 _AppsChangePassword.class
-rw-r--r-- 1 applprod dba   9304 Apr 21  2011 _AppsLocalLogin.class
-rw-r--r-- 1 applprod dba   8805 Apr 21  2011 _AppsLocalLogout.class
-rw-r--r-- 1 applprod dba   5441 Jan  5  2007 _SSOAppsLogout.class

As you see, the name of the classes in this cache directory starts with "_" :)
So, that 's why we clear the cache and compile jsps(just in case) 

Okay.. Also , we know that In Release 12 the (automatic) compilation of a JSP is disabled and, at runtime, only the pre-compiled JSP's are picked up. Since this requires fewer checks to be done, the performance is improved and therefore this is the recommended and default setting for a Production environment where JSP's will only be replaced occasionally.
Okay... This explains the behavior of EBS..
Now it is clear..That is, if the precompiled jsp is corrupt in cache, then we cant use it.. 
In order to get rid of this, we need to modify the jsp file(if it is corrupt in its source location) , delete the cached file, compile the modified jsp and bounce oacore services.

This routine can be changed, though. We can enable auto-compilation and make JSP recompiled automatically when the JSP is changed (at least the time stamp). We dont need to restart oacore or anything.

Following is the action plan for enabling auto-compilation:

The objective is to change the setting for main_mode from justrun to recompile in
$INST_TOP /ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

Login into E-Business suite and select System Administrator responsibility
Select function AutoConfig (under Oracle Applications Manager) (*)
For each web tier server perform the following:
Click on pencil icon under Edit Parameters
Select tab System
Expand section jtff_server
Change value for the entry s_jsp_main_mode from justrun to recompile
Confirm the change by clicking Save button
Run AutoConfig to propagate the changes to the configuration files

Verify that the $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml has the following:
<init-param> <param-name>main_mode</param-name> <param-value>recompile</param-value> </init-param>

Restart the web tier services
Request a JSP in the browser which is compiled. See that a new _<jspname>.class is created in _pages
Make a change in the JSP file
Request it again in the browser. See that _<jspname>.class is 'refreshed' in _pages and the change is seen in the browser.

(*) If the Autoconfig function is not available it can also be accessed by selecting other function for Oracle Application Manager and then select Site Map > System Confiration - Autoconfig. Also the Autoconfig function can be added to the menu as follows:
Log in as System Administrator and select System Administrator
Application>Menu
Put the system into query\
In Menu enter OAM_ADMIN_MENU
Run the query: This should return Oracle Applications Manager Administrator menu
Add new line
Enter Prompt = Autoconfig + Function select OAM_AD_CONFIG_FILES_TABLE and ensure Grant is ticked
Save
After recompilation (and possibly bounce) the new function will be available to be used in the future


This, however; can not be implemented in 12.2(The Enhancement Request 18187079 "REQUEST FOR COMPILATION ON THE FLY FOR JSP PAGES IN RELEASE 12.2" (INTERNAL) ).
On the other hand; EBS 12.2 brings new security feature named  Allowed JSP..  
This new feature gives a white-list of JSP allowed to be called and any other JSP will be blocked..

You can read more about Allowed JSP feature in Oracle E-Business Suit Security Guide Release 12.2 Part No. E22952-09..

Okay, now this post looks ok :) 
I hope you 'll find it useful.

2 comments :

  1. Thanks Erman, this is extremely useful, and I like how you show details about how to find the _pages directory.

    ReplyDelete
  2. Thank you. I had forgotten that the JSPs are not compiled at runtime in R12, this reminded me.

    ReplyDelete

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.