i've got an error when i performan analyse on my project (java 1.8) with jenkins with SonarQube scanner.
When it try to read the jacoco.exec report, the job fail and the following error is set :
ERROR: Error during SonarQube Scanner execution
java.lang.UnsupportedOperationException: Metric 'overall_lines_to_cover' should not be computed by a Sensor
at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:240)
at org.sonar.scanner.index.DefaultIndex.addMeasure(DefaultIndex.java:231)
at org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:131)
at org.sonar.plugins.jacoco.JaCoCoOverallSensor$OverallAnalyzer.saveMeasures(JaCoCoOverallSensor.java:101)
at org.sonar.plugins.jacoco.AbstractAnalyzer.readExecutionData(AbstractAnalyzer.java:150)
at org.sonar.plugins.jacoco.AbstractAnalyzer.analyse(AbstractAnalyzer.java:114)
at org.sonar.plugins.jacoco.JaCoCoOverallSensor.analyse(JaCoCoOverallSensor.java:80)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:240)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
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:497)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
I use SonarQube scanner 2.8 with the Sonar 6.2 release and the 3.10 java plugin.
The problem seems to have appeared since i upgraded the Sonar server from 5.3 to 6.2...
Can anyone help me with this issue ?
My apologies for my approximate English.
We've seen the same problem "Metric 'overall_lines_to_cover' should not be computed by a Sensor" here.
Version of the Java plugin was 3.14.
After update to 4.4.0.8066 the issue disappeared.
Thanks for pointing out #G.Ann.
Related
I have updated Sonar to version 7.9.2 and now while trying to give build through Jenkins getting below error.
BUILD FAILED
org.sonar.runner.impl.RunnerException: Unable to execute SonarQube
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:100)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83)
at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:249)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:187)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:182)
at org.sonarsource.scanner.ant.SonarQubeTask.launchAnalysis(SonarQubeTask.java:66)
at org.sonarsource.scanner.ant.SonarQubeTask.execute(SonarQubeTask.java:55)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:93)
at org.sonar.runner.impl.Jars.download(Jars.java:70)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91)
... 25 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:87)
... 28 more
Not able to understand which libraries are not getting downloaded.
Other Details
Apache Ant version 1.7.1
SonarQube Ant Task version: 2.4
sonarqube-7.9.2
Also want to update that the default java version is 1.7.80 which is used to compile the source code whereas for running sonarqube java 11 is being used.
Please suggest.
Let me know in case any additional details are required.
I have installed sonarqube server on the windows machine. It is working for the .net/php projects successfully with sonar-scanner(sonar-scanner on same machine).
But for the iOS project, I am using the free plugin for objective C. For this I am using the MAC machine and trying to run sonar-scanner from mac, I also configured the server host url in sonar-runner.properties.
The version details are as below:
Searver: sonarqube-5.4
Objective-c version: sonar-objective-c-plugin-0.4.0
xcode: 6 and latest xctool
OCLint latest version
I am getting following error.
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to register extension org.sonar.plugins.objectivec.core.ObjectiveCSourceImporter
at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:241)
at org.sonar.batch.bootstrap.ExtensionInstaller.doInstall(ExtensionInstaller.java:68)
at org.sonar.batch.bootstrap.ExtensionInstaller.install(ExtensionInstaller.java:49)
at org.sonar.batch.scan.ModuleScanContainer.addExtensions(ModuleScanContainer.java:172)
at org.sonar.batch.scan.ModuleScanContainer.doBeforeStart(ModuleScanContainer.java:92)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:133)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:264)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:259)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:249)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.batch.scan.ProjectScanContainer.startComponents(ProjectScanContainer.java:127)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
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)
at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:118)
at org.sonarsource.scanner.cli.Main.execute(Main.java:80)
at org.sonarsource.scanner.cli.Main.main(Main.java:66)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/resources/ProjectFileSystem
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
at java.lang.Class.getDeclaredMethods(Class.java:1967)
at org.picocontainer.injectors.AdaptingInjection$1.run(AdaptingInjection.java:203)
at java.security.AccessController.doPrivileged(Native Method)
at org.picocontainer.injectors.AdaptingInjection.injectionMethodAnnotated(AdaptingInjection.java:200)
at org.picocontainer.injectors.AdaptingInjection.methodAnnotatedInjectionAdapter(AdaptingInjection.java:171)
at org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(AdaptingInjection.java:70)
at org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAdapter(AbstractBehaviorFactory.java:44)
at org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptInCaching.java:45)
at org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:536)
at org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:84)
at org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1149)
at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:239)
... 31 more
Caused by: java.lang.ClassNotFoundException: org.sonar.api.resources.ProjectFileSystem
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 45 more
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
+ returnValue=1
+ set +x
sonar-objective-c-plugin 0.4.0 is not compatible with SonarQube 5.3+.
There is a ticket at plugin tracking issue system: java.lang.NoClassDefFoundError: org/sonar/api/resources/ProjectFileSystem
Authors prepared a snapshot which should solve this problem: https://drive.google.com/file/d/0B8TMhTccVIJ-d1lvN3dxb1M4a3c/view
I have to configure Jenkins with Coverity.Below versions I am using:
Jenkins: 1.509.2
Coverity: 1.5.0
However, I am not able to configure. It is throwing me below error:
Caused by: java.lang.NullPointerException
at jenkins.plugins.coverity.CheckConfig.checkStream(CheckConfig.java:197)
at jenkins.plugins.coverity.CheckConfig.check(CheckConfig.java:97)
at jenkins.plugins.coverity.CoverityPublisher$DescriptorImpl.doCheckConfig(CoverityPublisher.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
... 63 more
Appreciate if anyone can share me the steps or any reference document/links which can detail steps for configuration.
Thanks Everyone!!!
Aditi
I've the same problem. It is caused by incorrect coverity analysis path setting. Check your settings on every build jobs.
I have a simple HelloWorld type Worklight application, with no adapters and just a 'common' environment. And I am trying to build the application through the build-app target supplied in the worklight-ant.jar file. This target fails with the following stack trace. Any ideas on why this might be happening?
StackTrace from command line
Buildfile: /Users/jai/Dev/Workspaces/worklight-2014/EFMobile/build.xml
init:
[echo] Loading ANT Tool
build-app:
[echo] Building app at /Users/jai/Dev/Workspaces/worklight-2014/EFMobile/apps/HelloEF
[echo] Worklight Ant Task version 6.1.0.00.20131123-2150
BUILD FAILED
/Users/jai/Dev/Workspaces/worklight-2014/EFMobile/build.xml:26: java.lang.ExceptionInInitializerError
at com.worklight.builder.environment.EnvironmentBuilderFactory.get(EnvironmentBuilderFactory.java:70)
at com.worklight.builder.ApplicationBuilder.buildEnvironment(ApplicationBuilder.java:268)
at com.worklight.builder.ApplicationBuilder.buildEnvironments(ApplicationBuilder.java:230)
at com.worklight.builder.ApplicationBuilder.build(ApplicationBuilder.java:119)
at com.worklight.ant.builders.ApplicationBuilderTask.execute(ApplicationBuilderTask.java:112)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.RuntimeException: Failed creating resourcesRootFolder
at com.worklight.builder.environment.EnvironmentBuilder.initResourceFolder(EnvironmentBuilder.java:199)
at com.worklight.builder.environment.EnvironmentBuilder.<clinit>(EnvironmentBuilder.java:192)
... 22 more
Caused by: java.io.IOException: Resource not found: jslibexpanded.zip.MD5
at com.worklight.builder.util.BuilderUtils.unzipResourceIfRequired(BuilderUtils.java:723)
at com.worklight.builder.util.BuilderUtils.initResourcesFolder(BuilderUtils.java:704)
at com.worklight.builder.environment.EnvironmentBuilder.initResourceFolder(EnvironmentBuilder.java:197)
... 23 more
Total time: 1 second
may be your ant is older than the prerequisite version ?
http://publib.boulder.ibm.com/infocenter/prodguid/v1r0/clarity-reports/report/html/softwareReqsForProduct?deliverableId=66C745D01E8711E28ACF6F870925FE36&osPlatform=Linux#!
regards
using Eclipse to try and build a maven project with Eclipse. Anyway when I try to run mvn clean install I get the following error
Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1
Its calling a MojoExecutionException.
Anyway I am getting the code from a subversion repository which works for others so its not the pom file. I done some googling and it mentions it could be the JBoss version I have running which could be causing the issue. I am using JBoss6.1.0. Also using Maven 3.0.4
Anyone have any ideas? If you need more info just let me know. Thanks.
EDIT: Full stack trace
[ERROR] Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error while running wsconsume
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.Exception: Process terminated with code 1
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumerOutOfProcess(WSContractDelegate.java:133)
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumer(WSContractDelegate.java:99)
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:149)
... 21 more
Well figured it out anyway. Turns out it was a windows limitation with file names. The file path was too long. As such once I moved it to a folder just below root, eg. C:/folder_here then it worked. Also switched to JDK 1.7 because another problem with windows means that if you use 1.6 you need to download another couple of jars. Anyway hope this helps someone else out.