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

Hudson fails build with UnsupportedOperationException due to attempted modification of SimpleImmutableEntry at EnvVars.java:178

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • core
    • None
    • RedHat Enterprise Linux Server release 5.5; Windows 7; Java SE 6 update 21 64-bit; Glassfish 3.0.1 build 22.

      I get the following error with an ant or maven build from workspace or repository.

      Started by user anonymous
      FATAL: null
      java.lang.UnsupportedOperationException
      at java.util.AbstractMap$SimpleImmutableEntry.setValue(Unknown Source)
      at hudson.EnvVars.resolve(EnvVars.java:178)
      at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:708)
      at hudson.plugins.mercurial.MercurialSCM.update(MercurialSCM.java:430)
      at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:419)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1082)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
      at hudson.model.Run.run(Run.java:1273)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:137)

      It seems if you use -XX:+AggressiveOpts then alt-rt.jar is loaded in the classpath earlier than rt.jar. This results in a different implementation of the Map collections.

      Recreate by starting the server with jvm option -XX:+AggressiveOpts. See arguments.cpp and altclasses/java/util/TreeMap.java in in the jdk6 source tree.

      Workaround by removing -XX:+AggressiveOpts.

      I think this is the same bug reported in JENKINS-7159 and JENKINS-6055 .

            Unassigned Unassigned
            bdwalker bdwalker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: