Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4703

NullPointerException in ActionSupport when use ModelDriven

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.5
    • 2.5.8
    • Core
    • None
    • Windows 7
      WebSphere 8.5

    Description

      When we use getText method in a ModelDriven's bean. We got NullPointerException in ActionSupport. We found the variable "container" is null when the bean is got from ModelDriven.getModel()

      Following is the exception stack:

      java.lang.NullPointerException
      	at com.opensymphony.xwork2.ActionSupport.getLocale(ActionSupport.java:68)
      	at com.opensymphony.xwork2.TextProviderSupport.getLocale(TextProviderSupport.java:329)
      	at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:204)
      	at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:119)
      	at com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:86)
      

      Note: we are upgrading the project from 2.3.24.3 to 2.5.5. In version 2.3.24.3 doesn't have this issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            billychk billy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: