When install src patch do not just replace oob configuration files with old ones

  • KM00513423
  • 28-Aug-2013
  • 29-Aug-2013

Summary

When install src patch do not just replace oob configuration files with old ones, because new parameters may be added, and old parameters may be changed or removed in SRC patches or releases.

Question

When install src patch do not just replace oob configuration files with old ones.

Answer

When install src patch, suggest to always follow src user guide to modify the configuration files:
C:\...\Apache\apache-tomcat-7.0.x\conf\server.xml -> "Context docBase" point to the src patch directory
C:\...\src-1.30p1\WEB-INF\classes\applicationContext.properties

Do not just overwrite oob ones with yours. Because new parameters may be added, and old parameters may be changed or removed in SRC patches or releases.

To avoid confusion of changed parameters, lab has decided they will always put all the history readme files to latest hotfix in future.

Here are two examples:

1. Why Request For Name field is read only?

STR:
1) Login to SRC web
2) Service tab > Browse Catalog > Security
3) Click Request on 'Firewall'
4) Click Request button, then
   actual behavior : Request For Name is not editable
   expected behavior : Request For Name should be editable

src.requestedFor.editable=false has been added in applicationContext.properties since src1.30 HF25, so Request For Name is not editable.

2. Refer to KM1391585.

When start tomcat with src loaded, get such exception in localhost.2012-04-12.log:
 
Apr 12, 2012 9:41:21 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Apr 12, 2012 9:45:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lookupManagerFactory': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private boolean com.hp.service.catalog.server.manager.LookupManagerFactory.isIndexPerUser; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'src.lookups.perUser'
                at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286)

 
When access src url, get 404 error, /src is not available, and such message in localhost_access_log.2012-04-12.txt:
 
192.168.0.197 - - [12/Apr/2012:21:47:07 -0700] "GET /src HTTP/1.1" 404 964
192.168.0.197 - - [12/Apr/2012:21:47:28 -0700] "GET /src/secure/main.jsp HTTP/1.1" 404 1012
192.168.0.197 - - [12/Apr/2012:21:47:51 -0700] "GET /src/secure/main.jsp HTTP/1.1" 404 1012
192.168.0.197 - - [12/Apr/2012:22:00:11 -0700] "GET /src/secure/main.jsp HTTP/1.1" 404 1012

The problem comes from, customer just copied the old applicationContext.properties without this line, and this line is added in this hotfix:
src.lookups.perUser=false

 

Similar problem happens to web.xml in web tier, and sm.ini in sm server. Here is an example for web.xml:

When I upgraded SM 9.30 to SM 9.31, I overwritten the SM 9.31 OOTB with my old SM 9.30 web.xml. Always keep backups so you can do a compare and ALWAYS read the release notes.
 
An error has occurred while processing a request for: /webtier-9.31/index.do
Please contact your Administrator or see server logs for more details
Error: An exception occurred processing JSP page /cwc/index.jsp at line 162 159: keyHelpCallback: %22<%= StringUtil.encodeXML(configReader.getConfigParameter(DeploymentConfigReader.FUNC_KEY_HELP_CALLBACK)) %>%22, 160: keyMagnify: <%= StringUtil.encodeXML(configReader.getConfigParameter(DeploymentConfigReader.FUNC_KEY_MAGNIFY)) %>, 161: keyCallback: %22<%= StringUtil.encodeXML(configReader.getConfigParameter(DeploymentConfigReader.FUNC_KEY_CALLBACK)) %>%22, 162: keyNavigator: <%= StringUtil.encodeXML(configReader.getConfigParameter(DeploymentConfigReader.KEY_NAVIGATOR)) %>, 163: keyMainContent: <%= StringUtil.encodeXML(configReader.getConfigParameter(DeploymentConfigReader.KEY_MAIN_CONTENT)) %>, 164: keyList: <%= StringUtil.encodeXML(configReader.getConfigParameter(DeploymentConfigReader.KEY_LIST)) %>, 165: keyDetail: <%= StringUtil.encodeXML(configReader.getConfigParameter(DeploymentConfigReader.KEY_DETAIL)) %>, Stacktrace:
 
Root cause: Missing new sections in the old sm 9.30 web.xml. sm 9.31 web.xml has new sections and they are mandatory.
 
  <!-- default is 'q', tab through sections (navigator, centerFrame, listFrame, detailFrame -->
  <context-param>
    <param-name>keyTabSections</param-name>
    <param-value>81</param-value>
  </context-param>
 
  <!-- The following keys are combined with ctrl + alt -->
  <!-- default is 'n', focus first toolbar button in navigator tree -->
  <context-param>
    <param-name>keyNavigator</param-name>
    <param-value>78</param-value>
  </context-param>
  <!-- default is 'm', focus first toolbar button in main content area -->
  <context-param>
    <param-name>keyMainContent</param-name>
    <param-value>77</param-value>
  </context-param>
  <!-- default is 'l', focus first toolbar button in list if it's listDetail view -->
  <context-param>
    <param-name>keyList</param-name>
    <param-value>76</param-value>
  </context-param>
  <!-- default is 'd', focus first toolbar button in detail if it's listDetail view -->
  <context-param>
    <param-name>keyDetail</param-name>
    <param-value>68</param-value>
  </context-param>