Running jmeter .jmx tests locally using windows command line giving illegal argument exception - windows

Using below command to run the tests on windows cmd - Is there any initialization required in jmeter for doing so.
jmeter -n -t C:/Users/meiyer/Desktop/LOAD TOOLS/jmeter samples/50users10count.jmx
stacktrace -
2016/08/29 15:17:18 INFO - jmeter.util.JMeterUtils: Setting Locale to en_US
2016/08/29 15:17:18 INFO - jmeter.JMeter: Loading user properties from:
C:\Users\meiyer\Documents\apache-jmeter-3.0\apache-jmeter-
3.0\bin\user.properties
2016/08/29 15:17:18 INFO - jmeter.JMeter: Loading system properties from:
C:\Users\meiyer\Documents\apache-jmeter-3.0\apache-jmeter-
3.0\bin\system.properties
2016/08/29 15:17:18 FATAL - jmeter.JMeter: An error occurred:
java.lang.IllegalArgumentException: Unknown arg: TOOLS/jmeter
at org.apache.jmeter.JMeter.initializeProperties(JMeter.java:746)
at org.apache.jmeter.JMeter.start(JMeter.java:385)
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 org.apache.jmeter.NewDriver.main(NewDriver.java:259)

Your issue comes from the space between LOAD and TOOLS.
Use quote around the path:
jmeter -n -t "C:/Users/meiyer/Desktop/LOAD TOOLS/jmeter samples/50users10count.jmx"

Related

Taurus Execution failure via yaml scripts for jmeter jmx scripts behind proxy

I am trying to execute some jmeter jmx scripts using Tarus via yaml scripts named "ParallelExecution.yml".
Yaml Script:
execution:
- executor: jmeter
execution:
- scenario:
script: C:\Users\SampleScripts\WSO2ServiceAPI.jmx
- scenario:
script: C:\Users\SampleScripts\KongServiceAPI.jmx
reporting:
- module: blazemeter
report-name: TaurusPerformanceTest
test: WSO2andKong
project: SampleProject
But, its fetching the following error after I execute the command "bzt ParallelExecution.yml -report".
C:\Users\YmlScripts>bzt ParallelExecution.yml
12:38:28 INFO: Taurus CLI Tool v1.13.8
12:38:28 INFO: Starting with configs: ['ParallelExecution.yml']
12:38:28 INFO: Configuring...
12:38:28 INFO: Artifacts dir: C:\Users\YmlScripts\2019-11-09_12-38-28.188921
12:38:28 INFO: Preparing...
12:38:28 WARNING: Failed to check for updates
12:38:29 INFO: 1 obsolete CookieManagers are found and fixed
12:38:36 WARNING: Failed to detect plugins for C:\Users\SampleScripts\modified_WSO2ServiceAPI.jmx: Command '['C:\\Users\\.bzt\\jmeter-taurus\\5.1.1\\bin\\PluginsManagerCMD.bat', 'install-for-jmx', 'C:\\Users\\SampleScripts\\modified_WSO2ServiceAPI.jmx']' returned non-zero exit status 1.
>>> START OF STDOUT >>>
2019-11-09 12:38:31,632 INFO o.j.r.PluginManagerCMD: Command is: install-for-jmx
2019-11-09 12:38:32,697 INFO o.j.r.JARSourceHTTP: Requesting https://jmeter-plugins.org/repo/?installID=docker-64602d8e8eb9f2a1a3b0804261cdb5e6-nongui
<<< END OF STDOUT <<<
>>> START OF STDERR >>>
ERROR: java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
*** Problem's technical details go below ***
Home directory was detected as: C:\Users\.bzt\jmeter-taurus\5.1.1\lib
Exception in thread "main" java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:100)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:62)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
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 kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115)
Caused by: java.net.UnknownHostException: jmeter-plugins.org
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:499)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:494)
at org.jmeterplugins.repository.JARSourceHTTP.getJSON(JARSourceHTTP.java:152)
at org.jmeterplugins.repository.JARSourceHTTP.getRepositories(JARSourceHTTP.java:276)
at org.jmeterplugins.repository.JARSourceHTTP.getRepo(JARSourceHTTP.java:304)
at org.jmeterplugins.repository.PluginManager.load(PluginManager.java:71)
at org.jmeterplugins.repository.PluginManagerCMD.getPluginsManager(PluginManagerCMD.java:110)
at org.jmeterplugins.repository.PluginManagerCMD.installPluginsForJmx(PluginManagerCMD.java:120)
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:79)
... 7 more
<<< END OF STDERR <<<
12:38:36 INFO: 1 obsolete CookieManagers are found and fixed
12:38:46 WARNING: Failed to detect plugins for C:\Users\SampleScripts\modified_KongServiceAPI.jmx: Command '['C:\\Users\\.bzt\\jmeter-taurus\\5.1.1\\bin\\PluginsManagerCMD.bat', 'install-for-jmx', 'C:\\Users\\SampleScripts\\modified_KongServiceAPI.jmx']' returned non-zero exit status 1.
>>> START OF STDOUT >>>
2019-11-09 12:38:39,605 INFO o.j.r.PluginManagerCMD: Command is: install-for-jmx
2019-11-09 12:38:42,035 INFO o.j.r.JARSourceHTTP: Requesting https://jmeter-plugins.org/repo/?installID=docker-64602d8e8eb9f2a1a3b0804261cdb5e6-nongui
<<< END OF STDOUT <<<
>>> START OF STDERR >>>
ERROR: java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
*** Problem's technical details go below ***
Home directory was detected as: C:\Users\.bzt\jmeter-taurus\5.1.1\lib
Exception in thread "main" java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:100)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:62)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
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 kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115)
Caused by: java.net.UnknownHostException: jmeter-plugins.org
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:499)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:494)
at org.jmeterplugins.repository.JARSourceHTTP.getJSON(JARSourceHTTP.java:152)
at org.jmeterplugins.repository.JARSourceHTTP.getRepositories(JARSourceHTTP.java:276)
at org.jmeterplugins.repository.JARSourceHTTP.getRepo(JARSourceHTTP.java:304)
at org.jmeterplugins.repository.PluginManager.load(PluginManager.java:71)
at org.jmeterplugins.repository.PluginManagerCMD.getPluginsManager(PluginManagerCMD.java:110)
at org.jmeterplugins.repository.PluginManagerCMD.installPluginsForJmx(PluginManagerCMD.java:120)
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:79)
... 7 more
<<< END OF STDERR <<<
12:38:46 WARNING: No BlazeMeter API key provided, will upload anonymously
12:38:46 ERROR: Network Error: Request to https://a.blazemeter.com/api/v4/web/version failed
12:38:46 INFO: Post-processing...
12:38:46 INFO: Test duration: 0:00:00
12:38:46 INFO: Artifacts dir: C:\Users\YmlScripts\2019-11-09_12-38-28.188921
12:38:46 WARNING: Done performing with code: 1
I am not sure why I taurus is not able to execute the script. It runs correctly as jmeter scripts via jmeter.
Any help would be highly appreticated
Looking into this line:
Caused by: java.net.UnknownHostException: jmeter-plugins.org
It appears that the underlying JMeter Plugins Manager is not able to reach JMeter Plugins backend, presumably this is due to the fact you're using corporate proxy for the internet access.
You can configure Taurus to use the proxy of your choice by adding the next lines to your YAML config file:
settings:
proxy:
address: http://localhost:8080
username: johndoe
password: secret
of course replace address, username and password with your own values. Once done - restart the test and Taurus will propagate proxy settings to the downstream JMeter. JMeter Plugins Manager respects JMeter proxy settings so you should be able to execute the test normally.
Just in case check out Plugins Manager Network Configuration page.

How do I fix JMeterPluginsCMD "Missing plugin type specification" error

I'm trying to use the JMeterPluginsCMD on Windows to generate load test result graphs after a JMeter run. I installed the plugin manually because I can't use the JMeter Plugins Manager. (I don't have the network information I need to configure it). When I run a simple command .\JMeterPluginsCMD.bat, I get an error message. What can I do about this error message?
Here's the error message ERROR: java.lang.IllegalArgumentException: Missing plugin type specification
Here's the full error output:
~\Desktop\apache-jmeter-5.1.1\bin> .\JMeterPluginsCMD.bat
2019-08-12 12:10:29,564 WARN o.a.j.u.JMeterUtils: Exception 'null' occurred when fetching String property:'sampleresult.default.encoding', defaulting to: ISO-8859-1
2019-08-12 12:10:29,571 WARN o.a.j.u.JMeterUtils: Exception 'null' occurred when fetching String property:'jmeterPlugin.prefixPlugins'
2019-08-12 12:10:29,572 INFO k.a.j.PluginsCMDWorker: Using JMeterPluginsCMD v. N/A
2019-08-12 12:10:29,574 INFO o.a.j.u.JMeterUtils: Setting Locale to en_US
2019-08-12 12:10:29,578 INFO k.a.j.JMeterPluginsUtils: Loading user properties from: C:\Path\apache-jmeter-5.1.1\bin\user.properties
2019-08-12 12:10:29,582 INFO k.a.j.JMeterPluginsUtils: Loading system properties from: C:\Path\apache-jmeter-5.1.1\bin\system.properties
ERROR: java.lang.IllegalArgumentException: Missing plugin type specification
*** Problem's technical details go below ***
Home directory was detected as: C:\Path\apache-jmeter-5.1.1\lib
Exception in thread "main" java.lang.IllegalArgumentException: Missing plugin type specification
at kg.apc.jmeter.PluginsCMDWorker.checkParams(PluginsCMDWorker.java:78)
at kg.apc.jmeter.PluginsCMDWorker.doJob(PluginsCMDWorker.java:104)
at kg.apc.cmdtools.ReporterTool.processParams(ReporterTool.java:255)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:62)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
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 kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115)
~\Desktop\apache-jmeter-5.1.1\bin>
You are missing plugin-type parameter, example:
JMeterPluginsCMD.bat --generate-png test.png --input-jtl results.jtl --plugin-type ResponseTimesOverTime --width 800 --height 600
Your plugin jar should be available in lib/ext folder
Make note that you need to install corresponding plugins set to have Extras plugins available in CMD.

Debugging Sonar Qube plugin

Following the guide at http://docs.sonarqube.org/display/DEV/Debugging, I have encounter an issue where the sonar-runner appears to be looking in the wrong place for the sonar-project.properties file.
This happens when I try to debug with Intellij.
Can anyone help?
Thanks
Matt
I get the following error:
SONAR_RUNNER_OPTS=-Xdebug -Xnoagent -Duser.dir=c:\dev\eci -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
INFO: Error stacktraces are turned on.
ERROR: homekey=runner.home
ERROR: homrelativePathFromHom=conf/sonar-runner.properties
ERROR: settingsKey=runner.settings
INFO: Runner configuration file: C:\Sonar\sonar-runner-2.4\conf\sonar- runner.properties
ERROR: homekey=project.home
ERROR: homrelativePathFromHom=sonar-project.properties
ERROR: settingsKey=project.settings
INFO: Project configuration file: NONE
INFO: Default locale: "en_AU", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Work directory: c:\dev\eci\.\.sonar
INFO: SonarQube Server 5.1.1
17:30:39.333 INFO - Load global repositories
17:30:39.340 DEBUG - Download: http://localhost:9000/batch/global (no proxy)
17:30:39.490 INFO - Load global repositories (done) | time=159ms
17:30:39.492 INFO - Server id: 20150731104939
17:30:39.493 INFO - User cache: C:\Users\matthewo\.sonar\cache
17:30:39.499 INFO - Install plugins
17:30:39.499 DEBUG - Download index of plugins
17:30:39.499 DEBUG - Download: http://localhost:9000/deploy/plugins/index.txt (no proxy)
17:30:39.585 DEBUG - Loaded 2138 properties from l10n bundles
17:30:39.585 INFO - Install JDBC driver
17:30:39.585 DEBUG - Download index of jdbc-driver
17:30:39.585 DEBUG - Download: http://localhost:9000/deploy/jdbc-driver.txt (no proxy)
17:30:39.592 INFO - Create JDBC datasource for jdbc:jtds:sqlserver://localhost:1433/Sonar;instance=MSSQL2012;SelectMethod=Curso r
17:31:03.765 DEBUG - Testing JDBC connection
17:31:04.351 DEBUG - Download: http://localhost:9000/api/server (no proxy)
17:31:04.368 INFO - Initializing Hibernate
17:31:04.370 DEBUG - hibernate.generate_statistics: false
17:31:04.370 DEBUG - hibernate.dialect: org.sonar.core.persistence.dialect.MsSql$MsSqlDialect
17:31:04.370 DEBUG - hibernate.connection.provider_class: org.sonar.jpa.session.CustomHibernateConnectionProvider
INFO: ---------------------------------------------------------------------- --
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.253s
Final Memory: 66M/340M
INFO: ------------------------------------------------------------------------
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.IllegalStateException: You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources
at org.sonar.batch.scan.ProjectReactorBuilder.checkMandatoryProperties(ProjectReact orBuilder.java:315)
at org.sonar.batch.scan.ProjectReactorBuilder.defineRootProject(ProjectReactorBuild er.java:157)
at org.sonar.batch.scan.ProjectReactorBuilder.execute(ProjectReactorBuilder.java:116)
at org.sonar.batch.scan.ProjectScanContainer.projectBootstrap(ProjectScanContainer.java:110)
at org.sonar.batch.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:86)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:90)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
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 org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Is there any way to set the working directory, so sonar-runner finds the project properties in the correct location - where I am executing the command from?
Thanks
Matt
Why are you trying to update the user directory? Try to remove -Duser.dir=c:\dev\eci from SONAR_RUNNER_OPTS

Sonar, Gendarme plugin issue

I'm new in sonar.
I have problems when I use gendarme rules, but without those rules, it works
fine.
This is the error in debug mode (sonar-runner -X):
14:19:22.637 DEBUG - No assembly specified: will look into 'csproj' files to
find which should be analyzed.
14:19:22.638 DEBUG - Fallback to directory
C:\Users\soaint002\Documents\Visual Studio
2010\Projects\WindowsFormAlan\.\WindowsFormAlan\bin\Debug for project
WindowsFormAlan
14:19:22.638 DEBUG - - Gendarme program : C:\Program Files
(x86)\gendarme-2.10-bin\gendarme.exe
14:19:22.639 DEBUG - - Config file :
C:\Users\soaint002\Documents\Visual Studio
2010\Projects\WindowsFormAlan\WindowsFormAlan\.sonar\sonar.Gendarme
14:19:22.639 DEBUG - - Report file :
C:\Users\soaint002\Documents\Visual Studio
2010\Projects\WindowsFormAlan\WindowsFormAlan\.sonar\gendarme-report.xml
14:19:22.639 DEBUG - - Quiet output
14:19:22.639 DEBUG - - Confidence : normal+
14:19:22.639 DEBUG - - Severity : all
14:19:22.640 DEBUG - - Scanned assemblies :
14:19:22.640 DEBUG - o C:\Users\soaint002\Documents\Visual Studio
2010\Projects\WindowsFormAlan\.\WindowsFormAlan\bin\Debug\WindowsFormAlan.exe
14:19:22.640 INFO - Executing command: C:\Program Files
(x86)\gendarme-2.10-bin\gendarme.exe --config
C:\Users\soaint002\Documents\Visual Studio
2010\Projects\WindowsFormAlan\WindowsFormAlan\.sonar\sonar.Gendarme -
-xml C:\Users\soaint002\Documents\Visual Studio
2010\Projects\WindowsFormAlan\WindowsFormAlan\.sonar\gendarme-report.xml
--quiet --confidence normal+ --severity all
C:\Users\soaint002\Documents\Visual Studio 2010\Pr
ojects\WindowsFormAlan\.\WindowsFormAlan\bin\Debug\WindowsFormAlan.exe
14:19:22.770 INFO -
14:19:22.771 INFO - An uncaught exception occured. Please fill a bug report
at https://bugzilla.novell.com/
14:19:22.772 INFO - Stack trace: System.Xml.XmlException: The value 'null'
could not be converted into the property MaximumDepth type for rule
AvoidDeepInheritanceTreeRule. Review your configuration file.
14:19:22.772 INFO - at Gendarme.Settings.SetCustomParameters(XmlNode
nodes)
14:19:22.772 INFO - at Gendarme.Settings.Load()
14:19:22.772 INFO - at Gendarme.ConsoleRunner.Execute(String[] args)
14:19:22.779 DEBUG - Release semaphore on project :
org.sonar.api.resources.Project#3da72e31[id=1092,key=SAS:WindowsFormSAlan,qualifier=TRK],
with key batch-SAS:WindowsFormSAlan
14:19:22.838 DEBUG - To prevent a memory leak, the JDBC Driver
[com.mysql.jdbc.Driver] has been forcibly deregistered
INFO:
------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO:
------------------------------------------------------------------------
Total time: 6.848s
Final Memory: 15M/341M
INFO:
------------------------------------------------------------------------
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: org.sonar.api.utils.SonarException: Gendarme execution failed.
at
org.sonar.plugins.csharp.gendarme.GendarmeSensor.analyse(GendarmeSensor.java:175)
at
org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79)
at
org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at
org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:131)
at
org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:178)
at
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at
org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at
org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:199)
at
org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:194)
at
org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:192)
at
org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:187)
at
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at
org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:56)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:44)
at
org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at
org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at
org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:175)
at
org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:163)
at
org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at
org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at
org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
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
org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: org.sonar.dotnet.tools.gendarme.GendarmeException: Gendarme
analysis failed: execution was interrupted by a non-handled exception. This
is likely a bug inside Gendarme and should be reported on Novell's b
ugzilla (http://bugzilla.novell.com) or on the mailing-list.
at
org.sonar.dotnet.tools.gendarme.GendarmeRunner.execute(GendarmeRunner.java:124)
at
org.sonar.plugins.csharp.gendarme.GendarmeSensor.launchGendarme(GendarmeSensor.java:221)
at
org.sonar.plugins.csharp.gendarme.GendarmeSensor.analyse(GendarmeSensor.java:173)
sonar-project.properties:
# Required metadata
sonar.projectKey=SAS:WindowsFormSAlan
sonar.projectName=WindowsFormSAlan
sonar.projectVersion=1.2
# Comma-separated paths to directories with sources (required)
sonar.sources=.
# Language
sonar.language=cs
sonar.gallio.mode=skip
# Encoding of the source files
sonar.sourceEncoding=UTF-8
I have the following list of plugins installed. Do I need to install other plugins too?
sonar-csharp-plugin-3.1
sonar-dotnet-gendarme-plugin-2.0
sonar-dotnet-ndeps-plugin-2.0
sonar-dotnet-plugin-2.0
All dotnet plugins version must have they same version.
If not the will be not compatible.

Sonar-Runner not starting (c#)

When I start Sonar runner, I am getting this exception. It is not working and not starting. What can I do? Please help me ,thank you. (I am trying to configure Sonar 3.2 in my Windows 7 64 bit operating system)
C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2.0\bin>sonar-runner
ôSONAR_RUNNER_HOME = C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2.0\
bin\..ö
ôPROJECT_HOME = C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2.0\bin\.
.ö
Runner configuration file: C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runne
r-2.0\bin\..\conf\sonar-runner.properties
Project configuration file: NONE
Runner version: 2.0
Java version: 1.7.0_07, vendor: Oracle Corporation
OS name: "Windows 7", version: "6.1", arch: "amd64"
Default locale: "en_US", source code encoding: "windows-1254" (analysis is platf
orm dependent)
Server: http://localhost:9000
Work directory: C:\Users\ea\Desktop\sonar-runner-2.0\sonarrunner 2.0\.sonar
13:59:34.477 [main] WARN o.s.r.i.batch.SonarProjectBuilder - /!\ The 'sources'
property is deprecated and is replaced by 'sonar.sources'. Don't forget to updat
e your files.
13:59:36.207 WARN .c.p.DefaultDatabase - H2 database should be used for evaluat
ion purpose only
13:59:36.207 INFO o.s.c.p.Database - Create JDBC datasource to url jdbc:h2:
tcp://localhost/sonar
13:59:37.390 INFO actDatabaseConnector - Initializing Hibernate
13:59:38.851 WARN StudioProjectBuilder - The specified '.sln' path does not poi
nt to an existing file: C:\Users\ea\Desktop\sonar-runner-2.0\sonar-runner-2
.0\bin\..\sinav_bildir
Total time: 7.632s
Final Memory: 7M/171M
Exception in thread "main" org.sonar.runner.RunnerException: org.picocontainer.P
icoLifecycleException: PicoLifecycleException: method 'public final void org.son
ar.api.batch.bootstrap.ProjectBuilder.start()', instance 'org.sonar.plugins.csha
rp.core.VisualStudioProjectBuilder#7986f7af, java.lang.RuntimeException: wrapper
at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
at org.sonar.runner.Runner.execute(Runner.java:151)
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: met
hod 'public final void org.sonar.api.batch.bootstrap.ProjectBuilder.start()', in
stance 'org.sonar.plugins.csharp.core.VisualStudioProjectBuilder#7986f7af, java.
lang.RuntimeException: wrapper
at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFa
iled(NullComponentMonitor.java:77)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr
owReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(
ReflectionLifecycleStrategy.java:115)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(Reflect
ionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter
.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.j
ava:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Store
d.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(Defaul
tPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoConta
iner.java:1002)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.jav
a:760)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:70)
at org.sonar.batch.bootstrap.Module.start(Module.java:82)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:121)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.Batch.execute(Batch.java:104)
at org.sonar.runner.internal.batch.Launcher.executeBatch(Launcher.java:6
9)
at org.sonar.runner.internal.batch.Launcher.execute(Launcher.java:61)
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 org.sonar.runner.Runner.delegateExecution(Runner.java:285)
... 3 more
Caused by: java.lang.RuntimeException: wrapper
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr
owReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
... 24 more
Caused by: org.sonar.api.utils.SonarException: No valid '.sln' file could be fou
nd. Please read the previous log messages to know more.
at org.sonar.plugins.csharp.core.VisualStudioProjectBuilder.createVisual
StudioSolution(VisualStudioProjectBuilder.java:169)
at org.sonar.plugins.csharp.core.VisualStudioProjectBuilder.build(Visual
StudioProjectBuilder.java:82)
at org.sonar.api.batch.bootstrap.ProjectBuilder.start(ProjectBuilder.jav
a:47)
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 org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(
ReflectionLifecycleStrategy.java:110)
... 23 more
Sonar-Project.Properties;
# Project identification
sonar.projectKey=DMG:WindowsFormsApplication2
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectName=my c #
sonar.projectVersion=1.0
# Info required for Sonar
sources=.
sonar.language=cs
#Core C# Settings
sonar.dotnet.visualstudio.solution.file=C:/Users/ea/Desktop/sonar-runner-2.0/sonar-runner- 2.0/bin/WindowsFormsApplication2.sln
#sonar.silverlight.4.mscorlib.location=C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v4.0sonar.dotnet.excludeGeneratedCode=true
sonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319
sonar.dotnet.version=4.0
#Gendarme
sonar.gendarme.assemblies=\build\\DmgTech*.*
sonar.gendarme.mode=skip
# Gallio
sonar.gallio.mode=skip
# FXCop
sonar.fxcop.installDirectory=C:/Program Files/Microsoft FxCop 1.36
sonar.fxcop.assemblyDependencyDirectories=/bin/Debug
#StyleCop
sonar.stylecop.mode=skip
My folder;
WindowsFormsApplication2
WindowsFormsApplication2.sln
sonar-project.properties
sonar-runner.bat
The message is quite straightforward:
No valid '.sln' file could be found. Please read the previous log messages to know more.
This is because "sonar.dotnet.visualstudio.solution.file" property must point an SLN file, not to a folder like what you specified.
What's more, there are too many useless properties in your "sonar-project.properties" file:
No need to specify the following properties as you set it to their default values:
sonar.host.url
sonar.jdbc.username
sonar.jdbc.password
You specified "sonar.jdbc.username" and "sonar.jdbc.password" twice...

Resources