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

Failed to instantiate class hudson.plugins.copyartifact.CopyArtifact

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • Jenkins 1.508
      Jenkins LTS 1.480.3

      I seem to be unable to select a project to copy an artifact from via the job config. Any time I try to and press save I get the following error msg:

      Exception: java.lang.RuntimeException: Failed to instantiate class hudson.plugins.copyartifact.CopyArtifact from {"projectName":"Moho","":"0","selector":

      {"stapler-class":"hudson.plugins.copyartifact.StatusBuildSelector","stableOnly":false}

      ,"filter":"*//mysql.provisioning.sql-*.tar.gz","target":"target/artifacts/","parameters":"","flatten":true,"optional":false,"stapler-class":"hudson.plugins.copyartifact.CopyArtifact","kind":"hudson.plugins.copyartifact.CopyArtifact"}
      Stacktrace:

      Full logs: https://gist.github.com/johntdyer/4ecd0135fad5586c637f

      This is version 1.26

          [JENKINS-17402] Failed to instantiate class hudson.plugins.copyartifact.CopyArtifact

          Jesse Glick added a comment -

          Probably related to fix of JENKINS-13222, but the bug is in the Maven plugin: MavenModuleSet.getItem(String) may return null if there is no such child but it may not throw some unchecked exception.

          Jesse Glick added a comment - Probably related to fix of JENKINS-13222 , but the bug is in the Maven plugin: MavenModuleSet.getItem(String) may return null if there is no such child but it may not throw some unchecked exception.

          Tom Ghyselinck added a comment - - edited

          We are also teased by this issue.

          Some more details from our side:

          We use Jenkins LTS 1.480.3

          Whenever the Project name is filled in, the CopyArtifact cannot be initiated any more.
          Other fields do not seem to give troubles.

          Any estimation of time to fix this?

          Tom Ghyselinck added a comment - - edited We are also teased by this issue. Some more details from our side: We use Jenkins LTS 1.480.3 Whenever the Project name is filled in, the CopyArtifact cannot be initiated any more. Other fields do not seem to give troubles. Any estimation of time to fix this?

          jhurne added a comment -

          Is there a workaround for this problem (maybe using the Jenkins console or REST API)? No matter what I do, I cannot get the Config GUI to allow me to set the project name.

          jhurne added a comment - Is there a workaround for this problem (maybe using the Jenkins console or REST API)? No matter what I do, I cannot get the Config GUI to allow me to set the project name.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/ItemGroup.java
          maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
          test/src/test/java/hudson/maven/MavenModuleSetTest.java
          http://jenkins-ci.org/commit/jenkins/7fa8fe4096d0134f598a9d475df1c6199b9b05e7
          Log:
          [FIXED JENKINS-17402] getItem may return null but may not throw IAE.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/ItemGroup.java maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java test/src/test/java/hudson/maven/MavenModuleSetTest.java http://jenkins-ci.org/commit/jenkins/7fa8fe4096d0134f598a9d475df1c6199b9b05e7 Log: [FIXED JENKINS-17402] getItem may return null but may not throw IAE.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2492
          [FIXED JENKINS-17402] getItem may return null but may not throw IAE. (Revision 7fa8fe4096d0134f598a9d475df1c6199b9b05e7)

          Result = UNSTABLE
          Jesse Glick : 7fa8fe4096d0134f598a9d475df1c6199b9b05e7
          Files :

          • test/src/test/java/hudson/maven/MavenModuleSetTest.java
          • core/src/main/java/hudson/model/ItemGroup.java
          • maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2492 [FIXED JENKINS-17402] getItem may return null but may not throw IAE. (Revision 7fa8fe4096d0134f598a9d475df1c6199b9b05e7) Result = UNSTABLE Jesse Glick : 7fa8fe4096d0134f598a9d475df1c6199b9b05e7 Files : test/src/test/java/hudson/maven/MavenModuleSetTest.java core/src/main/java/hudson/model/ItemGroup.java maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java changelog.html

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/ItemGroup.java
          maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
          test/src/test/java/hudson/maven/MavenModuleSetTest.java
          http://jenkins-ci.org/commit/jenkins/01f09f66caf0cc96d1d5fd01d3105b65f745a8a4
          Log:
          [FIXED JENKINS-17402] getItem may return null but may not throw IAE.(cherry picked from commit 7fa8fe4096d0134f598a9d475df1c6199b9b05e7)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/ItemGroup.java maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java test/src/test/java/hudson/maven/MavenModuleSetTest.java http://jenkins-ci.org/commit/jenkins/01f09f66caf0cc96d1d5fd01d3105b65f745a8a4 Log: [FIXED JENKINS-17402] getItem may return null but may not throw IAE.(cherry picked from commit 7fa8fe4096d0134f598a9d475df1c6199b9b05e7) Conflicts: changelog.html

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/MavenModuleSet.java
          http://jenkins-ci.org/commit/maven-plugin/8f9e0fecb04fb61412fa8dc0396e4cb3b86d94f3
          Log:
          [FIXED JENKINS-17402] getItem may return null but may not throw IAE.
          Originally-Committed-As: 7fa8fe4096d0134f598a9d475df1c6199b9b05e7

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/MavenModuleSet.java http://jenkins-ci.org/commit/maven-plugin/8f9e0fecb04fb61412fa8dc0396e4cb3b86d94f3 Log: [FIXED JENKINS-17402] getItem may return null but may not throw IAE. Originally-Committed-As: 7fa8fe4096d0134f598a9d475df1c6199b9b05e7

            Unassigned Unassigned
            johntdyer John Dyer
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: