sonar-runner.bat无法在org.sonar.runner.impl.BatchLauncher $ 1.delegateExecution(BatchLauncher .java:91)执行Sonar

时间:2014-05-28 21:49:09

标签: sonarqube

我得到了最新的sonar-runner-dist-2.4和sonarqube-4.3。服务器启动正常,我可以看到localhost但是当我尝试运行sonar-runner.bat -X时,我看到下面的错误。我查看了版本,日志,但找不到根本原因。任何帮助将不胜感激。

enter code here
MyProject>sonar-runner.bat -X
C:\sonar\sonar-runner-dist-2.4
SonarQube Runner 2.4
Java 1.6.0 IBM Corporation (32-bit)
Windows Vista 6.1 build 7601 Service Pack 1 x86
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: C:\sonar\sonar-runner-dist-2.4\conf\sonar-runne
r.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is
platform dependent)
INFO: Work directory: C:\cww\application\CWW_FSET_R0\online\aeEJB\.\.sonar
INFO: SonarQube Server 4.3
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1.191s
Final Memory: 2M/5M
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(AccessController.java:202
)
        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.TypeNotPresentException: Type javax.annotation.CheckForNull
not present
        at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.j
ava:38)
        at com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(Annotatio
nHelper.java:50)
        at com.ibm.oti.reflect.Method.getDeclaredAnnotations(Method.java:31)
        at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:687)
        at java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.ja
va:186)
        at com.ibm.oti.reflect.Method.getAnnotation(Method.java:20)
        at java.lang.reflect.Method.getAnnotation(Method.java:677)
        at org.picocontainer.injectors.AdaptingInjection.injectionAnnotated(Adap
tingInjection.java:230)
        at org.picocontainer.injectors.AdaptingInjection.access$000(AdaptingInje
ction.java:46)
        at org.picocontainer.injectors.AdaptingInjection$1.run(AdaptingInjection
.java:203)
        at java.security.AccessController.doPrivileged(AccessController.java:202
)
        at org.picocontainer.injectors.AdaptingInjection.injectionMethodAnnotate
d(AdaptingInjection.java:200)
        at org.picocontainer.injectors.AdaptingInjection.methodAnnotatedInjectio
nAdapter(AdaptingInjection.java:171)
        at org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(
AdaptingInjection.java:70)
        at org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAd
apter(AbstractBehaviorFactory.java:44)
        at org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptIn
Caching.java:45)
        at org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContai
ner.java:535)
        at org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContaine
r.java:83)
        at org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addC
omponent(DefaultPicoContainer.java:1148)
        at org.sonar.api.platform.ComponentContainer.addComponent(ComponentConta
iner.java:175)
        at org.sonar.api.platform.ComponentContainer.addSingleton(ComponentConta
iner.java:163)
        at org.sonar.api.platform.ComponentContainer.add(ComponentContainer.java
:149)
        at org.sonar.batch.bootstrap.BootstrapContainer.addBootstrapComponents(B
ootstrapContainer.java:83)
        at org.sonar.batch.bootstrap.BootstrapContainer.doBeforeStart(BootstrapC
ontainer.java:77)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:90)
        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(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher
.java:87)
        ... 9 more
Caused by: java.lang.ClassNotFoundException: javax.annotation.CheckForNull
        at java.lang.Class.forName(Class.java:169)
        at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.j
ava:33)
        ... 42 more

这是我的属性文件:

# required metadata
sonar.projectKey=my:MyProject
sonar.projectName=MyProject
sonar.projectVersion=1.0

# optional description
sonar.projectDescription=Any description

# path to source directories (required)
sonar.sources=src

# path to test source directories (optional)
#sonar.tests=testDir1,testDir2

# path to project binaries (optional), for example directory of Java bytecode
sonar.binaries=bin

# The value of the property must be the key of the language.
sonar.language=java

# Additional parameters
sonar.my.property=value

1 个答案:

答案 0 :(得分:1)

此问题似乎与IBM Java虚拟机的使用有关:http://www-01.ibm.com/support/docview.wss?uid=swg1IZ76354。通过使用Oracle,这应该可以解决您的问题。