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

FreemarkerManager class throws null pointer exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.3.24
    • 2.3.28
    • Plugin - Tags
    • None
    • Win7
      WebLogic 12.1.3
      JDK 1.7

    Description

      Am getting a null pointer error in the FreemarkerManager class. It occurs in the setContainer method. The code below seems to assume that getInstanceNames returns an empty set if there are no matches. In fact, it returns a null, which is legit according to the XWork doc. This occurs in Freemarker 2.3.23 under WebLogic 12.1.3.

          Map<String, TagLibrary> oldMap = new HashMap<String, TagLibrary>();
          Set<String> oldPrefixes = container.getInstanceNames(TagLibrary.class);
          for (String prefix : oldPrefixes) {
              oldMap.put(prefix, container.getInstance(TagLibrary.class, prefix));
      

      Not sure if this affects the presentation of Struts2 views. Is there a workaround or fix?

      Attachments

        1. jetty.png
          514 kB
          Lukasz Lenart
        2. Part 0.png
          145 kB
          Lukasz Lenart
        3. Part 1.png
          156 kB
          Lukasz Lenart
        4. Part 2.png
          147 kB
          Lukasz Lenart
        5. screenshot.png
          110 kB
          Lukasz Lenart
        6. wls10.png
          518 kB
          Lukasz Lenart
        7. wls12.png
          517 kB
          Lukasz Lenart

        Activity

          People

            Unassigned Unassigned
            rsaunder Rin Saunders
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: