sonar XML plugin installation failure in jenkins - sonarqube

I am getting the following error when I manually try to install sonar-xml-plugin-1.4.1.hpi plugin in jenkins:
Error:
Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1383)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1161)
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:110)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Illegal dependency specifier META-INF/lib/xml-squid-1.4.1.jar META-INF/lib/jaxen-1.1.4.jar META-INF/lib/xalan-2.7.2.jar META-INF/lib/sslr-core-1.20.jar META-INF/lib/sslr-squid-bridge-2.6.jar META-INF/lib/xercesImpl-2.8.1.jar META-INF/lib/serializer-2.7.2.jar META-INF/lib/sslr-xpath-1.20.jar
at hudson.PluginWrapper$Dependency.<init>(PluginWrapper.java:218)
at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:231)
at hudson.PluginManager.dynamicLoad(PluginManager.java:483)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1379)
... 5 more
Do i need to install any dependencies first?? or is it something else that I am missing?

Where did you find this file? The SonarQube XML plugin is a plugin for SonarQube and should be installed on a SonarQube server, not on a Jenkins server.

Related

Jmeter plugins manager failed to install plugin

JMeter (version 4.0) plugins manager (jmeter-plugins-manager-1.0.2) failed to install plugins.
Following error is thrown.
2018-05-29 12:39:00,977 ERROR o.j.r.PluginManager: Failed to download cmdrunner>=2.2
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.createFileExclusively(Native Method) ~[?:1.8.0_161]
at java.io.File.createTempFile(Unknown Source) ~[?:1.8.0_161]
at java.io.File.createTempFile(Unknown Source) ~[?:1.8.0_161]
at org.jmeterplugins.repository.JARSourceHTTP.getJAR(JARSourceHTTP.java:395) ~[jmeter-plugins-manager-1.0.2.jar:?]
at org.jmeterplugins.repository.PluginManager.applyChanges(PluginManager.java:167) [jmeter-plugins-manager-1.0.2.jar:?]
at org.jmeterplugins.repository.PluginManagerDialog$4.run(PluginManagerDialog.java:226) [jmeter-plugins-manager-1.0.2.jar:?]
quick fix:
download jar from https://mvnrepository.com/artifact/kg.apc/cmdrunner/2.2.1
and place it int jmeter/library folder

Unable to execute Maven project using Jenkins

I have created a Maven project in Jenkins. When I click on "build now", I am getting an error as below but I am able to run this project from the command prompt using maven package.
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f
C:\Users\Administrator\.jenkins\workspace\maven\pom.xml mvn package
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 Sources
channel stopped
Finished: FAILURE

Failed to start application WAS 8.5.5.10

My application failed to start with the below error on WebSphere Application Server 8.5.5.10 which was working on 8.5.5.5
[1/2/17 17:54:20:842 IST] 0000006f ecs W com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl scanJAR unable to open input stream for resource org/reflections/scanners/MemberUsageScanner$1.class in archive WEB-INF/lib/reflections-0.9.10.jar
java.lang.RuntimeException
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
The application failes to start after deployment
The application failes to start when JVM starts
The same application is getting started manually from console.
When i put reflections-0.9.10.jar in shared library i am getting Failed to load webapp
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: null
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:177)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:901)
... 73 more
Caused by: java.lang.RuntimeException
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
5.The application started when i move all the third party jars to shared libraries.
upgrade to 8.5.5.11, issue fixed in latest fixpack
http://www-01.ibm.com/support/docview.wss?uid=swg1PI60902
If you find any other solution in 8.5.5.10, please do let me know
The SystemOut.log file for the application server will indicate which version of the Java (JVM) is in-use. Verify whether the version of the class files in reflections-0.9.10.jar is greater than the version of the server JVM. The error you posted will occur whenever this condition is true.

SonarQube 5.1.2 fails to recognize relative path for sonar.sources

Below is my directory structure for SonarQube analysis.
I was using SonarQube 5.0 with C++ Community plugin version 0.9.4 and sonar-runner 2.4 with sonar.sources=../CheckoutDir1 mentioned in sonar-project.properties file. This was working like a charm.
Then I upgraded to SonarQube 5.1.2, keeping the C++ Community plugin, sonar-runner and sonar-project.properties file intact. Now sonar-runner fails with the following error:
14:18:17.531 INFO - Base dir: D:\CheckoutDir2
14:18:17.531 INFO - Working dir: D:\CheckoutDir2\.sonar
14:18:17.531 INFO - Source paths: ../CheckoutDir1
.
.
.
.
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.NullPointerException
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
at org.sonar.api.batch.fs.internal.DefaultInputFile.path(DefaultInputFile.java:72)
at org.sonar.api.batch.fs.internal.DefaultInputFile.file(DefaultInputFile.java:64)
at org.sonar.api.batch.fs.internal.PathPattern$RelativePathPattern.match(PathPattern.java:101)
at org.sonar.batch.scan.filesystem.LanguageDetection.isCandidateForLanguage(LanguageDetection.java:124)
at org.sonar.batch.scan.filesystem.LanguageDetection.language(LanguageDetection.java:97)
at org.sonar.batch.scan.filesystem.InputFileBuilder.completeAndComputeMetadata(InputFileBuilder.java:100)
at org.sonar.batch.scan.filesystem.FileIndexer$1.call(FileIndexer.java:157)
at org.sonar.batch.scan.filesystem.FileIndexer$1.call(FileIndexer.java:154)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Strangely, the debug parameters -X, -e, -Dsonar.verbose=true in sonar-runner revealed no other information except java.lang.NullPointerException.
If I mention the absolute path for sonar.sources, the SonarQube analysis works fine.
Please suggest how to resolve this problem? Also, SonarQube 5.1.2 should clearly print the debug logs about not being able to locate the sonar.sources from a relative path.
As I can see in the log that sonar is considering CheckoutDir2 as your base dir,
Which is not correct,
you should set sonar.projectBaseDir=<AbsolutePath>/ProjectName/CheckoutDir1 and then sonar.sources=.
so now even if sonar-project.properties file is not in the same directory as the source code, it will still work as if it was.

Jenkins-Maven Project - Could not initialize class org.apache.tools.ant.Location

I am getting an error as it is not able to initialize the ANT location although it's a Maven project.
For Jenkins job.
The output can be found below:
[htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at
PROJECT level
C:\Jenkins\workspace\Capybaras-STAGE-Regression-OnDemand\target\dashboard-reports
to
/home/scmbuildmaster/.jenkins/jobs/Capybaras-STAGE-Regression-OnDemand/htmlreports/Dashboard_Full_Report_with_Screenshot FATAL: HTML Publisher failure java.io.IOException:
java.util.concurrent.ExecutionException:
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.tools.ant.Location at
hudson.FilePath.copyRecursiveTo(FilePath.java:2213) at
hudson.FilePath.copyRecursiveTo(FilePath.java:2101) at
hudson.FilePath.copyRecursiveTo(FilePath.java:2084) at
htmlpublisher.HtmlPublisher.perform(HtmlPublisher.java:213) 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:1784) 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:
java.util.concurrent.ExecutionException:
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.tools.ant.Location at
hudson.remoting.Channel$3.adapt(Channel.java:784) at
hudson.remoting.Channel$3.adapt(Channel.java:779) at
hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at
hudson.FilePath.copyRecursiveTo(FilePath.java:2211) ... 12 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.apache.tools.ant.Location at
org.apache.tools.ant.ProjectComponent.(ProjectComponent.java:43)
at org.apache.tools.ant.types.DataType.(DataType.java:40) at
org.apache.tools.ant.types.AbstractFileSet.(AbstractFileSet.java:82)
at org.apache.tools.ant.types.FileSet.(FileSet.java:36) at
hudson.Util.createFileSet(Util.java:1077) at
hudson.util.DirScanner$Glob.scan(DirScanner.java:124) at
hudson.FilePath.writeToTar(FilePath.java:2249) at
hudson.FilePath.access$2100(FilePath.java:191) at
hudson.FilePath$45.invoke(FilePath.java:2190) at
hudson.FilePath$45.invoke(FilePath.java:2186) at
hudson.FilePath$FileCallableWrapper.call(FilePath.java:2665) at
hudson.remoting.UserRequest.perform(UserRequest.java:121) at
hudson.remoting.UserRequest.perform(UserRequest.java:49) at
hudson.remoting.Request$2.run(Request.java:324) 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:63) at
java.lang.Thread.run(Unknown Source) at ......remote call to
QA-Automation-Node(Native Method) at
hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at
hudson.remoting.Channel$3.adapt(Channel.java:782) ... 15 more Build
step 'Publish HTML reports' changed build result to FAILURE
Try the following, in the following order:
Try to upgrade the JRE version that you use to run the slave process
If you are using a JRE to run your slave, use a JDK If you are using
an OpenJDK, try with an Oracle JDK

Resources