在Eclipse中分析项目时使用NPE(SonarQube 5.2) [英] NPE when analysing project in Eclipse (SonarQube 5.2)

查看:105
本文介绍了在Eclipse中分析项目时使用NPE(SonarQube 5.2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从SonarQube 5.1.2更新到5.2。



在Eclipse中,我开始使用SonarQube和最新的插件版本进行分析。但是会弹出一个对话框,说有NPE。 Eclipse错误日志显示:

  java.lang.NullPointerException 
在org.sonar.ide.eclipse.wsclient处。 internal.SonarWSClientFacade.getUnresolvedRemoteIssuesRecursively(SonarWSClientFacade.java:170)
at org.sonar.ide.eclipse.core.internal.remote.RemoteSourceCode.getRemoteIssuesRecursively(RemoteSourceCode.java.107)$ b $ ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.doRefreshIssues(SynchronizeAllIssuesJob.java:131)
在org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.fetchSmoynIs: b $ b在org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.run(SynchronizeAllIssuesJob.java:76)
在org.eclipse.core.internal.jobs.Worker.run(Worker.java :55)

出了什么问题?如何在Eclipse中使用SonarQube 5.2进行分析?

解决方案

您不能将Eclipse SonarQube插件与SonarQube 5.2或更高版本一起使用。 / p>




来自 SonarQube Wiki


SonarQube Eclipse插件已弃用 >



SonarQube Eclipse插件不适用于SonarQube 5.2+。它由 SonarLint for Eclipse 代替。



请注意,SonarLint for Eclipse 1.x系列尚未涵盖SonarQube Eclipse插件的所有功能,但版本2.x肯定会弥补这一空白。



I updated from SonarQube 5.1.2 to 5.2.

In Eclipse I start analysis with SonarQube with the latest plugin version. But a dialog pops up saying there is a NPE. The Eclipse error log displays:

java.lang.NullPointerException
    at org.sonar.ide.eclipse.wsclient.internal.SonarWSClientFacade.getUnresolvedRemoteIssuesRecursively(SonarWSClientFacade.java:170)
    at org.sonar.ide.eclipse.core.internal.remote.RemoteSourceCode.getRemoteIssuesRecursively(RemoteSourceCode.java:107)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.doRefreshIssues(SynchronizeAllIssuesJob.java:131)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.fetchRemoteIssues(SynchronizeAllIssuesJob.java:120)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.run(SynchronizeAllIssuesJob.java:76)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

What is the problem? How can I make analysis in Eclipse work with SonarQube 5.2?

解决方案

You cannot use Eclipse SonarQube Plugin with SonarQube 5.2 or newer.


From SonarQube Wiki:

The SonarQube Eclipse plugin is deprecated

The SonarQube Eclipse plugin does not work with SonarQube 5.2+. It is replaced by SonarLint for Eclipse.

Note that SonarLint for Eclipse 1.x series do not cover yet all the features of SonarQube Eclipse plugin, but versions 2.x will definitely cover this gap.

这篇关于在Eclipse中分析项目时使用NPE(SonarQube 5.2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆