Pages

Wednesday, July 18, 2012

Serviceability gem: NullPointerExceptions in WAS Web Container (com.ibm.ws.webcontainer.srt.SRTServletRequest)


In my ongoing quest to bring you the serviceability gems in WebSphere Application Server, ladies and gentlemen, I present to you WebContainer custom property

Name: com.ibm.ws.webcontainer.checkrequestobjectuse
Value: true

This custom property helps determine if WAS internal components or the application is using the wrong request object on the thread which can lead to NullPointerException in WebContainer code.
Set this property along with the trace string com.ibm.ws.webcontainer*=all 


If there is a problem with request object reuse or mismatch on the same thread  then the following error message is expected to be seen in the log. You can grep for these strings
ERROR: Wrong request object in use on Thread. Object Expected: X, Found: Y
Wrong request object in use on Thread. IllegalStateException

To specify Web container custom properties:
  1. In the administrative console click Servers > Application Servers > server_name > Web Container settings > Web Container
  2. Under Additional Properties select Custom Properties.
  3. On the Custom Properties page, click New.
  4. On the settings page, enter the name of the custom property that you want to configure in the Name field and the value that you want to set it to in the Value field.
  5. Click Apply or OK.
  6. Click Save on the console task bar to save your configuration changes.
  7. Restart the server.
WebContainer mustgather doc when there are problems in the webcontainer

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.