Saturday, March 23, 2013

WARNING: VERSION_DISPLAY_ENABLED_IN_PRODUCTION_STAGE

We have seen the following warnings in the WebLogic server log file:
  • WARNING: VERSION_DISPLAY_ENABLED_IN_PRODUCTION_STAGE The setting to enable version display will be ignored because the application is running in production mode.

In this article, we will show you:
  • How to eliminate those warnings from the server log file
  • How to patch web.xml in the StoreFrontModuleNew.ear

How to Eliminate "WARNING: VERSION_DISPLAY_ENABLED_IN_PRODUCTION_STAGE"?


To eliminate those warnings, you need to modify the following context parameter in the web.xml file:

<context-param>
<description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
<param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
<param-value>false</param-value>
</context-param>

by changing its value from false to true. Note that parameter
  • oracle.adf.view.rich.versionString.HIDDEN 
determines whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information or not.

How to Patch web.xml in Java EAR File?


StoreFrontModuleNew.ear is the application deployed in the WebLogic server for our ADF FOD benchmark.  Here is the location of web.xml in the StoreFrontModuleNew.ear file.

StoreFrontModuleNew.ear
  |
  +--StoreFrontWebAppNew.war
       | 
       +--WEB-INF
            | 
            +--web.xml
                          
To unjar the EAR, you do:
  • jar xvf StoreFrontModuleNew.ear
Before you do that, you create a working directory tmp first.  Then you copy EAR file to the tmp directory and un-jar it there.  Similarly, to unjar StoreFrontWebAppNew.war, you create another working directory tmp2 at its level and copy it into tmp2 directory and un-jar it there.  In the following, we show you the whole sequence of steps:

$cd /scratch/aime1/kjeyaram/
$mkdir tmp
$cd tmp
$cp ../StoreFrontModuleNew.ear .
$jar -xvf StoreFrontModuleNew.ear
$ls
$mkdir tmp2
$cd tmp2
$cp ../StoreFrontWebAppNew.war .
$jar xvf StoreFrontWebAppNew.war
$ls -lrt
$cd WEB-INF/
$vi web.xml
$cd ..
$zip -f ../StoreFrontWebAppNew.war WEB-INF/web.xml
$cd ..
$zip -f ../StoreFrontModuleNew.ear StoreFrontWebAppNew.war
$cd ..
$rm -rf tmp

We have used zip command[1] to replace existing web.xml in the zip archive with the following option:



-f
Replace (freshen) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive; unlike the update option (-u) this will not add files that are not already in the zip archive.
Note that you can also use jar command as follows:

  • jar uf ../StoreFrontWebAppNew.war WEB-INF/web.xml


References

1 comment:

Blogger said...

BlueHost is the best hosting company for any hosting plans you require.