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

CompositeActionMapper actionMappers injected before container, leading to NPE on Oracle JRE 1.7.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.8
    • 2.3.14
    • Core Actions
    • None
    • Oracle JRE 1.7.0_17, Struts 2.3.8, Tomcat 7.0.12

    Description

      When I try to use CompositeActionMapper on Oracle JRE 1.7.0, the ContainerImpl tries to first inject the actionMappers using CompositeActionMapper.setActionMappers(String list), before the container is injected in setContainer(Container container). This leads to a NullPointerException.

      This did not happen on Oracle JRE 1.6.0.

      The apparent cause is that in com.opensymphony.xwork2.inject.ContainerImpl, line 90, the method injectors are created in the order in which the methods are returned by Class.getDeclaredMethods(), which is undefined according to the documentation.

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            dbaldes Daniel Baldes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: