• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None

      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

          [JENKINS-10375] maven failed when turn on headless

          kutzi added a comment -

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

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

          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.

          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.

          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

          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

          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

          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

          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

          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

          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

          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

          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

          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

          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

          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

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

              Created:
              Updated:
              Resolved: