Infrastructure at your Service

Morgan Patou

Documentum – DA 7.3 showing java.lang.NullPointerException on every actions

Last year, we started to upgrade some Documentum Administrator from 7.2 to 7.3 and directly after, we started to see some NullPointerException on the log files. We are using DA 7.3 on some recent WebLogic Servers versions (12.1.3, 12.2.1.2). We usually deploy DA as a WAR file (so not exploded) with just the dfc.properties, keystores and logs outside of it. This is the kind of errors we started to see as soon as it was upgraded to 7.3 in the startup log file (nohup log file in our case):

java.lang.NullPointerException
        at java.io.FileInputStream.<init>(FileInputStream.java:130)
        at java.io.FileInputStream.<init>(FileInputStream.java:93)
        at com.documentum.web.form.WebformTag.fetchExtnNativeVersion(WebformTag.java:282)
        at com.documentum.web.form.WebformTag.renderExtnJavaScript(WebformTag.java:268)
        at com.documentum.web.form.WebformTag.doStartTag(WebformTag.java:159)
        at jsp_servlet._custom._jsp.__loginex._jsp__tag3(__loginex.java:1687)
        at jsp_servlet._custom._jsp.__loginex._jspService(__loginex.java:272)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)
        at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:489)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:376)
        ...

 

The stack on the line 7 and 8 changed, depending on the action that was being performed. For example an access to the login page would print the following:

        at jsp_servlet._custom._jsp.__loginex._jsp__tag3(__loginex.java:1687)
        at jsp_servlet._custom._jsp.__loginex._jspService(__loginex.java:272)

 

Then once logged in, you would see each component printing the same kind of stack, with the following lines 7 and 8:

        at jsp_servlet._webtop._main.__mainex._jsp__tag0(__mainex.java:286)
        at jsp_servlet._webtop._main.__mainex._jspService(__mainex.java:116)

 

        at jsp_servlet._webtop._classic.__classic._jsp__tag0(__classic.java:408)
        at jsp_servlet._webtop._classic.__classic._jspService(__classic.java:112)

 

        at jsp_servlet._webtop._titlebar.__titlebar._jsp__tag0(__titlebar.java:436)
        at jsp_servlet._webtop._titlebar.__titlebar._jspService(__titlebar.java:175)

 

        at jsp_servlet._webtop._messagebar.__messagebar._jsp__tag0(__messagebar.java:145)
        at jsp_servlet._webtop._messagebar.__messagebar._jspService(__messagebar.java:107)

 

aso…

We were working with OpenText on this issue. As mentioned in the stack trace, this is actually because DA is trying to fetch the “ExtnNativeVersion”. This is a property file located there: wdk/extension/client/EMC/ContentXfer/com.emc.wdk.native/1. Unfortunately, when DA 7.3 is trying to locate this file, it does not work but the file is really present… It does not work because the DA is deployed as a WAR file (an archive) and therefore the path to the file is wrong. I suspect this is something that Documentum changed recently, using the getRealPath(). To change the behavior of the getRealPath function, you have to set the property “Archived Real Path Enabled” to true so it returns the canonical path of the file…

So to remove these exceptions, you have two options:

I. At the domain level:

  1. Login to the WebLogic Administration Console using your weblogic account
  2. Navigate to the correct page: DOMAIN > Configuration > Web Applications
  3. Click on the ‘Lock & Edit’ button
  4. Check the ‘Archived Real Path Enabled’ checkbox ( = set it to true)
  5. Click on the ‘Save’ and then ‘Activate Changes’ buttons

This will add the configuration to the global config.xml file so it is enabled for the whole domain. As often, I would not recommend that but rather configuring this at the application level because you might have other applications that do NOT want this setting to be set to true… So that is why you have the option number two:

II. At the application level:

The high level steps to do that would be the following ones:

  1. Extract the weblogic.xml file from the application war file
  2. Add the ‘Archived Real Path Enabled’ property in it and set it to true
  3. Repackage the war file and redeploy it

This is pretty simple:

[[email protected]_server_01 ~]$ cd $APPS_HOME
[[email protected]_server_01 apps]$ jar -xvf da.war WEB-INF/weblogic.xml
 inflated: WEB-INF/weblogic.xml
[[email protected]_server_01 apps]$
[[email protected]_server_01 apps]$ vi WEB-INF/weblogic.xml
[[email protected]_server_01 apps]$
[[email protected]_server_01 apps]$ tail -6 WEB-INF/weblogic.xml

   <container-descriptor>
      <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
   </container-descriptor>

</weblogic-web-app>
[[email protected]_server_01 apps]$
[[email protected]_server_01 apps]$ jar -uvf da.war WEB-INF/weblogic.xml
adding: WEB-INF/weblogic.xml(in = 989) (out= 398)(deflated 59%)
[[email protected]_server_01 apps]$

 

Then, you just need to update the deployment in the WebLogic Administration Console and that’s it, the exceptions should be gone now. As far as I’m aware of, these exceptions did not have any impact on the proper behavior of Documentum Administrator but it is still very ugly to have hundreds of them in the log file…

 

4 Comments

  • Prasanna Soni says:

    I followed steps you listed and added show archival path

    container-descriptor>
    true

    but it resulted in to below error

    System property [org.owasp.esapi.opsteam] is not set
    System property [org.owasp.esapi.devteam] is not set
    Attempting to load ESAPI.properties via file I/O.
    Attempting to load ESAPI.properties as resource file via file I/O.
    Not found in ‘org.owasp.esapi.resources’ directory or file not readable: /opt/oracle/config/domains/dnptop/ESAPI.properties
    Not found in SystemResource Directory/resourceDirectory: .esapi/ESAPI.properties
    Not found in ‘user.home’ (/home/MWwls) directory: /home/MWwls/esapi/ESAPI.properties
    Loading ESAPI.properties via file I/O failed. Exception was: java.io.FileNotFoundException
    Attempting to load ESAPI.properties via the classpath.
    SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from ‘/ (root)’ using current thread context class loader!
    SecurityConfiguration for Validator.ConfigurationFile.MultiValued not found in ESAPI.properties. Using default: false
    Attempting to load validation.properties via file I/O.
    Attempting to load validation.properties as resource file via file I/O.
    Not found in ‘org.owasp.esapi.resources’ directory or file not readable: /opt/oracle/config/domains/dnptop/validation.properties
    Not found in SystemResource Directory/resourceDirectory: .esapi/validation.properties
    Not found in ‘user.home’ (/home/MWwls) directory: /home/MWwls/esapi/validation.properties
    Loading validation.properties via file I/O failed.
    Attempting to load validation.properties via the classpath.
    SUCCESSFULLY LOADED validation.properties via the CLASSPATH from ‘/ (root)’ using current thread context class loader!
    15:29:59,180 ERROR [[ACTIVE] ExecuteThread: ‘7’ for queue: ‘weblogic.kernel.Default (self-tuning)’] com.documentum.web.common.Trace – Encountered error in error message component jsp
    com.documentum.web.security.exceptions.SecurityWrapperRuntimeException: HTTP cookie name: XSS: WebformTag: Invalid input. Please conform to regex ^[a-zA-Z0-9\-_]{1,50}$ with a maximum length of 1024
    at com.documentum.web.security.validators.WDKESAPIValidator.getValidCookieName(WDKESAPIValidator.java:141)
    at com.documentum.web.form.WebformTag.getJsessionidCookieName(WebformTag.java:401)
    at com.documentum.web.form.WebformTag.renderExtnJavaScript(WebformTag.java:326)
    at com.documentum.web.form.WebformTag.doStartTag(WebformTag.java:175)
    at jsp_servlet._wdk._system._errormessage.__errormessage._jsp__tag2(__errormessage.java:441)
    at jsp_servlet._wdk._system._errormessage.__errormessage._jsp__tag1(__errormessage.java:410)
    at jsp_servlet._wdk._system._errormessage.__errormessage._jspService(__errormessage.java:151)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:483)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:372)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:617)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:489)
    at com.documentum.web.form.FormProcessor.dispatchURL(FormProcessor.java:2283)
    at com.documentum.web.formext.component.URLDispatchBridge.dispatch(URLDispatchBridge.java:108)
    at com.documentum.web.formext.component.ComponentDispatcher.mapRequestToComponent(ComponentDispatcher.java:505)
    at com.documentum.web.formext.component.ComponentDispatcher.doGet(ComponentDispatcher.java:354)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at com.documentum.web.formext.component.ComponentDispatcher.doService(ComponentDispatcher.java:328)
    at com.documentum.web.formext.component.ComponentDispatcher.serviceAsNonController(ComponentDispatcher.java:166)
    at com.documentum.web.formext.component.ComponentDispatcher.service(ComponentDispatcher.java:147)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at com.documentum.web.servlet.ResponseHeaderControlFilter.doFilter(ResponseHeaderControlFilter.java:351)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at com.documentum.web.servlet.CompressionFilter.doFilter(CompressionFilter.java:96)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at com.documentum.web.env.WDKController.processRequest(WDKController.java:225)
    at com.documentum.web.env.WDKController.doFilter(WDKController.java:182)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3456)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3422)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:323)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2280)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2196)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1632)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:256)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

    • Morgan Patou says:

      Hi Prasanna,

      If I understood properly, you tried the 2nd option then? If so, could you please post the full content of your weblogic.xml file? It is possible that the comments section doesn’t support inferior and superior characters so you might be better using an online paste tool such as https://paste.fedoraproject.org/.

      If you could show me the entire content of the weblogic.xml, it might be something wrong with the formatting. It would probably be helpful to try to remove the “show-archived-real-path-enabled” section and try to redeploy DA to see if it’s working without (and therefore if it’s really linked to the “show-archived-real-path-enabled” section).

      Regards,
      Morgan

  • Prasanna Soni says:

    Weblogic Webapp

    <!–To enable session replication for failover support add the the following under –>
    <!–
    replicated
    –>

    true

    true

    • Morgan Patou says:

      Hi Prasanna,

      I’m sorry but the “less-than” and “greater-than” symbols aren’t handled properly in the comments and therefore I don’t understand/see what you are trying to share (it just remove them and doesn’t display what’s inside because it believes it’s an HTML balise). Let me reach out to you via email, It will be simpler.

      Regards,
      Morgan

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Morgan Patou
Morgan Patou

Technology Leader ECM & Senior Consultant