Uploaded image for project: 'Openfire'
  1. Openfire
  2. OF-1895

SystemProperty should work with plugins

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.0
    • Component/s: Plugins
    • Labels:
      None

      Description

      The new SystemProperty implementation, that is used to better structure the properties that are used, does not play well with plugins. Plugins tend to be unloaded/reloaded/updated, which causes SystemProperties to be 're-initialized'. This leads to exceptions like these:

      org.jivesoftware.openfire.container.PluginManager - An exception occurred while loading plugin 'example':
      java.lang.ExceptionInInitializerError: null
      at nl.goodbytes.openfire.plugins.example.ExamplePlugin.initializePlugin(ExamplePlugin.java:26) ~[example-1.0.0-SNAPSHOT.jar!/:?]
      at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:638) [xmppserver-4.4.2.jar:4.4.2]
      at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:374) [xmppserver-4.4.2.jar:4.4.2]
      at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:362) [xmppserver-4.4.2.jar:4.4.2]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
      at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
      Caused by: java.lang.IllegalArgumentException: A SystemProperty already exists with a key of example.property.name
      at org.jivesoftware.util.SystemProperty$Builder.build(SystemProperty.java:619) ~[xmppserver-4.4.2.jar:4.4.2]
      at nl.goodbytes.openfire.plugins.example.ExamplePlugin.(ExamplePlugin.java:32) ~[example-1.0.0-SNAPSHOT.jar!/:?]
      ... 8 more 

        Attachments

          Activity

            People

            Assignee:
            gdt Greg Thomas
            Reporter:
            guus Guus der Kinderen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: