I have setup Jenkins and am unable to run some my script, I now have to run some 'winds batch script'.I gave command mvn exec:java -Dexec.mainClass="test.automation.framework.Runner",but i am getting error,Can some one please help me on dis?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

I have setup Jenkins and am unable to run some my script, I now have to run some 'winds batch script'.I gave command mvn exec:java -Dexec.mainClass="test.automation.framework.Runner",but i am getting error,Can some one please help me on dis?

molletiabhilash1
Commit message: "latest changes in schoolmanager class file"
 > /opt/bitnami/git/bin/git rev-list --no-walk 9ff69e6ef1d74435fa66ef3f7f540a0249e2085e # timeout=10
[qa-automation] $ cmd /c call /opt/bitnami/apache-tomcat/temp/jenkins7539709996486040665.bat
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "cmd" (in directory "/opt/bitnami/apps/jenkins/jenkins_home/workspace/qa-automation"): error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at hudson.Proc$LocalProc.<init>(Proc.java:249)
	at hudson.Proc$LocalProc.<init>(Proc.java:218)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)
	at hudson.Launcher$ProcStarter.start(Launcher.java:449)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1794)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute Windows batch command' marked build as failure
Archiving artifacts
Finished: FAILURE

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/88164238-e30a-4d29-86a0-26ff32ac91cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: I have setup Jenkins and am unable to run some my script, I now have to run some 'winds batch script'.I gave command mvn exec:java -Dexec.mainClass="test.automation.framework.Runner",but i am getting error,Can some one please help me on dis?

Mark Waite-2
You're trying to run a Windows batch command on a Linux agent.  That won't work.  

If a Windows batch command is required, then you will need to use an agent on a Windows computer.  Pipeline jobs usually control the agent they use based on a label.  Freestyle and other jobs do the same.

Mark W

On Fri, Nov 9, 2018 at 7:51 AM <[hidden email]> wrote:
Commit message: "latest changes in schoolmanager class file"
 > /opt/bitnami/git/bin/git rev-list --no-walk 9ff69e6ef1d74435fa66ef3f7f540a0249e2085e # timeout=10
[qa-automation] $ cmd /c call /opt/bitnami/apache-tomcat/temp/jenkins7539709996486040665.bat
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "cmd" (in directory "/opt/bitnami/apps/jenkins/jenkins_home/workspace/qa-automation"): error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at hudson.Proc$LocalProc.<init>(Proc.java:249)
	at hudson.Proc$LocalProc.<init>(Proc.java:218)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)
	at hudson.Launcher$ProcStarter.start(Launcher.java:449)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1794)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute Windows batch command' marked build as failure
Archiving artifacts
Finished: FAILURE

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/88164238-e30a-4d29-86a0-26ff32ac91cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFH9RNx%2B8jOpykwZpeoTn71fJ0SfrHGWHWL0h6q4FnNYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: I have setup Jenkins and am unable to run some my script, I now have to run some 'winds batch script'.I gave command mvn exec:java -Dexec.mainClass="test.automation.framework.Runner",but i am getting error,Can some one please help me on dis?

RAJENDRA PRASAD
In reply to this post by molletiabhilash1
Come again....,
You want to run wind batch script? Do you mean windows batch script on Jenkins?

If that is true , you cannot do that on Unix machine.

It looks Jenkins is running on Unix machine.

-Rajendra


On Fri, 9 Nov, 2018, 20:21 <[hidden email] wrote:
Commit message: "latest changes in schoolmanager class file"
 > /opt/bitnami/git/bin/git rev-list --no-walk 9ff69e6ef1d74435fa66ef3f7f540a0249e2085e # timeout=10
[qa-automation] $ cmd /c call /opt/bitnami/apache-tomcat/temp/jenkins7539709996486040665.bat
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "cmd" (in directory "/opt/bitnami/apps/jenkins/jenkins_home/workspace/qa-automation"): error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at hudson.Proc$LocalProc.<init>(Proc.java:249)
	at hudson.Proc$LocalProc.<init>(Proc.java:218)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)
	at hudson.Launcher$ProcStarter.start(Launcher.java:449)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1794)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute Windows batch command' marked build as failure
Archiving artifacts
Finished: FAILURE

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/88164238-e30a-4d29-86a0-26ff32ac91cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMrg02TDU6h7bCreSpf8uz7mXkyZD5-xgALzPuxqjQYgbsVrLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.