"Unable to initialize command context" while deploying war to JBoss using Jenkins - jenkins

I created maven project in Jenkins and it has a step to deploy war to JBoss using Wildfy Deployer Plugin with following details -
WAR/EAR files = ./target/test.war
Hostname = localhost
Port - 8181
But I run job it results into following error -
2019-10-14 13:42:48.720+0000 [id=185] INFO hudson.model.Run#execute: deploy-war-to-jboss #4 main build action completed: FAILURE
java.lang.IllegalStateException: Unable to initialize command context.
at org.jboss.as.cli.scriptsupport.CLI.connect(CLI.java:152)
at org.jboss.as.cli.scriptsupport.CLI.connect(CLI.java:135)
at org.jenkinsci.plugins.wildfly.WildflyBuilder.perform(WildflyBuilder.java:136)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
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:1815)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: org.jboss.as.cli.CliInitializationException: Failed to load org.jboss.as.cli.impl.CommandContextFactoryImpl
at org.jboss.as.cli.CommandContextFactory.getInstance(CommandContextFactory.java:41)
at org.jboss.as.cli.scriptsupport.CLI.connect(CLI.java:149)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.jboss.as.cli.impl.CommandContextFactoryImpl
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:555)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jboss.as.cli.CommandContextFactory.getInstance(CommandContextFactory.java:39)
... 12 more
2019-10-14 13:44:06.945+0000 [id=230] INFO hudson.model.Run#execute: deploy-war-to-jboss #5 main build action completed: FAILURE
Please help to understand what's wrong here.

Related

java.io.IOException: Can't find allure commandline <null>

My Jenkins master system is linux and slave system is windows.
I have set the allure commandline path in Global tool configuration and slave configuration, but when I run the job, I'm getting following error:
ERROR: Step ‘Allure Report’ aborted due to exception:
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ip/ip:port
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
at hudson.remoting.Channel.call(Channel.java:908)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getMajorVersion(AllureCommandlineInstallation.java:58)
at ru.yandex.qatools.allure.jenkins.ReportBuilder.build(ReportBuilder.java:44)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:298)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:223)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1749)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
java.io.IOException: Can't find allure commandline <null>
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:63)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:58)
at hudson.remoting.UserRequest.perform(UserRequest.java:207)
at hudson.remoting.UserRequest.perform(UserRequest.java:53)
at hudson.remoting.Request$2.run(Request.java:358)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:98)
at java.lang.Thread.run(Unknown Source)
Finished: FAILURE
my question is resolved by #vipinnambiar' answer,Thanks very much!
"On the agent configuration setting,set the Allure installation home directory(without the "bin") should resolve this issue. That worked for me."--#vipinnambiar
enter image description here

Getting error in allure download in jenkins

When downloading allure in jenkins, the following error/stack trace is showing up.
How could I resolve this?
Unpacking https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip to /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.7.0 on Jenkins
ERROR: Step ‘Allure Report’ aborted due to exception:
java.io.IOException: Server returned HTTP response code: 403 for URL: https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3000)
at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:629)
at java.net.URLConnection.getContentLengthLong(URLConnection.java:501)
at java.net.URLConnection.getContentLength(URLConnection.java:485)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:407)
at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:90)
Caused: java.io.IOException: Server returned HTTP response code: 403 for URL: https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
at org.jvnet.robust_http_client.RetryableHttpStream.getStream(RetryableHttpStream.java:98)
at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:91)
at org.jvnet.robust_http_client.RetryableHttpStream.<init>(RetryableHttpStream.java:74)
at hudson.ProxyConfiguration.getInputStream(ProxyConfiguration.java:265)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:870)
Caused: java.io.IOException: Failed to install https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip to /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/Allure_2.7.0
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:884)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:792)
at hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.forNode(AllureCommandlineInstallation.java:108)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.forNode(AllureCommandlineInstallation.java:33)
at ru.yandex.qatools.allure.jenkins.utils.BuildUtils.setUpTool(BuildUtils.java:39)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.getCommandline(AllureReportPublisher.java:335)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:290)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:218)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1823)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
≈
https://dl.bintray.com/qameta/ is temporary unavailable. As workaround you can configure Jenkins to download Allure from Github releases:
Open Jenkins Configuration.
Open Jenkins Global Tool Configuration
(https:///configureTools/)
Use the following url in settings below:
https://github.com/allure-framework/allure2/releases/download/2.7.0/allure-2.7.0.zip

"NoClassDefFoundError" in jenkins/scm/RunWithSCM

Using Jenkins 2.8, I get the error below when I run a simple Jenkins job. The Jenkins job is for just executing a shell script.
FATAL: jenkins/scm/RunWithSCM
java.lang.NoClassDefFoundError: jenkins/scm/RunWithSCM
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:878)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.jenkinsci.plugins.workflow.job.WorkflowJob$SCMListenerImpl.onCheckout(WorkflowJob.java:629)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.ClassNotFoundException: jenkins.scm.RunWithSCM
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
Finished: FAILURE
How can I fix this?
Got the resolution for the error. 'workflow-aggregator'(Pipeline) plugin was causing the issue. Some of the dependencies were incompatible. Uninstalled and reinstalled the plugin with all its dependencies, which fixed the above issue.

IOException Upload to Artifactory from Jenkins Slave

Trying to upload artifacts to Artifactory from a Slave agent but getting the following exception.
Jenkins Artifactory Plugin version: 2.9.1
For pattern: Installer-(*).exe 1 artifacts were found.
Deploying artifact: https://*********/artifactory/****/0.0.0.0.zip
ERROR: remote file operation failed: d:\j\workspace\Test at hudson.remoting.Channel#ab91c59:JNLP4-connect connection from 2.38.60.62/2.38.60.62:59447: java.io.IOException: Failed to deploy file. Status code: 502
java.io.IOException: remote file operation failed: d:\j\workspace\Test at hudson.remoting.Channel#ab91c59:JNLP4-connect connection from 2.38.60.62/2.38.60.62:59447: java.io.IOException: Failed to deploy file. Status code: 502
at hudson.FilePath.act(FilePath.java:992)
at hudson.FilePath.act(FilePath.java:974)
at org.jfrog.hudson.generic.GenericArtifactsDeployer.deploy(GenericArtifactsDeployer.java:76)
at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator$1.tearDown(ArtifactoryGenericConfigurator.java:392)
at hudson.model.Build$BuildExecution.doRun(Build.java:174)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
Caused by: java.io.IOException: Failed to deploy file. Status code: 502
at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:565)
at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:278)
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.deploy(GenericArtifactsDeployer.java:217)
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:189)
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:130)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
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(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:94)
at java.lang.Thread.run(Unknown Source)
at ......remote call to JNLP4-connect connection from 2.38.60.62/2.38.60.62:59447(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:822)
at hudson.FilePath.act(FilePath.java:985)
... 9 more
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Finished: FAILURE`
I have turned off Agent->Master Access Control, opened up all ports in firewall but still getting the same error.
Thank you.
Ok, here's what I did.
I configured the job again to upload from master and it failed. However, it provided me the correct exception. The reason was that the user account I was using didn't have write access to that repo.
Once I added required permissions, I was able to upload from slave.

How to deploy war file to jboss 7.1.1 from jenkins1.573 automatically during build?

I'm trying to build a project using jenkins.upon successful build my war file should be deployed automatically to jboss deployments folder. But during build I got the following error:
I am using deploy plugin in jenkins.
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to create deployer with implementation class org.codehaus.cargo.container.jboss.JBoss7xRemoteDeployer for the parameters (container [id = [jboss7x]], deployer type [remote]).
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:154)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:93)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:141)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:161)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:61)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
at hudson.FilePath.act(FilePath.java:922)
at hudson.FilePath.act(FilePath.java:895)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:772)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:736)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1040)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:685)
at hudson.model.Run.execute(Run.java:1757)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:220)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:43)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:150)
... 19 more
Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss connector classes! Make sure the required JBoss JARs (or Maven dependencies) are in CARGO's classpath.
More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:161)
at org.codehaus.cargo.container.jboss.JBoss7xRemoteDeployer.<init>(JBoss7xRemoteDeployer.java:41)
... 26 more
Caused by: java.lang.ClassNotFoundException: org.jboss.as.controller.client.ModelControllerClient
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1375)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:156)
... 27 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:220)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:43)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:150)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:93)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:141)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:161)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:61)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
at hudson.FilePath.act(FilePath.java:922)
at hudson.FilePath.act(FilePath.java:895)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:772)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:736)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1040)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:685)
at hudson.model.Run.execute(Run.java:1757)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss connector classes! Make sure the required JBoss JARs (or Maven dependencies) are in CARGO's classpath.
More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:161)
at org.codehaus.cargo.container.jboss.JBoss7xRemoteDeployer.<init>(JBoss7xRemoteDeployer.java:41)
... 26 more
Caused by: java.lang.ClassNotFoundException: org.jboss.as.controller.client.ModelControllerClient
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1375)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:156)
... 27 more
Finished: FAILURE
The plugin can't find the ModelControllerClient. It looks like a missing dependency on the org.jboss.as:jboss-as-controller-client.
Another option would be to use the jboss-as-maven-plugin. Should have similar goals as cargo for deploying.
I was facing this issue from yesterday , I found the solution.
The solution is very simple. Please follow below steps:
Step 1: Go to "Manage Jenkins" --> "Manage Plugins"
Step 2: Install "Deploy to container Plugin" (After successful installation you can able to see 'Deploy ear/war to container' in Post Build Action section)
Step 3: See this image for reference
Step 4: Copy all JBoss module JAR files to Jenkins deploy folder(jenkns\plugins\deploy\WEB-INF\lib)
Step 5: Restart your JENKINS
That's it you are done!. It works fine.

Resources