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

NoSuchFieldError: DEFAULT_USER_SETTINGS_FILE with Maven 3.5.0

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Duplicate
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Jenkin Version 2.46.1
    • Similar Issues:

      Description

      Not able to triggered  a successful build using Jenkin.

      Jenkin Version : 2.46.1

      Maven Version :3.5.0

      Java version : 1.8.0_65

       

      I  created one project using cucumber (BDD) in java on Maven . Now when i integreate this with Jenkin and click on the build now  . Build is failed and getting some exception.
      java.lang.reflect.InvocationTargetException

      I have attached the  logs detail.

       

      Log Detail:

       

      Started by user anonymous

      Building in workspace C:\Users\njai26\.jenkins\jobs\MavenRun\workspace

      Parsing POMs

      Established TCP socket on 51258

      [Maven_Jenkin_BDD] $ "C:\Program Files\Java\jdk1.8.0_65/bin/java" -cp C:\Users\njai26\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-agent-1.8.1.jar;C:\Maven\apache-maven-3.5.0\boot\plexus-classworlds-2.5.2.jar;C:\Maven\apache-maven-3.5.0/conf/logging jenkins.maven3.agent.Maven33Main C:\Maven\apache-maven-3.5.0 C:\Users\njai26\.jenkins\war\WEB-INF\lib\remoting-3.7.jar C:\Users\njai26\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-interceptor-1.8.1.jar C:\Users\njai26\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.8.1.jar 51258

      <===[JENKINS REMOTING CAPACITY]===>channel started

      Executing Maven:  -B -f D:\B2C Automation\Maven_Jenkin_BDD\pom.xml clean Install

      java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:497)

              at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)

              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)

              at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:497)

              at hudson.maven.Maven3Builder.call(Maven3Builder.java:139)

              at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)

              at hudson.remoting.UserRequest.perform(UserRequest.java:153)

              at hudson.remoting.UserRequest.perform(UserRequest.java:50)

              at hudson.remoting.Request$2.run(Request.java:336)

              at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)

              at java.util.concurrent.FutureTask.run(FutureTask.java:266)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.NoSuchFieldError: DEFAULT_USER_SETTINGS_FILE

              at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.settings(DefaultMavenExecutionRequestBuilder.java:658)

              at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.getMavenExecutionRequest(DefaultMavenExecutionRequestBuilder.java:149)

              at org.jvnet.hudson.maven3.launcher.Maven33Launcher.getMavenExecutionRequest(Maven33Launcher.java:150)

              at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:127)

              ... 21 more

      ERROR: Failed to parse POMs

      java.io.IOException: java.lang.reflect.InvocationTargetException

              at hudson.maven.Maven3Builder.call(Maven3Builder.java:179)

              at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)

              at hudson.remoting.UserRequest.perform(UserRequest.java:153)

              at hudson.remoting.UserRequest.perform(UserRequest.java:50)

              at hudson.remoting.Request$2.run(Request.java:336)

              at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)

              at java.util.concurrent.FutureTask.run(FutureTask.java:266)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

              at ......remote call to Channel to Maven [C:\Program Files\Java\jdk1.8.0_65/bin/java, -cp, C:\Users\njai26\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-agent-1.8.1.jar;C:\Maven\apache-maven-3.5.0\boot\plexus-classworlds-2.5.2.jar;C:\Maven\apache-maven-3.5.0/conf/logging, jenkins.maven3.agent.Maven33Main, C:\Maven\apache-maven-3.5.0, C:\Users\njai26\.jenkins\war\WEB-INF\lib\remoting-3.7.jar, C:\Users\njai26\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-interceptor-1.8.1.jar, C:\Users\njai26\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.8.1.jar, 51258](Native Method)

              at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)

              at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)

              at hudson.remoting.Channel.call(Channel.java:830)

              at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:161)

              at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:873)

              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)

              at hudson.model.Run.execute(Run.java:1728)

              at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)

              at hudson.model.ResourceController.execute(ResourceController.java:98)

              at hudson.model.Executor.run(Executor.java:405)

      Caused by: java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:497)

              at hudson.maven.Maven3Builder.call(Maven3Builder.java:139)

              at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)

              at hudson.remoting.UserRequest.perform(UserRequest.java:153)

              at hudson.remoting.UserRequest.perform(UserRequest.java:50)

              at hudson.remoting.Request$2.run(Request.java:336)

              at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)

              at java.util.concurrent.FutureTask.run(FutureTask.java:266)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.Exception: java.lang.reflect.InvocationTargetException

              at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:179)

              ... 14 more

      Caused by: java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:497)

              at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)

              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)

              at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)

              ... 14 more

      Caused by: java.lang.NoSuchFieldError: DEFAULT_USER_SETTINGS_FILE

              at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.settings(DefaultMavenExecutionRequestBuilder.java:658)

              at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.getMavenExecutionRequest(DefaultMavenExecutionRequestBuilder.java:149)

              at org.jvnet.hudson.maven3.launcher.Maven33Launcher.getMavenExecutionRequest(Maven33Launcher.java:150)

              at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:127)

              ... 21 more

      channel stopped

      Finished: FAILURE

        Attachments

          Issue Links

            Activity

            Hide
            sougata6974 sougata das added a comment -

            Nirmal Jain I am getting the same error.Did you find any resolution for this.

            Please let me know

            Show
            sougata6974 sougata das added a comment - Nirmal Jain I am getting the same error.Did you find any resolution for this. Please let me know
            Hide
            albers Harald Albers added a comment -

            I get this after upgrading Maven from 3.3.9 to 3.5.0.

            Switching back to 3.3.9 reverts this error.

            Show
            albers Harald Albers added a comment - I get this after upgrading Maven from 3.3.9 to 3.5.0. Switching back to 3.3.9 reverts this error.
            Hide
            albers Harald Albers added a comment -

            Changed issue title because it was misleading: the error does not occur when configuring a project but when running a job.

            Show
            albers Harald Albers added a comment - Changed issue title because it was misleading: the error does not occur when configuring a project but when running a job.
            Hide
            falcon benoit guerin added a comment -

            Same here. All my jobs, either freestyle or maven, fail with this error when using Maven 3.5. I revert to Maven 3.3.9

            Show
            falcon benoit guerin added a comment - Same here. All my jobs, either freestyle or maven, fail with this error when using Maven 3.5. I revert to Maven 3.3.9
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Duplicates JENKINS-43446

             

            Show
            oleg_nenashev Oleg Nenashev added a comment - Duplicates JENKINS-43446  

              People

              • Assignee:
                Unassigned
                Reporter:
                njnirmal Nirmal Jain
              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: