• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 6.6.6, 6.12.2, 6.13.0
    • Server - Platform

      When Confluence is starting up, it scans spring annotations for plugin classes. As part of this scanning process, it tries to ensure that these spring annotation classes are contained only in single jar. Responsible class for this action is AtlassianScannerBeanDefinitionParser.
      If for some reason plugin can see spring annotations from another plugin that bundled them, plugin initialisation fails with error

      $ find . -name "atlassian-confluence.log" | xargs grep -h "Cannot execute atlassian-spring-scanner-runtime" | sort -u
      Caused by: java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.confluence-baseurl-plugin'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has <scope>provided</scope>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.
      Caused by: java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.confluence-scheduler-spi'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has <scope>provided</scope>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.
      Caused by: java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.synchrony-interop'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has <scope>provided</scope>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.
      

      The problem here is that plugins from error message have nothing to do with bundling spring scanner. Because of OSGI non-deterministic wiring, these bundles see spring annotation from 'wrong' bundle.

      What is causing these errors is the fact that some of the plugins use old 1.x version of atlassian-spring-scanner-annotation dependency. Here is the list of bundled plugins that do it:

      • atlassian-authentication-plugin
      • ImageEffectsPlugin
      • atlassian-webhooks-plugin
      • chart-plugin
      • confluence-collaborative-editor-plugin
      • troubleshooting:plugin-confluence
      • atlassian-playbook-blueprints
      • synchrony-interop

      All of the plugins above (and maybe some more) should be upgraded to use 2.x version of spring scanner annotations. They should also use <provided> scope instead of <compile> or <runtime>. After new versions of these plugins are released, they should be used in Confluence.

            [CONFSERVER-55916] Spring scanner library should be updated to v.2 in all plugins

            Hey admin1521109556
            I did some more deep dive into this and looks like `BitbucketComponent.class` is not specific for Spring Scanner v2.
            I've checked recent version, and it could be present in both (see below).

            Spring Scanner v1.x

            Listing atlassian-spring-scanner-annotation-1.2.11.jar

            Archive:  atlassian-spring-scanner-annotation-1.2.11.jar
              Length      Date    Time    Name
            ---------  ---------- -----   ----
                    0  08-12-2015 03:05   META-INF/
                  131  08-12-2015 03:05   META-INF/MANIFEST.MF
                    0  08-12-2015 03:05   com/
                    0  08-12-2015 03:05   com/atlassian/
                    0  08-12-2015 03:05   com/atlassian/plugin/
                    0  08-12-2015 03:05   com/atlassian/plugin/spring/
                    0  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/
                    0  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/
                    0  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/
                    0  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/
                    0  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/export/
                    0  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/util/
                 2171  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/ProductFilter.class
                  716  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/FecruComponent.class
                  713  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/JiraComponent.class
                  719  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/BambooComponent.class
                  719  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/RefappComponent.class
                  574  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/ClasspathComponent.class
                  728  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent.class
                  716  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/StashComponent.class
                  731  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/ConfluenceComponent.class
                  422  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/component/Scanned.class
                  501  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/Profile.class
                  729  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/BambooImport.class
                  738  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/BitbucketImport.class
                  726  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/StashImport.class
                  540  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/ComponentImport.class
                  741  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/ConfluenceImport.class
                  723  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/JiraImport.class
                  726  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/FecruImport.class
                  729  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/imports/RefappImport.class
                  554  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/export/ExportAsService.class
                  560  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/export/ExportAsDevService.class
                  609  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/export/ModuleType.class
                  499  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/annotation/OnlyInProduct.class
                  928  08-12-2015 03:05   com/atlassian/plugin/spring/scanner/util/CommonConstants.class
            

            Spring Scanner v2.x

            Listing atlassian-spring-scanner-annotation-2.1.15.jar

            Archive:  atlassian-spring-scanner-annotation-2.1.15.jar
              Length      Date    Time    Name
            ---------  ---------- -----   ----
                    0  10-09-2019 05:02   META-INF/
                 1679  10-09-2019 05:02   META-INF/MANIFEST.MF
                    0  10-09-2019 05:02   com/
                    0  10-09-2019 05:02   com/atlassian/
                    0  10-09-2019 05:02   com/atlassian/plugin/
                    0  10-09-2019 05:02   com/atlassian/plugin/spring/
                    0  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/
                    0  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/
                    0  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/
                    0  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/export/
                    0  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/
                    0  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/util/
                    0  10-09-2019 05:02   com.atlassian.plugin.spring.scanner.schema/
                  428  10-09-2019 05:02   atlassian-plugin.xml
                  568  10-09-2019 05:02   META-INF/LICENSE.txt
                  139  10-09-2019 05:02   META-INF/spring.schemas
                  499  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/OnlyInProduct.class
                  713  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/JiraComponent.class
                  719  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/RefappComponent.class
                  716  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/FecruComponent.class
                  716  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/StashComponent.class
                  719  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/BambooComponent.class
                  731  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/ConfluenceComponent.class
                  728  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent.class
                  574  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/component/ClasspathComponent.class
                  560  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/export/ExportAsDevService.class
                  554  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/export/ExportAsService.class
                  609  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/export/ModuleType.class
                  540  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/ComponentImport.class
                  723  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/JiraImport.class
                  738  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/BitbucketImport.class
                  726  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/StashImport.class
                  729  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/BambooImport.class
                  729  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/RefappImport.class
                  741  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/ConfluenceImport.class
                  726  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/imports/FecruImport.class
                  501  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/annotation/Profile.class
                 2165  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/ProductFilter.class
                  991  10-09-2019 05:02   com/atlassian/plugin/spring/scanner/util/CommonConstants.class
                 2057  10-09-2019 05:02   com.atlassian.plugin.spring.scanner.schema/atlassian-scanner.xsd
            

            The only difference I could find is Scanned.class

            diff f1 f2
            <  com/atlassian/plugin/spring/scanner/annotation/component/Scanned.class
            ---
            < Archive:  atlassian-spring-scanner-annotation-1.2.11.jar
            ---
            > Archive:  atlassian-spring-scanner-annotation-2.1.15.jar
            

            but this also should be used with caution.
            Hope this makes sense.

            Andriy Yakovlev [Atlassian] added a comment - Hey admin1521109556 I did some more deep dive into this and looks like `BitbucketComponent.class` is not specific for Spring Scanner v2 . I've checked recent version, and it could be present in both (see below). Spring Scanner v1.x Listing atlassian-spring-scanner-annotation-1.2.11.jar Archive: atlassian-spring-scanner-annotation-1.2.11.jar Length Date Time Name --------- ---------- ----- ---- 0 08-12-2015 03:05 META-INF/ 131 08-12-2015 03:05 META-INF/MANIFEST.MF 0 08-12-2015 03:05 com/ 0 08-12-2015 03:05 com/atlassian/ 0 08-12-2015 03:05 com/atlassian/plugin/ 0 08-12-2015 03:05 com/atlassian/plugin/spring/ 0 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/ 0 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/ 0 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/ 0 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/ 0 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/export/ 0 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/util/ 2171 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/ProductFilter.class 716 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/FecruComponent.class 713 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/JiraComponent.class 719 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/BambooComponent.class 719 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/RefappComponent.class 574 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/ClasspathComponent.class 728 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent.class 716 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/StashComponent.class 731 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/ConfluenceComponent.class 422 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/component/Scanned.class 501 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/Profile.class 729 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/BambooImport.class 738 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/BitbucketImport.class 726 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/StashImport.class 540 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/ComponentImport.class 741 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/ConfluenceImport.class 723 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/JiraImport.class 726 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/FecruImport.class 729 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/imports/RefappImport.class 554 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/export/ExportAsService.class 560 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/export/ExportAsDevService.class 609 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/export/ModuleType.class 499 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/annotation/OnlyInProduct.class 928 08-12-2015 03:05 com/atlassian/plugin/spring/scanner/util/CommonConstants.class Spring Scanner v2.x Listing atlassian-spring-scanner-annotation-2.1.15.jar Archive: atlassian-spring-scanner-annotation-2.1.15.jar Length Date Time Name --------- ---------- ----- ---- 0 10-09-2019 05:02 META-INF/ 1679 10-09-2019 05:02 META-INF/MANIFEST.MF 0 10-09-2019 05:02 com/ 0 10-09-2019 05:02 com/atlassian/ 0 10-09-2019 05:02 com/atlassian/plugin/ 0 10-09-2019 05:02 com/atlassian/plugin/spring/ 0 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/ 0 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/ 0 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/ 0 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/export/ 0 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/ 0 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/util/ 0 10-09-2019 05:02 com.atlassian.plugin.spring.scanner.schema/ 428 10-09-2019 05:02 atlassian-plugin.xml 568 10-09-2019 05:02 META-INF/LICENSE.txt 139 10-09-2019 05:02 META-INF/spring.schemas 499 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/OnlyInProduct.class 713 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/JiraComponent.class 719 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/RefappComponent.class 716 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/FecruComponent.class 716 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/StashComponent.class 719 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/BambooComponent.class 731 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/ConfluenceComponent.class 728 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent.class 574 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/component/ClasspathComponent.class 560 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/export/ExportAsDevService.class 554 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/export/ExportAsService.class 609 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/export/ModuleType.class 540 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/ComponentImport.class 723 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/JiraImport.class 738 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/BitbucketImport.class 726 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/StashImport.class 729 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/BambooImport.class 729 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/RefappImport.class 741 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/ConfluenceImport.class 726 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/imports/FecruImport.class 501 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/annotation/Profile.class 2165 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/ProductFilter.class 991 10-09-2019 05:02 com/atlassian/plugin/spring/scanner/util/CommonConstants.class 2057 10-09-2019 05:02 com.atlassian.plugin.spring.scanner.schema/atlassian-scanner.xsd The only difference I could find is Scanned.class diff f1 f2 < com/atlassian/plugin/spring/scanner/annotation/component/Scanned.class --- < Archive: atlassian-spring-scanner-annotation-1.2.11.jar --- > Archive: atlassian-spring-scanner-annotation-2.1.15.jar but this also should be used with caution. Hope this makes sense.

            Please note that this issue can also be caused by the plugin Thready, version 0.3.1. We have since removed this version from the marketplace and have delivered a patch for this issue in Thready 0.3.2: Thready Versions

            Nancy Lopez added a comment - Please note that this issue can also be caused by the plugin Thready, version 0.3.1 . We have since removed this version from the marketplace and have delivered a patch for this issue in Thready 0.3.2 : Thready Versions

            Our Viewtracker app is affected by this as well. We released a guide on our documentation related to this Log Message: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes

            Deleted Account (Inactive) added a comment - Our Viewtracker app is affected by this as well. We released a guide on our documentation related to this  Log Message: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes

            S Stack added a comment -

            We have hit this problem with Confluence 6.3.4 with the ViewTracker plugin. Bitvoodoo has published this page: https://wiki.bitvoodoo.ch/display/public/BVVIEWTRACKER/Log+Message%3A+Cannot+execute+atlassian-spring-scanner-runtime%3A+plugin+has+an+extra+copy+of+atlassian-spring-scanner-annotation+classes 

            @scott.dudley - Thank you for posting your code; using it, we see these plugins have the V2 Spring Scanner classes:
            * atlassian-playbook-blueprints-1.0.3.jar (contrary to its mention in the Description)
            * tooltip-1.2.4.jar

            S Stack added a comment - We have hit this problem with Confluence 6.3.4 with the ViewTracker plugin. Bitvoodoo has published this page: https://wiki.bitvoodoo.ch/display/public/BVVIEWTRACKER/Log+Message%3A+Cannot+execute+atlassian-spring-scanner-runtime%3A+plugin+has+an+extra+copy+of+atlassian-spring-scanner-annotation+classes   @scott.dudley - Thank you for posting your code; using it, we see these plugins have the V2 Spring Scanner classes: * atlassian-playbook-blueprints-1.0.3.jar (contrary to its mention in the Description) * tooltip-1.2.4.jar

            Further on that last thought, here is one potential way to detect an offending plugin. By diffing the spring-scanner-annotation v1.x and v2.x JARs, I see one specific class (BitbucketComponent) that only exists in Spring Scanner Annotations v2. Since Spring Scanner v2 classes should never, ever be bundled, you can find broken plugins by running the following on .JARs in the current directory (such as $CONFLUENCE_DATA/plugins-cache) as follows:

            for i in *.jar; do unzip -v $i | sed "s/^/$i:/" | grep com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent; done
            

            In my case, this returns the name of the offending JAR:

            1547907356747tooltip-1.2.4.jar:     728  Defl:N      396  46% 04-18-2018 06:07 6cd2cf1f  com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent.class
            

            If you have any .OBRs, be careful because they are actually ZIP files themselves which contain embedded .JARs, so the above command will not catch anything until you first unzip the OBR to get the underlying .JAR.

            Scott Dudley [Cenote] added a comment - Further on that last thought, here is one potential way to detect an offending plugin. By diffing the spring-scanner-annotation v1.x and v2.x JARs, I see one specific class (BitbucketComponent) that only exists in Spring Scanner Annotations v2. Since Spring Scanner v2 classes should never, ever be bundled, you can find broken plugins by running the following on .JARs in the current directory (such as $CONFLUENCE_DATA/plugins-cache) as follows: for i in *.jar; do unzip -v $i | sed "s/^/$i:/" | grep com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent; done In my case, this returns the name of the offending JAR: 1547907356747tooltip-1.2.4.jar: 728 Defl:N 396 46% 04-18-2018 06:07 6cd2cf1f com/atlassian/plugin/spring/scanner/annotation/component/BitbucketComponent.class If you have any .OBRs, be careful because they are actually ZIP files themselves which contain embedded .JARs, so the above command will not catch anything until you first unzip the OBR to get the underlying .JAR.

            See also the issue I just filed in SCANNER-2170. It appears that a single misconfigured plugin (which can even be a user-installed third-party plugin) can silently wreak havoc with other parts of the system and cause unrelated plugins to start failing.

            In the case we discovered, the customer installed a single third-party plugin which had an incorrect packaging of the Spring Scanner. Everything appeared to be fine at first, but after the next Confluence restart, other plugins would sometimes randomly fail to load with errors similar to the description above. The error message in the Conflunce logs will always "blame" the name of the plugin that fails to load, which is actually unrelated to the problem.

            The problem plugin is difficult to pinpoint because the issue generally only appears after a restart, the problem does not occur 100% consistently after every restart, and the name of the problem plugin is not logged anywhere by Confluence.

            It is still possible to troubleshoot this by attaching a debugger to Confluence and setting breakpoints in the Spring Scanner code (as shown in the SCANNER-2170 screenshot) to stop on the error and find the name of the problem package. One alternative might be to go through all of the installed plugin .JARs (or .OBRs and their embedded .JARs) to look for plugins with misconfigured Spring Scanner installations and have bundled Spring Scanner 2.x classes.

            Scott Dudley [Cenote] added a comment - See also the issue I just filed in SCANNER-2170 . It appears that a single misconfigured plugin (which can even be a user-installed third-party plugin) can silently wreak havoc with other parts of the system and cause unrelated plugins to start failing. In the case we discovered, the customer installed a single third-party plugin which had an incorrect packaging of the Spring Scanner. Everything appeared to be fine at first, but after the next Confluence restart, other plugins would sometimes randomly fail to load with errors similar to the description above. The error message in the Conflunce logs will always "blame" the name of the plugin that fails to load, which is actually unrelated to the problem. The problem plugin is difficult to pinpoint because the issue generally only appears after a restart, the problem does not occur 100% consistently after every restart, and the name of the problem plugin is not logged anywhere by Confluence. It is still possible to troubleshoot this by attaching a debugger to Confluence and setting breakpoints in the Spring Scanner code (as shown in the SCANNER-2170 screenshot) to stop on the error and find the name of the problem package. One alternative might be to go through all of the installed plugin .JARs (or .OBRs and their embedded .JARs) to look for plugins with misconfigured Spring Scanner installations and have bundled Spring Scanner 2.x classes.

            James Richards added a comment - https://getsupport.atlassian.com/browse/CSP-241498

            slaurent, thanks for letting us know.

            It is theoretically possible because some of the plugins are cross-product (for example, atlassian-authentication-plugin). I recommend you to create a public bug with your scenario in Bitbucket queue and link it to this ticket. This will allow Bitbucket developers to review this problem. Thanks again for your time

             

            Efim (Inactive) added a comment - slaurent , thanks for letting us know. It is theoretically possible because some of the plugins are cross-product (for example, atlassian-authentication-plugin). I recommend you to create a public bug with your scenario in Bitbucket queue and link it to this ticket. This will allow Bitbucket developers to review this problem. Thanks again for your time  

            hello,

            could this issue also affect Bitbucket 5.11? I'm facing similar issues with my plugin which does NOT embed any spring scanner jars (but import them).

            Sylvain Laurent added a comment - hello, could this issue also affect Bitbucket 5.11? I'm facing similar issues with my plugin which does NOT embed any spring scanner jars (but import them).

              Unassigned Unassigned
              epyshnograev Efim (Inactive)
              Affected customers:
              24 This affects my team
              Watchers:
              37 Start watching this issue

                Created:
                Updated: