Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7159

Ant build fails with UnsupportedOperationException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • ant-plugin
    • None
    • Hudson build 1.370 / Tomcat 7.0 / Windows XP / Ant 1.8.1 / Java JDK 1.6.0_21

      I'm seeing the same problem reported in #JENKINS-6084 when trying to start a freestyle job based on ant:

      FATAL: null
      java.lang.UnsupportedOperationException
      at java.util.AbstractMap$SimpleImmutableEntry.setValue(AbstractMap.java:726)
      at hudson.EnvVars.resolve(EnvVars.java:156)
      at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:708)
      at hudson.tasks.Ant.perform(Ant.java:134)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      at hudson.model.Build$RunnerImpl.build(Build.java:174)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      at hudson.model.Run.run(Run.java:1248)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:129)

      From what I can see the Environment Variables are passed through as an ImmutableMap - the subsequent entries that are assembled into the subsequent maps thereby still seem to contain SimpleImmutableEntry

      Steps to reproduce (in my environment):

      1) Create a new freestyle project
      2) Add Build step -> Ant
      3) Select Ant runtime (defined in configuration)
      4) Leave target empty

        1. build.xml
          0.1 kB
        2. config.xml
          1 kB
        3. hudson
          2 kB

            km km
            rpo rpo
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: