Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-80124

XWorkModuleDescriptor malfunctioning in multiple scenarios

XMLWordPrintable

      Issue Summary

      Much of the logic in XWorkModuleDescriptor is based on an old version of the XWork XmlConfigurationProvider. We have since ported some changes from the latest XmlConfigurationProvider to make it work with Struts but there are still a number of known issues. It is best we do a rewrite of this class using the latest XmlConfigurationProvider as its basis.

      Known issues with the current XWorkModuleDescriptor are:

      • Unable to uninstall plugin after a Confluence upgrade which has automatically disabled it (Thank you Jens)
      • Custom Interceptors and Result-Types defined by a plugin fail to, or are improperly loaded
      • XWork packages which extend another package, including the default package, may not have access to all parent package capabilities

      Steps to Reproduce

      Install plugin which leverages one of mentioned features

      Expected Results

      Plugin works as expected, with no errors logged

      Actual Results

      Example error logs for some scenarios:

      • On uninstallation of auto-disabled plugin after upgrade:
      java.lang.NullPointerException: null
      	at com.opensymphony.xwork2.config.ConfigurationUtil.buildParentsFromString(ConfigurationUtil.java:53) ~[org.apache.struts_struts2-core-2.5.30-atlassian-3.jar:2.5.30-atlassian-3]
      	at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.buildPackageContext(XWorkModuleDescriptor.java:339) ~[com.atlassian.confluence_confluence-8.0.0-m69.jar:?]
      	at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.getPackages(XWorkModuleDescriptor.java:118) ~[com.atlassian.confluence_confluence-8.0.0-m69.jar:?]
      	at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.destroy(XWorkModuleDescriptor.java:380) ~[com.atlassian.confluence_confluence-8.0.0-m69.jar:?]
      	at com.atlassian.plugin.manager.DefaultPluginManager.notifyUninstallPlugin(DefaultPluginManager.java:1087) ~[com.atlassian.plugins_atlassian-plugins-core-7.1.4.jar:?]
      • Custom result-type or interceptor
      build	05-Oct-2022 08:52:08	[INFO] [talledLocalContainer] 08:52:08,693 ERROR [http-nio-1990-exec-4] [plugin.descriptor.XWorkModuleDescriptor] getPackages Could not add package: [BUILDER] PackageConfig: [/cq] for namespace [] with parents [[PackageConfig: [default] for namespace [] with parents [[]]]] because: Caught Exception while registering Interceptor class com.atlassian.confluence.plugins.questions.actions.UnauthorizedAccessExceptionInterceptor
      build	05-Oct-2022 08:52:09	[INFO] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: com.atlassian.confluence.plugins.questions.actions.UnauthorizedAccessExceptionInterceptor
      • Accessing parent package capabilities:
      build 07-Oct-2022 04:36:22  [INFO] [talledLocalContainer] Error building results for action onboarduser in namespace  - [unknown location]build 07-Oct-2022 04:36:22  [INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.addAction(XWorkModuleDescriptor.java:269)build 07-Oct-2022 04:36:22  [INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.getPackages(XWorkModuleDescriptor.java:129)build 07-Oct-2022 04:36:22  [INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.loadPackages(XWorkModuleDescriptor.java:404)
      build 07-Oct-2022 04:36:22  [INFO] [talledLocalContainer] Caused by: There is no result type defined for type 'soy' mapped with name 'success' - [unknown location]build 07-Oct-2022 04:36:22  [INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.buildResults(XWorkModuleDescriptor.java:193)build 07-Oct-2022 04:36:22  [INFO] [talledLocalContainer]   at com.atlassian.confluence.plugin.descriptor.XWorkModuleDescriptor.addAction(XWorkModuleDescriptor.java:267)

      Workaround

      • Reinstall or reenable plugin prior to installation.
      • No workarounds for other scenarios

              854eef6f5746 Kusal Kithul-Godage
              854eef6f5746 Kusal Kithul-Godage
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: