当我启动 Sonar runner 时,我遇到了这个异常。它不工作,也没有开始。我能做些什么?请帮助我,谢谢。(我正在尝试在我的 Windows 7 64 位操作系统中配置 Sonar 3.2)
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
声纳项目。属性;
# 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
我的文件夹;
WindowsFormsApplication2
WindowsFormsApplication2.sln
sonar-project.properties
sonar-runner.bat