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

maven failed when turn on headless

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None

      Description

      when I turn on the "Run Headless" option in "Build" of a maven object, it failed with following log:

      Started by user lidaobing
      Building on master
      Cleaning up /var/lib/jenkins/jobs/Base/workspace/.
      Deleting /var/lib/jenkins/jobs/Base/workspace/./target
      Updating http://svn.teamhost.org/llap/trunk/phase1/sources/Base
      At revision 2870
      no change for http://svn.teamhost.org/llap/trunk/phase1/sources/Base since the previous build
      Parsing POMs
      Modules changed, recalculating dependency graph
      [workspace] $ java null -Djava.awt.headless=true -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.2.jar:/var/lib/jenkins/tools/default_maven/boot/classworlds-1.1.jar hudson.maven.agent.Main /var/lib/jenkins/tools/default_maven /var/run/jenkins/war/WEB-INF/lib/remoting-1.421.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.2.jar 39682 /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
      Exception in thread "main" java.lang.NoClassDefFoundError: null
      Caused by: java.lang.ClassNotFoundException: null
      at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
      Could not find the main class: null. Program will exit.
      ERROR: Failed to launch Maven. Exit code = 1
      Finished: FAILURE

        Issue Links

          Activity

          Hide
          kutzi kutzi added a comment -

          Can we see how the config page of the job looks like?
          I wonder where this 'null' is coming from

          Show
          kutzi kutzi added a comment - Can we see how the config page of the job looks like? I wonder where this 'null' is coming from
          Hide
          kutzi kutzi added a comment -

          Okay, I think I found the problem.
          Workaround would be to add anything to the MAVEN_OPTS of your job - even some whitespace might work.

          Show
          kutzi kutzi added a comment - Okay, I think I found the problem. Workaround would be to add anything to the MAVEN_OPTS of your job - even some whitespace might work.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          changelog.html
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/dcabd4ba9a6b6036d697b863dc9bfe21691a3504
          Log:
          [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/dcabd4ba9a6b6036d697b863dc9bfe21691a3504 Log: [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #963
          [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty

          Christoph Kutzinski : dcabd4ba9a6b6036d697b863dc9bfe21691a3504
          Files :

          • maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          • changelog.html
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #963 [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty Christoph Kutzinski : dcabd4ba9a6b6036d697b863dc9bfe21691a3504 Files : maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java changelog.html
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #975
          [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty

          Christoph Kutzinski : dcabd4ba9a6b6036d697b863dc9bfe21691a3504
          Files :

          • maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          • changelog.html
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #975 [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty Christoph Kutzinski : dcabd4ba9a6b6036d697b863dc9bfe21691a3504 Files : maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java changelog.html
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          changelog.html
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/dcabd4ba9a6b6036d697b863dc9bfe21691a3504
          Log:
          [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/dcabd4ba9a6b6036d697b863dc9bfe21691a3504 Log: [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          changelog.html
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/dcabd4ba9a6b6036d697b863dc9bfe21691a3504
          Log:
          [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/dcabd4ba9a6b6036d697b863dc9bfe21691a3504 Log: [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          http://jenkins-ci.org/commit/maven-plugin/9ed39038d31be965f6dff886fc6c4f6ed0a4a5ff
          Log:
          [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty
          Originally-Committed-As: dcabd4ba9a6b6036d697b863dc9bfe21691a3504

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/maven/AbstractMavenProcessFactory.java http://jenkins-ci.org/commit/maven-plugin/9ed39038d31be965f6dff886fc6c4f6ed0a4a5ff Log: [FIXED JENKINS-10375] Maven build error if headless option is checked and MAVEN_OPTS are empty Originally-Committed-As: dcabd4ba9a6b6036d697b863dc9bfe21691a3504

            People

            • Assignee:
              kutzi kutzi
              Reporter:
              lidaobing lidaobing
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: