Configuration and Getting Started with Allure and NUnit - jenkins

We have tried to get Allure reports generating as part of our Jenkins build.
We have followed the documentation here to the letter (except these instruction just don't work)
In following the instructions we have installed the allure jenkins plugin and the allure-nunit adapter (extracting the 7 files contained in the v0.1.0 zip to NUnit 2.6.3 addins subdirectory on Jenkins server, as instructed).
Console output is as follows:
Recording NUnit tests results
Allure Report Generation: started
Allure Report Generation: find directories by mask [**/AllureResults]
Allure Report Generation: found allure result directories [C:\Program Files
(x86)\Jenkins\jobs\<myjob>\workspace\AllureResults]
Allure Report Generation: copy founded directories in directory [C:\Program Files
(x86)\Jenkins\jobs\<myjob>\workspace\allure6887431138581709111.tmp\results]
Allure Report Generation: generate report from directory [C:\Program Files
(x86)\Jenkins\jobs\<myjob>\workspace\allure6887431138581709111.tmp]
Allure Report Generation: attach report link to build and project
Allure Report Generation: Can't delete directory [C:\Program Files
(x86)\Jenkins\jobs\<myjob>\workspace\allure6887431138581709111.tmp]
java.nio.file.FileSystemException: C:\Program Files
(x86)\Jenkins\jobs\<myjob>\workspace\allure6887431138581709111.tmp\repositories\com \fasterxml\jackson\core\jackson-annotations\2.3.0\jackson-annotations-2.3.0.jar: The process
cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
at java.nio.file.Files.delete(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.Util.deleteFile(Util.java:247)
at hudson.Util.deleteRecursive(Util.java:310)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.Util.deleteRecursive(Util.java:301)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.Util.deleteRecursive(Util.java:301)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.Util.deleteRecursive(Util.java:301)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.Util.deleteRecursive(Util.java:301)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.Util.deleteRecursive(Util.java:301)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.Util.deleteRecursive(Util.java:301)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.Util.deleteRecursive(Util.java:301)
at hudson.Util.deleteContentsRecursive(Util.java:212)
at hudson.FilePath$13.invoke(FilePath.java:1108)
at hudson.FilePath$13.invoke(FilePath.java:1105)
at hudson.FilePath.act(FilePath.java:918)
at hudson.FilePath.act(FilePath.java:896)
at hudson.FilePath.deleteContents(FilePath.java:1105)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.deleteRecursive(AllureReportPublisher.java:221)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:143)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1770)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Allure Report Generation: completed
Allure does not fail the build, it is marked as PASSED.
Within the Jenkins workspace\TestReports directory (created by my script) the nunit-testresults.xml file is correctly generated. The AllureResults directory is created and populated with a website shell (i.e. the data subdirectory has 0's against everything).
Another directory allure.tmp is created in the Jenkins workspace directory which includes a 'results' subdirectory, with generated files but 0's again in the files in the data subdirectory.
Also created is another copy of the AllureResults directory in the Jenkins workspace directory. Why?
In Jenkins itself I can click on the rendered "Allure Report" which gives me: "Test run (0 testsuites, 0 testcases) PASSED"
It appears to us the documentation is lacking, however it also appears there are people using it. How did they get it working?
Therefore are led to ask:
1. How did you get it to actually process the nunit-testresults.xml file?
1. Is there something else we need to install and(or) configure?
1. Are we supposed to install allure-core or is it included in the Jenkins Plugin or allure-nunit adapter?
Thanks in advance.
Further to your suggestions here.
I have installed 0.1.0 of the allure-nunit adapter and the latest version of the allure jenkins plugin.
I am running a build step batch file with the following content:
IF NOT EXIST "%WORKSPACE%\TestReports"
(
MKDIR TestReports
)
"C:\Program Files (x86)\NUnit 2.6.3\bin\nunit-console.exe" mytest.dll /framework=net-4.0 /xml=TestReports\nunit-data-testsuite.xml
exit %%ERRORLEVEL%%
This step is emitting nunit-data-testsuite.xml to the Jenkins workspace\TestReports directory.
I am NO LONGER running the allure-cli package.
As a post build step I run the Allure Report Generation task configure as follows:
Results Directories: **/TestReports
Report Version: Custom: 1.41 (should this be 1.39?)
Generate: For All Builds
Stuff got generated in the allure.tmp directory. I see that my nunit-data-testsuite.xml file was copied to the allure.tmp\results directory.
...looking good at this point.
...but then I got this in the console:
Recording NUnit tests results
Allure Report Generation: started
Allure Report Generation: find directories by mask [**/TestReports]
Allure Report Generation: found allure result directories [C:\Program Files (x86)\Jenkins\jobs\MyTests\workspace\TestReports]
Allure Report Generation: copy founded directories in directory [C:\Program Files (x86)\Jenkins\jobs\MyTests\workspace\allure6553695529802657068.tmp\results]
Allure Report Generation: generate report from directory [C:\Program Files (x86)\Jenkins\jobs\MyTests\workspace\allure6553695529802657068.tmp]
ERROR: Publisher ru.yandex.qatools.allure.jenkins.AllureReportPublisher aborted due to exception
java.io.IOException: ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException
at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:47)
at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:18)
at hudson.FilePath.act(FilePath.java:918)
at hudson.FilePath.act(FilePath.java:896)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:211)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:141)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1770)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException
at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:135)
at ru.yandex.qatools.allure.jenkins.utils.ReportGenerator.invoke(ReportGenerator.java:44)
... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:133)
... 15 more
Caused by: ru.yandex.qatools.allure.data.ReportGenerationException: net.sf.saxon.event.NoOpenStartTagException: An attribute node (type) cannot be created after the children of the containing element
at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:55)
at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:44)
at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:35)
at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformations(XslTransformationUtils.java:29)
at ru.yandex.qatools.allure.data.TestRunGenerator.generate(TestRunGenerator.java:69)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:51)
... 20 more
Caused by: net.sf.saxon.event.NoOpenStartTagException: An attribute node (type) cannot be created after the children of the containing element
at net.sf.saxon.event.NoOpenStartTagException.makeNoOpenStartTagException(NoOpenStartTagException.java:49)
at net.sf.saxon.event.ComplexContentOutputter.attribute(ComplexContentOutputter.java:296)
at net.sf.saxon.instruct.CopyOf.copyAttribute(CopyOf.java:572)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:221)
at net.sf.saxon.instruct.Template.expand(Template.java:220)
at net.sf.saxon.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:440)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:317)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:174)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:203)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:345)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:170)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:217)
at net.sf.saxon.instruct.Template.expand(Template.java:220)
at net.sf.saxon.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:440)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:317)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:174)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:203)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:345)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:170)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:217)
at net.sf.saxon.instruct.Template.expand(Template.java:220)
at net.sf.saxon.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:440)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:317)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:174)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:203)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:345)
at net.sf.saxon.instruct.ApplyTemplates.defaultAction(ApplyTemplates.java:378)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:333)
at net.sf.saxon.Controller.transformDocument(Controller.java:1807)
at net.sf.saxon.Controller.transform(Controller.java:1621)
at ru.yandex.qatools.allure.data.utils.XslTransformationUtils.applyTransformation(XslTransformationUtils.java:52)
... 25 more
Have I configured something incorrectly or is this a bug?

This exception is caused by Jenkins issue.
You're only supposed to install Jenkins plugin and run your tests with NUnit adapter enabled. That's all. Nothing else. Also see the details in the following issue.

Related

Not able to generate Partner.jar

I want to integrate java with salesforce for that I'm trying to generate partner.jar, I'm following this link
Introduction to the Force.com Web Services Connector
I'm using Partner WSDL API. I'm stuck with generating Partner.jar file,
need some help here ..!!
I'm using command my command is **java -classpath J:\Practice\force-wsc-36.1.1.jar com.sforce.ws.tools.wsdlc J:\Practice\Partner.wsdl .\Partner.jar
now the exception is
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4
/STGroupDir
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.stringtemplate.v4.STGroupDir
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
You are trying to generate partner.jar using WSDL file and you are using "force-wsc-36.1.1.jar" (File as Web Service Connector).
As of WSC-36 connector required an additional framework to generate "partner.jar" call "StringTemplate engine framework".
Download latest "StringTemplate binary" jar file using below link: String Template jar file
Put that String template jar, wsc jar and WSDL files in one location.
Open CMD
Go to the directory where you put your all files.
Fire below command to generate a partner.jar file.
java -classpath force-wsc-36.1.1.jar;ST-4.0.8.jar com.sforce.ws.tools.wsdlc partner.wsdl partner.jar
Syntax: Java -classpath [WSC jar file];[String template jar file] com.sforce.ws.tools.wsdlc [Partner.wsdl file] [Ouput file name with .jar extation]
Create a folder named wsdl in your C:\ drive and copy following jars in to it:
force-wsc-54.0.0.jar ST-4.3.1.jar rhino-1.7.14.jar antlr-4.0-complete.jar
Open cmd and run:
java -classpath C:\wsdl\force-wsc-54.0.0.jar;C:\wsdl\ST-4.3.1.jar;C:\wsdl\rhino-1.7.14.jar;C:\wsdl\antlr-4.0-complete.jar com.sforce.ws.tools.wsdlc partner.wsdl.xml C:\wsdl\sf-partner.jar
Note: C:\wsdl\sf-partner.jar is a generated .jar stub file

Failed to install MStest plugin : Jenkins

I try to install the MSTest for showing the results from .trx file.
As I install through Download Now and Install after Restart, My Jenkins is taking so long time to restart so I tried with Install without restart.
It shows the following error
enter code here
Emma plugin
Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install emma plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:473)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
... 5 more
Caused by: java.io.IOException: Dependency maven-plugin (1.447) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
at hudson.PluginManager.dynamicLoad(PluginManager.java:463)
... 6 more
MSTest plugin Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install mstest plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:473)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
... 5 more
Caused by: java.io.IOException: Dependency emma (1.29) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
at hudson.PluginManager.dynamicLoad(PluginManager.java:463)
... 6 more
It is because MSTest plugin depends on emma and maven-plugin. I suspect you have bad network condition while download these 2 dependencies.
First, try Download Now and Install after Restart but wait for a longer time until it get successfully installed. Jenkins will take care of the dependencies.
Or,
as an alternative, you can first install emma and maven-plugin, then install MSTest then.

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.

When I run the selenium IDE script on Jenkins, I am getting HTML suite exception

HTML suite exception seen:
java.lang.RuntimeException: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox.exe'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3 c:\blah\firefox.exe
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.createBrowserLauncher(BrowserLauncherFactory.java:195)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.getBrowserLauncher(BrowserLauncherFactory.java:109)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.getBrowserLauncher(HTMLLauncher.java:79)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:139)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:198)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:640)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:305)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:96)
Caused by: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox.exe'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3 c:\blah\firefox.exe
at org.openqa.selenium.browserlaunchers.locators.CombinedFirefoxLocator.findBrowserLocationOrFail(CombinedFirefoxLocator.java:49)
at org.openqa.selenium.server.browserlaunchers.BrowserInstallationCache.locateBrowserInstallation(BrowserInstallationCache.java:46)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.<init>(FirefoxChromeLauncher.java:53)
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.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.createBrowserLauncher(BrowserLauncherFactory.java:184)
... 8 more
Publishing Selenium report...
ERROR: Publisher org.jvnet.hudson.plugins.seleniumhtmlreport.SeleniumHtmlReportPublisher aborted due to exception
java.lang.NullPointerException
at org.jvnet.hudson.plugins.seleniumhtmlreport.SeleniumHtmlReportPublisher.perform(SeleniumHtmlReportPublisher.java:79)
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.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:685)
at hudson.model.Run.execute(Run.java:1757)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Finished: FAILURE
Firefox is installed in - C:\Program Files\Mozilla Firefox
I have added the path in the Environment variables "*firefox C:\Program Files (x86)\Mozilla Firefox\" without quotes..
Selenium version used - selenium-server-standalone-2.39.0.jar
Mozilla Firefox version - 30.0
OS - Windows 8.1

Opentaps ERP- ClassNotFoundException error during running

Hi I am new to openTaps ERP development just a day before I started it.I have install a previously done project in my eclips.When I run it it gives me following error.I dont understand that error.
what should be done?
(I am using Postgresql database in it)
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:152)
at org.opentaps.foundation.infrastructure.Infrastructure.getSessionFactory(Infrastructure.java:120)
at org.opentaps.common.container.HibernateContainer.start(HibernateContainer.java:109)
at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:102)
at org.ofbiz.base.start.Start.startStartLoaders(Start.java:264)
at org.ofbiz.base.start.Start.startServer(Start.java:313)
at org.ofbiz.base.start.Start.start(Start.java:317)
at org.ofbiz.base.start.Start.main(Start.java:400)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more
Anyone knows how to resolve it??
try to download http://www.slf4j.org/download.html and extract it to some folder, then add the jar file (slf4j-api-1.6.4.jar) to your project build path (http://www.cs.duke.edu/courses/cps004g/fall05/assign/final/addlibrary.html)
or http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-%28Java%29
, if another exception appeared related to (slf4j) , try to add all jar files in the (slf4j-1.6.4) folder.
It seems that there is problem in Ehcache jar file or configuration.
ensure that (ehcache-1.6.1.jar) in the build classpath, if not, try to download ehcache-1.6.1.jar.zip from http://www.java2s.com/Code/Jar/e/Downloadehcache161jar.htm then extract it and add it to the build path. or download the last version from http://ehcache.org/downloads/catalog ,
It seems also that opentaps ERP uses the hibernate library that uses the ehcache cache provider , but you have to configure it properly based on the version of hibernate and ehcache as mentioned here (https://forum.hibernate.org/viewtopic.php?f=1&t=1003897&view=previous)
or
http://forums.terracotta.org/forums/posts/list/4932.page
or
http://www.bonitasoft.org/forum/viewtopic.php?id=4783

Resources