Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20960

Maven tasks fail to run when repository isolation is enabled in the executable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 7.1.1
    • 7.0.4
    • Maven
    • None

      Issue Summary

      After upgrading Bamboo to 7.0, All the Maven tasks (whose corresponding Maven executables are enabled with repository isolation option) are failing with the below error.

      Steps to Reproduce

      1. Define a Maven 3.x executable in Bamboo 6.x
      2. Enable repository isolation for one of the Maven executables
      3. Add a Maven 3.x task and choose this executable.
      4. Run and confirm this Maven task is running
      5. Upgrade Bamboo to 7.0.4
      6. Run the same plan

      Expected Results

      Maven 3.x task runs without any errors.

      Actual Results

      The below exception is thrown in the build log:

      simple	25-May-2020 14:59:57	Starting task 'Compile pom-web' of type 'com.atlassian.bamboo.plugins.maven:task.builder.mvn3'
      error	25-May-2020 14:59:57	Error occurred while running Task 'Compile pom' of type com.atlassian.bamboo.plugins.maven:task.builder.mvn3.
      error	25-May-2020 14:59:57	com.atlassian.bamboo.task.TaskException: Failed to execute task
      ...
      ...
      error	25-May-2020 14:59:57		at com.atlassian.bamboo.plugins.maven.task.Maven3BuildTask.execute(Maven3BuildTask.java:72)
      error	25-May-2020 14:59:57		... 16 more
      error	25-May-2020 14:59:57	Caused by: com.thoughtworks.xstream.converters.ConversionException: 
      error	25-May-2020 14:59:57	---- Debugging information ----
      error	25-May-2020 14:59:57	cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
      error	25-May-2020 14:59:57	cause-message       : org.apache.commons.logging.LogFactory$Log4jLog
      error	25-May-2020 14:59:57	class               : org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate
      error	25-May-2020 14:59:57	required-type       : org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate
      error	25-May-2020 14:59:57	converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
      error	25-May-2020 14:59:57	path                : /com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration/delegate/log
      error	25-May-2020 14:59:57	line number         : 63
      error	25-May-2020 14:59:57	class[1]            : com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration
      error	25-May-2020 14:59:57	required-type[1]    : com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration
      error	25-May-2020 14:59:57	version             : not available
      error	25-May-2020 14:59:57	-------------------------------
      error	25-May-2020 14:59:57		at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:77)
      error	25-May-2020 14:59:57		at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
      error	25-May-2020 14:59:57		at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      error	25-May-2020 14:59:57		at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
      

      Workaround

      1. Stop Bamboo.
      2.  Backup the database.
      3. Run the below delete query
        DELETE FROM BANDANA
        WHERE BANDANA_KEY LIKE 'com.atlassian.bamboo.capability.DefaultCapabilityConfigurationManager:%' and serialized_data like '%Log4jLog%';
        
      4. Start Bamboo
      5. Navigate to this Maven executable and enable the "Local Repository Isolation" box (this would have been disabled as a result of running the above query).

      Validation

      1. Run the below select query to confirm it's in the bandana table:
        SELECT * FROM BANDANA WHERE BANDANA_KEY LIKE 'com.atlassian.bamboo.capability.DefaultCapabilityConfigurationManager:%' and serialized_data like '%org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog%'

          Form Name

            [BAM-20960] Maven tasks fail to run when repository isolation is enabled in the executable

            James Williams made changes -
            Remote Link Original: This issue links to "BDEV-16003 (Jira)" [ 486988 ] New: This issue links to "BDEV-16003 (Hello Jira)" [ 486988 ]
            Zuzanna Struczewska made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 599739 ]
            Zuzanna Struczewska made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 600154 ]
            Zuzanna Struczewska made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 599739 ]
            Sylwester Jeruzal (Inactive) made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Short Term Backlog [ 12074 ] New: Closed [ 6 ]
            Sylwester Jeruzal (Inactive) made changes -
            Fix Version/s New: 7.1.1 [ 92490 ]
            Jeyanthan I (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 488525 ]
            Pawel Skierczynski made changes -
            Remote Link New: This issue links to "BDEV-16003 (Jira)" [ 486988 ]
            Pawel Skierczynski made changes -
            Status Original: Needs Triage [ 10030 ] New: Short Term Backlog [ 12074 ]
            Ellie Z (they/them) made changes -
            Description Original: h3. Issue Summary

            After upgrading Bamboo to 7.0, All the Maven tasks (whose corresponding Maven executables are enabled with repository isolation option) are failing with the below error.
            h3. Steps to Reproduce
             # Define a Maven 3.x executable in Bamboo 6.x
             # Enable [repository isolation|https://confluence.atlassian.com/bamboo/configuring-repository-isolation-for-maven-executables-289277167.html] for one of the Maven executables
             # Add a Maven 3.x task and choose this executable.
             # Run and confirm this Maven task is running
             # Upgrade Bamboo to 7.0.4
             # Run the same plan

            h3. Expected Results

            Maven 3.x task runs without any errors.
            h3. Actual Results

            The below exception is thrown in the build log:
            {noformat}
            simple 25-May-2020 14:59:57 Starting task 'Compile pom-web' of type 'com.atlassian.bamboo.plugins.maven:task.builder.mvn3'
            error 25-May-2020 14:59:57 Error occurred while running Task 'Compile pom' of type com.atlassian.bamboo.plugins.maven:task.builder.mvn3.
            error 25-May-2020 14:59:57 com.atlassian.bamboo.task.TaskException: Failed to execute task
            ...
            ...
            error 25-May-2020 14:59:57 at com.atlassian.bamboo.plugins.maven.task.Maven3BuildTask.execute(Maven3BuildTask.java:72)
            error 25-May-2020 14:59:57 ... 16 more
            error 25-May-2020 14:59:57 Caused by: com.thoughtworks.xstream.converters.ConversionException:
            error 25-May-2020 14:59:57 ---- Debugging information ----
            error 25-May-2020 14:59:57 cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
            error 25-May-2020 14:59:57 cause-message : org.apache.commons.logging.LogFactory$Log4jLog
            error 25-May-2020 14:59:57 class : org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate
            error 25-May-2020 14:59:57 required-type : org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate
            error 25-May-2020 14:59:57 converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
            error 25-May-2020 14:59:57 path : /com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration/delegate/log
            error 25-May-2020 14:59:57 line number : 63
            error 25-May-2020 14:59:57 class[1] : com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration
            error 25-May-2020 14:59:57 required-type[1] : com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration
            error 25-May-2020 14:59:57 version : not available
            error 25-May-2020 14:59:57 -------------------------------
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:77)
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
            {noformat}
            h3. Workaround

            A workaround will be added here when verified.
            New: h3. Issue Summary

            After upgrading Bamboo to 7.0, All the Maven tasks (whose corresponding Maven executables are enabled with repository isolation option) are failing with the below error.
            h3. Steps to Reproduce
             # Define a Maven 3.x executable in Bamboo 6.x
             # Enable [repository isolation|https://confluence.atlassian.com/bamboo/configuring-repository-isolation-for-maven-executables-289277167.html] for one of the Maven executables
             # Add a Maven 3.x task and choose this executable.
             # Run and confirm this Maven task is running
             # Upgrade Bamboo to 7.0.4
             # Run the same plan

            h3. Expected Results

            Maven 3.x task runs without any errors.
            h3. Actual Results

            The below exception is thrown in the build log:
            {noformat}
            simple 25-May-2020 14:59:57 Starting task 'Compile pom-web' of type 'com.atlassian.bamboo.plugins.maven:task.builder.mvn3'
            error 25-May-2020 14:59:57 Error occurred while running Task 'Compile pom' of type com.atlassian.bamboo.plugins.maven:task.builder.mvn3.
            error 25-May-2020 14:59:57 com.atlassian.bamboo.task.TaskException: Failed to execute task
            ...
            ...
            error 25-May-2020 14:59:57 at com.atlassian.bamboo.plugins.maven.task.Maven3BuildTask.execute(Maven3BuildTask.java:72)
            error 25-May-2020 14:59:57 ... 16 more
            error 25-May-2020 14:59:57 Caused by: com.thoughtworks.xstream.converters.ConversionException:
            error 25-May-2020 14:59:57 ---- Debugging information ----
            error 25-May-2020 14:59:57 cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
            error 25-May-2020 14:59:57 cause-message : org.apache.commons.logging.LogFactory$Log4jLog
            error 25-May-2020 14:59:57 class : org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate
            error 25-May-2020 14:59:57 required-type : org.apache.commons.configuration.XMLConfiguration$XMLFileConfigurationDelegate
            error 25-May-2020 14:59:57 converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
            error 25-May-2020 14:59:57 path : /com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration/delegate/log
            error 25-May-2020 14:59:57 line number : 63
            error 25-May-2020 14:59:57 class[1] : com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration
            error 25-May-2020 14:59:57 required-type[1] : com.atlassian.bamboo.ww2.actions.build.admin.create.CustomizedXMLConfiguration
            error 25-May-2020 14:59:57 version : not available
            error 25-May-2020 14:59:57 -------------------------------
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:77)
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
            error 25-May-2020 14:59:57 at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499)
            {noformat}
            h3. Workaround
            # Stop Bamboo.
            # (!) Backup the database.
            # Run the below delete query
            {code:sql}
            DELETE FROM BANDANA
            WHERE BANDANA_KEY LIKE 'com.atlassian.bamboo.capability.DefaultCapabilityConfigurationManager:%' and serialized_data like '%Log4jLog%';
            {code}
            # Start Bamboo
            # Navigate to this Maven executable and enable the "Local Repository Isolation" box (this would have been disabled as a result of running the above query).

            h4. Validation
            # Run the below select query to confirm it's in the bandana table:
            {code:sql}
            SELECT * FROM BANDANA WHERE BANDANA_KEY LIKE 'com.atlassian.bamboo.capability.DefaultCapabilityConfigurationManager:%' and serialized_data like '%org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog%'{code}

              Unassigned Unassigned
              jinbasekaran Jeyanthan I (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: