0

When i run my pom.xml through Jenkins am getting the below error and not able to compile the program.

Building in workspace C:\Users\test\.jenkins\workspace\mavenBuild
Installing C:\Users\test\.jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.8.0_25\jdk.exe
[C_Program_Files_x86_Java_jdk1.8.0_25] $ C:\Users\test\.jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.8.0_25\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Users\test\.jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.8.0_25 /L C:\Users\test\.jenkins\tools\hudson.model.JDK\install5805825604689233021log
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "C:\Users\test\.jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.8.0_25\jdk.exe" (in directory "C:\Users\test\.jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.8.0_25"): CreateProcess error=740, The requested operation requires elevation
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at hudson.Proc$LocalProc.<init>(Proc.java:245)
    at hudson.Proc$LocalProc.<init>(Proc.java:214)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:846)
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:635)
    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.io.IOException: CreateProcess error=740, The requested operation requires elevation
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
    at java.lang.ProcessImpl.start(ProcessImpl.java:137)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 22 more
Finished: FAILURE
Shanmuga Raj
  • 125
  • 1
  • 2
  • 14
  • "Caused by: java.io.IOException: CreateProcess error=740, The requested operation requires elevation". – Tome May 31 '17 at 14:41
  • what is the solution???? – Shanmuga Raj May 31 '17 at 14:45
  • Maybe https://stackoverflow.com/questions/5853529/createprocess-error-740-the-requested-operation-requires-elevation helps. – J Fabian Meier May 31 '17 at 14:53
  • 1
    @ShanmugaRaj The error says it all `Installing C:\Users\test\.jenkins\tools\hudson.model.JDK\C_Program_Files_x86_Java_jdk1.8.0_25\jdk.exe` Probhably you havn't set the JDK path in Jenkins or you might have misconfigured the path in the batch file. Thanks – undetected Selenium May 31 '17 at 15:43
  • @DebanjanB Thanks for the response....I can able to run the build successfully but still am getting error like below: 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:483) – Shanmuga Raj Jun 01 '17 at 07:18
  • @ShanmugaRaj Can you please update your code block & the entire stack trace in the Question area for further analysis? Thanks – undetected Selenium Jun 01 '17 at 07:24
  • @ShanmugaRaj Can you consider to do a `maven clean` and `maven install` before executing through Jenkins? Thanks – undetected Selenium Jun 01 '17 at 07:27
  • @DebanjanB ya sure...but is it right to give maven clean maven install in Jenkins Build > Goals and options text area? – Shanmuga Raj Jun 01 '17 at 07:31
  • @ShanmugaRaj Yes, that is the ideal way we should do. Incase you are doubtful, to start with perform `maven clean` & `maven install` through Eclipse. Thanks – undetected Selenium Jun 01 '17 at 07:33
  • @DebanjanB please find the error code here: [link](https://stackoverflow.com/questions/44301356/jenkins-pom-xml-throws-error) – Shanmuga Raj Jun 01 '17 at 07:39
  • @ShanmugaRaj So now your Jenkins error being resolved, should I construct an Answer for you to Accept it as a solution? Thanks – undetected Selenium Jun 01 '17 at 07:44
  • ya but am getting different error now...did u saw tat error which i mentioned in the link???@DebanjanB – Shanmuga Raj Jun 01 '17 at 07:48
  • @ShanmugaRaj You are getting different error because you have not configured configured maven properly. Try to execute `maven test` from command line first. Thanks – undetected Selenium Jun 01 '17 at 08:33
  • @DebanjanB Thanks..my issue got resolved...i just downgrade my maven to lower version – Shanmuga Raj Jun 01 '17 at 09:53

0 Answers0