Wednesday, August 10, 2011

How to Enable Automatic Compilation of JSP pages in R12 Environment

In Release 11i, the deployment of a (custom) JSP was done as follows:
  1. Copy the file (for example: custom.jsp) to the web tier in the $OA_HTML directory.
  2. Request it in the browser like URL> http://:/OA_HTML/custom.jsp.
The result on the web tier is that:
  • The custom.jsp was compiled
  • Output files of the compilation _custom.class (and _custom.java) are saved under the _pages directory
  • The custom.jsp page is shown in the browser
Performing the same steps in Release 12 environment just shows a blank screen and no compilation of the custom.jsp is done. The steps in this Note explain how the same behavior as in Release 11i can be achieved in Release 12.

Solution

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.

In cases where development activities are done and JSP pages are changing often this default setting makes things more complicated. Each time a JSP is deployed a manual compilation using the ojspCompile.pl is needed and the OC4J running the oacore needs a restart to pick up the changes. This will also affect other people working on the same environment.

Follow the steps below to:
  • Automatically have the JSP recompiled when the JSP is changed (at least the time stamp)
  • See the new JSP without the need to restart the OC4J running oacore
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

This can be achieved by performing the following:

  • 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:
      

main_mode
recompile
  • Restart the web tier services
  • Request a JSP in the browser which is compiled. See that a new _.class is created in _pages
  • Make a change in the JSP file
  • Request it again in the browser. See that _.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

Metalink#458338.1

How To Clear Caches (Apache/iAS, Cabo, Modplsql, Browser, Jinitiator, Java, Portal, WebADI) for E-Business Suite?

Metalink [ID 742107.1]

Apache / iAS

- shutdown iAS server
- go to $OA_HTML (for 11.5.9) or $COMMON_TOP (for 11.5.10.x) directory
- backup the directory _pages and delete its contents by running for instance:

rm -rf $COMMON_TOP/_pages/*

- for modplsql caches remove contents of $IAS_ORACLE_HOME/Apache/modplsql/cache directory
- restart iAS server


To clear middle tier cache in release 12:

- go to "Functional Administrator" responsibility
- select Core Services => Caching Framework => Global Configuration => Clear cache


Cabo

Images and style sheets can be corrupted or out of sync in the cabo caches,
you may need to clear the related directories after backup:

$OA_HTML/cabo/images/cache
$OA_HTML/cabo/styles/cache


Web Browser


for Netscape:

- go to menu Edit => Preferences…,
- choose 'Cache' in 'Advanced' category,
- click on buttons 'Clear Memory Cache' and 'Clear Disk Cache'.
- close all Netscape windows and restart new browser session.

for Internet Explorer:

- go to menu Tools => Internet Options…,
- select Genera' tab,
- click on button 'Delete Files' in 'Temporary Internet files' zone
- close all IE windows and restart new browser session.

for Mozilla Firefox:

- go to menu Tools
- select 'Clear Private Data...' to clear the entire cache
or
- go to menu Edit or Tools
- select Preferences or Options.
- expand the Advance' options and choose Cach' or Privacy
- click the button called Clear Cache.

for Safari:

- go to Safari menu
- select Empty Cache => Click 'Empty' in the dialogue box


Jinitiator

Two possibilities depending of the Jinitiator version:

for 1.1.8.x versions:

- delete all files in directory:

C:\Program Files\Oracle\Jinitiator \jcache\

for 1.3.1.x versions:

- go to Start => Parameters => Control Panel
- double-click on "Jinitiator " icon
- in the new pop-up window, click on "Cache" tab
- click on "Clear Jar Cache " button. On prompt, click Yes.

(you can also delete directly all files under directory:
C:\Documents and Settings\\Oracle Jar Cache)


Java

Java/JRE plug-in (Windows)

- go to Start => Parameters => Control Panel
- double-click on "Java" icon
- in the new pop-up window, click on "General" tab
- click on "Delete Files..." button (you can select Applets, Applications or other files before)

JVM

- go to responsibility "Functional Administrator"
- click on "Core Services" tab then the "Caching Framework" sub-tab
- click on "Global Configuration" link then click on "Clear all cache" button to clear all of the Java Cache's


Portal

- go to the url: http://:/pls/admin_/gateway.htm or cache.htm
- click on "Cache Settings" option and note the "Cache Directory"
- go to this directory and delete all the cache files in the directory and sub directories

See also modplsql caches in Apache/iAS section above.


WebADI / BNE cache

For instance when enabling BNE log

- go to url: http://:/oa_servlets/oracle.apps.bne.framework.BneAdminServlet
- click on the "clear-cache" link
- at the bottom of the page you should see 'Cache Cleared'


EBS R12 Unix Structure

To see OAF SOP(System.out.println) output in R12:
cd $INST_TOP/logs/ora/10.1.3/opmn/oacore_default_group_1
tail -100f oacorestd.out