Thursday, April 7, 2016

R12- Beware Of Executing rm -rf $COMMON_TOP/_pages/

R12- Beware Of Executing rm -rf $COMMON_TOP/_pages/

Clearing Java classes caching in R12.
If you have worked in 11i, you might have done many times, clearing the caches by running
rm -rf $COMMON_TOP/_pages/*

But in R12 if you do that, your login page will not come up, You will see blank screen.

Why? In R12, on the fly compilation of JSP's are disabled.

In R12, by default,
s_jsp_main_mode is set justrun Instead of recompile (which is 11i setting) in $CONEXT_FILE

which will be propagated to oacore config file
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

Implication of this Change:

When main_mode = justrun the OC4J container running the OACoreGroup is told that no compilation on the fly is allowed and only (pre)compiled classes are picked up.
Since this requires less checks to be done the performance is improved. Therefore is this the recommended 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.
In development environment you may would like to change to 11i setting level.

If you have accidentally removed _pages directory, don't worry, you can get back jsp's. but its going to take around 20 minutes of time to generated compiled .class and .java files under _pages directory. If you are at R12.0.3 level, much improved version of ojspCompile.pl utililty reduces time required to compile the jsp's.

compilation of Jsp's can be done by,
$FND_TOP/patch/115/bin/ojspCompile.pl --compile --quiet

Reference metalink Doc ID 458338.1

No comments:

Post a Comment