Struts 2
  1. Struts 2
  2. WW-4266

resource reloading does not work in IBM JVM

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.3.16
    • Fix Version/s: 2.3.20
    • Component/s: Core Actions
    • Labels:
      None
    • Environment:

      WAS 8.5 with IBM JVM 6

    • Flags:
      Patch

      Description

      When resources reloading is enabled, LocalizedTextUtil uses reflection to clear a private static map of the ResourceBundle class. The member name of that map is "cacheList".

      The IBM JVM has a different impl of ResourceBundle which does not have the "cacheList" member. That causes a lot of NoSuchFieldExceptions in log and resource reloading does not work.

      To fix it the patch catches NoSuchFieldException and uses clearMap() to clear the cache of that IBM ResourceBundle (which is just called "cache").

      Notes:

      • Javadoc indicates that that IBM code is based on the Apache Harmony project
      • The type of that cache member is:
        WeakHashMap<ClassLoader, Hashtable<String, ResourceBundleSoftRef>>
        So one could argue that the patch clears too much, but IMHO that is OK as it is intended for development mode anyway.

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 9c5177c961fb850b80089ef4113a17d361c23fa6 in struts's branch refs/heads/develop from Lukasz Lenart
        [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9c5177c ]

        WW-4266 Adds support for IBM JVM to reload resources

        Show
        ASF subversion and git services added a comment - Commit 9c5177c961fb850b80089ef4113a17d361c23fa6 in struts's branch refs/heads/develop from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9c5177c ] WW-4266 Adds support for IBM JVM to reload resources
        Hide
        Lukasz Lenart added a comment -

        Patch applied, thanks!

        Show
        Lukasz Lenart added a comment - Patch applied, thanks!
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Struts-JDK6-develop #7 (See https://builds.apache.org/job/Struts-JDK6-develop/7/)
        WW-4266 Adds support for IBM JVM to reload resources (lukaszlenart: rev 9c5177c961fb850b80089ef4113a17d361c23fa6)

        • xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Struts-JDK6-develop #7 (See https://builds.apache.org/job/Struts-JDK6-develop/7/ ) WW-4266 Adds support for IBM JVM to reload resources (lukaszlenart: rev 9c5177c961fb850b80089ef4113a17d361c23fa6) xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
        Hide
        ASF subversion and git services added a comment -

        Commit 9c5177c961fb850b80089ef4113a17d361c23fa6 in struts's branch refs/heads/feature/move-jsps-under-webinf from Lukasz Lenart
        [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9c5177c ]

        WW-4266 Adds support for IBM JVM to reload resources

        Show
        ASF subversion and git services added a comment - Commit 9c5177c961fb850b80089ef4113a17d361c23fa6 in struts's branch refs/heads/feature/move-jsps-under-webinf from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=9c5177c ] WW-4266 Adds support for IBM JVM to reload resources
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Struts-JDK6-features #17 (See https://builds.apache.org/job/Struts-JDK6-features/17/)
        WW-4266 Adds support for IBM JVM to reload resources (lukaszlenart: rev 9c5177c961fb850b80089ef4113a17d361c23fa6)

        • xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Struts-JDK6-features #17 (See https://builds.apache.org/job/Struts-JDK6-features/17/ ) WW-4266 Adds support for IBM JVM to reload resources (lukaszlenart: rev 9c5177c961fb850b80089ef4113a17d361c23fa6) xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
        Hide
        Hudson added a comment -

        ABORTED: Integrated in Struts-JDK6-master #893 (See https://builds.apache.org/job/Struts-JDK6-master/893/)
        WW-4266 Adds support for IBM JVM to reload resources (lukaszlenart: rev 9c5177c961fb850b80089ef4113a17d361c23fa6)

        • xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
        Show
        Hudson added a comment - ABORTED: Integrated in Struts-JDK6-master #893 (See https://builds.apache.org/job/Struts-JDK6-master/893/ ) WW-4266 Adds support for IBM JVM to reload resources (lukaszlenart: rev 9c5177c961fb850b80089ef4113a17d361c23fa6) xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            Christoph Nenning
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development