SonarQube 4.3 - 分析不同的机器 - IllegalArgumentException - 未找到依赖关系

时间:2014-05-20 06:16:03

标签: c# sonarqube illegalargumentexception sonar-runner

我目前更新到SonarQube 4.3和sonar-runner 2.4来分析我的构建环境中的项目(2台服务器 - 一台托管声纳 - 一台运行声纳 - 跑步者。)

使用SonarQube 4.2版和sonar-runner 2.0 anaysis很好并且没有问题,现在升级后,运行声纳 - 跑步器的服务器抛出异常(我故意删除了服务器名称;我已经将-X调试开关添加到声纳 - 浇道):

07:55:35.190 INFO  - Install plugins
07:55:35.190 DEBUG - Download index of plugins
07:55:35.190 DEBUG - Download: http://[Server that hosts sonar]/deploy/plugins/index.txt (no proxy)
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 2.864s
Final Memory: 3M/77M
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.IllegalArgumentException: Dependency META-INF/lib/activation-1.1.1.jar can not be found in sonar-email-notifications-plugin-4.3.jar
    at org.sonar.core.plugins.PluginJarInstaller.copyDependencies(PluginJarInstaller.java:53)
    at org.sonar.core.plugins.PluginJarInstaller.install(PluginJarInstaller.java:40)
    at org.sonar.batch.bootstrap.BatchPluginJarInstaller.installToCache(BatchPluginJarInstaller.java:40)
    at org.sonar.batch.bootstrap.BatchPluginRepository.doStart(BatchPluginRepository.java:81)
    at org.sonar.batch.bootstrap.BatchPluginRepository.start(BatchPluginRepository.java:72)
    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)
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
    at org.picocontainer.behaviors.Stored.start(Stored.java:110)
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
    at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
    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)
INFO: ------------------------------------------------------------------------
    ... 9 more
Program returned code  : 1

如果我从运行sonar-runner(来自浏览器)的服务器访问/deploy/plugins/index.txt,我会得到index.txt所以我认为它不应该是权限问题,或者我错在这里?

此外,如果我从托管声纳的服务器运行声纳运行器(因此只在本地,在同一台机器上),它的工作没有问题。

你能帮帮我吗?您还需要更多信息吗?

THX!

2 个答案:

答案 0 :(得分:0)

检查.sonar目录的主目录(c:\ users \< your userid>)。删除它,然后重试。

答案 1 :(得分:0)

问题是运行声纳分析的服务器上的本地声纳插件缓存(C:\ users [本地用户] \。声纳)有修改而且插件是腐蚀的。

我刚刚删除了运行声纳分析的服务器上的文件夹(C:\ users [local user] \ .sonar)并重新运行分析。声纳分析从托管声纳实例的服务器再次获取插件,因此获得正确的(=未损坏的)jar存档。

[info:这已由其他用户建议,但已由网站管理员删除。先生,先生。对于该建议未知]