每次我在eclipse中启动项目分析时,我都会在eclipse控制台中收到以下错误。虽然我得到了13:40:35.053 INFO - 在eclipse控制台中成功分析我觉得有些不对劲。
声纳版本:5.1.1 Sonar eclipse插件:3.4.0
我该怎么做才能解决这个问题? 谢谢。
Exception in thread "main" 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.impl.BatchLauncherMain.execute(BatchLauncherMain.java:41)
at org.sonar.runner.impl.BatchLauncherMain.main(BatchLauncherMain.java:59)
Caused by: org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException: org.sonar.core.notification.DefaultNotificationManager has unsatisfied dependency 'class org.sonar.core.properties.PropertiesDao' for constructor 'public org.sonar.core.notification.DefaultNotificationManager(org.sonar.core.notification.db.NotificationQueueDao,org.sonar.core.properties.PropertiesDao)' from org.picocontainer.DefaultPicoContainer@2b67556e:213<[Immutable]:org.picocontainer.DefaultPicoContainer@192d5cf3:18<[Immutable]:org.picocontainer.DefaultPicoContainer@3bca634f:45<|
at org.picocontainer.injectors.ConstructorInjector.getGreediestSatisfiableConstructor(ConstructorInjector.java:191)
at org.picocontainer.injectors.ConstructorInjector.getGreediestSatisfiableConstructor(ConstructorInjector.java:110)
at org.picocontainer.injectors.ConstructorInjector.access$100(ConstructorInjector.java:51)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:331)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:620)
at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:717)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:605)
at org.picocontainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:586)
at org.sonar.api.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:217)
at org.sonar.batch.bootstrap.BatchExtensionDictionnary.completeBatchExtensions(BatchExtensionDictionnary.java:119)
at org.sonar.batch.bootstrap.BatchExtensionDictionnary.getExtensions(BatchExtensionDictionnary.java:113)
at org.sonar.batch.bootstrap.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:91)
at org.sonar.batch.bootstrap.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:68)
at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:49)
at org.sonar.batch.phases.DatabaseLessPhaseExecutor.execute(DatabaseLessPhaseExecutor.java:103)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
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:235)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
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: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:45)
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.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 6 more
以下是声纳插件列表:
sonar-checkstyle-plugin-2.3.jar
sonar-css-plugin-1.2.jar
sonar-findbugs-plugin-3.2.jar
sonar-groovy-plugin-1.1.1.jar
sonar-issue-assign-plugin-1.6.jar
sonar-issues-density-plugin-1.0.jar
sonar-java-plugin-3.3.jar
sonar-javascript-plugin-2.6.jar
sonar-ldap-plugin-1.4.jar
sonar-motion-chart-plugin-1.7.jar
sonar-pmd-plugin-2.4.1.jar
sonar-scm-svn-plugin-1.1.jar
sonar-timeline-plugin-1.5.jar
sonar-useless-code-tracker-plugin-1.0.jar
sonar-views-plugin-2.8.jar
sonar-web-plugin-2.3.jar
sonar-xml-plugin-1.2.jar
答案 0 :(得分:8)
您的问题是由与预览模式不兼容的声纳 - 问题 - 分配插件引起的(数据库较少)。您可以通过填写属性sonar.preview.excludePlugins
的默认值来排除它:
-Dsonar.preview.excludePlugins=buildstability,devcockpit,pdfreport,report,views,jira,buildbreaker,issueassign
此外,我已打开您可以关注的以下门票:http://jira.sonarsource.com/browse/SONAR-6673