Not possible to access project issues using web api

We’re currently using Sonarqube 6.7.4 (LTS) with a PostgreSQL database (Version 9.2.23) on Red Hat 7.4.
When trying to access one of our projects via the web api following exception is thrown:

2018.06.26 07:03:10 ERROR web[AWQ25OLop+Ezebt/AAPS][o.s.s.w.WebServiceEngine] Fail to process request
\### The error occurred while handling results
\### SQL: select ,     i.kee as kee,     i.rule_id as ruleId,     i.severity as severity,     i.manual_severity as manualSeverity,     i.message as message,     i.line as line,     i.locations as locations, as gap,     i.effort as effort,     i.status as status,     i.resolution as resolution,     i.checksum as checksum,     i.assignee as assignee,     i.author_login as authorLogin,     i.tags as tagsString,     i.issue_attributes as issueAttributes,     i.issue_creation_date as issueCreationTime,     i.issue_update_date as issueUpdateTime,     i.issue_close_date as issueCloseTime,     i.created_at as createdAt,     i.updated_at as updatedAt,     r.plugin_rule_key as ruleKey,     r.plugin_name as ruleRepo,     r.language as language,     p.kee as componentKey,     i.component_uuid as componentUuid,     p.module_uuid as moduleUuid,     p.module_uuid_path as moduleUuidPath,     p.path as filePath,     root.kee as projectKey,     i.project_uuid as projectUuid,     i.issue_type as type         from issues i     inner join rules r on = i.rule_id     inner join projects p on p.uuid = i.component_uuid     inner join projects root on root.uuid = i.project_uuid     where     i.project_uuid = ? and     p.module_uuid_path like  ? escape '/' and     i.status <> 'CLOSED'
\### Cause: java.lang.NullPointerException
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(
        at org.apache.ibatis.binding.MapperMethod.executeWithResultHandler(
        at org.apache.ibatis.binding.MapperMethod.execute(
        at org.apache.ibatis.binding.MapperProxy.invoke(
        at com.sun.proxy.$Proxy62.scrollNonClosedByModuleOrProject(Unknown Source)
        at org.sonar.db.issue.IssueDao.scrollNonClosedByModuleOrProject(
        at org.sonar.server.batch.IssuesAction.handle(
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(
        at org.sonar.server.platform.web.MasterServletFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.sonar.server.user.UserSessionFilter.doFilter(
        at org.sonar.server.user.UserSessionFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(
        at org.sonar.server.platform.web.SecurityServletFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.sonar.server.platform.web.RedirectFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.sonar.server.platform.web.RootFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.apache.catalina.core.StandardWrapperValve.invoke(
        at org.apache.catalina.core.StandardContextValve.invoke(
        at org.apache.catalina.core.StandardHostValve.invoke(
        at org.apache.catalina.valves.ErrorReportValve.invoke(
        at ch.qos.logback.access.tomcat.LogbackValve.invoke(
        at org.apache.catalina.core.StandardEngineValve.invoke(
        at org.apache.catalina.connector.CoyoteAdapter.service(
        at org.apache.coyote.http11.Http11Processor.service(
        at org.apache.coyote.AbstractProcessorLight.process(
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
        at org.apache.tomcat.util.threads.TaskThread$
Caused by: java.lang.NullPointerException: null
        at org.sonar.scanner.protocol.input.ScannerInput$ServerIssue$Builder.setModuleKey(
        at org.sonar.server.batch.IssuesAction.handleIssue(
        at org.sonar.server.batch.IssuesAction.lambda$handle$0(
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.callResultHandler(
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.storeObject(
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(
        at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(
        at org.apache.ibatis.executor.ReuseExecutor.doQuery(
        at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(
        at org.apache.ibatis.executor.BaseExecutor.query(
        at org.apache.ibatis.executor.CachingExecutor.query(
        at org.apache.ibatis.executor.CachingExecutor.query(
        ... 49 common frames omitted

When calling the web api manually following output is generated:
{"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}

This is currently happening for two of our projects.

Best regards

1 Like

This appears to happen only for projects that have subprojects/modules


Can you see these projects’ issues through the UI?


The Sonarqube web UI shows no obvious problems. We can all see the issues and manage them, so that seems just fine.


To be clear, you can successfully browse via the UI all the issues of the project you’re having trouble with via Web Services?

Can you share your web service call? And could you use your browser’s dev tools to compare the call you’re making with the one that’s successful from your browser?



following web service call is causing trouble:

The UI is using following succesful call to get the issues:


Hi André,

You can try this api call to list unresolved issues of a project:

Documentation: http://localhost:9000/web_api/api/issues/search

@akrautsc @HammerNL do you get this issue during the analysis of a multi-module project? How exactly do you run the analysis?

The Sonarqube UI is not showing any problems, everything seems to work fine. We can browse and manage all the issues just fine.
We can not show you the code of the web service call, because that call is done by the SonarLint plugin for IntelliJ IDEA. However, that is not relevant, because the problem also occurs when I simply visit this URL in a browser:


I then see in the browser:

{“errors”:[{“msg”:“An error has occurred. Please contact your administrator”}]}

In the Sonarqube server logging we then find the NullPointerException posted by André above. If I change the projectname to that of a project without modules, the output is OK.

This call works fine indeed, however, we are not at liberty to just use a different URL, because it is done by the SonarLint plugin for IntelliJ IDEA.

We run the analysis in two different ways.
1: The analysis is started from Jenkins, in which case,everything works fine
2: In our IntelliJ IDEA development environment we want to use the SonarLint plugin. This plugin is using this URL:


to get information from the Sonarqube server. This URL access causes the NullPointerException that my colleague André posted in this threads first post. If I change the projectname in the URL to that of a project without modules, the output is OK.



As your issue is about retrieving issues from a given module (having key mps from the error log ), could you please go to the Issues page of the project, select the module in the Module facet and check if you have access to the issues of the module ?


As mentioned several times before, I can properly access all issues of the project and any of its modules via the Sonarqube web UI. So yes, I can select a module and I then get the issues for that module. Works fine.

Hi guys,

7 months since we reported this problem. Any progress?



To be clear, what you’re trying to report is not a problem directly calling the web api, but with using SonarLint? And if so, could you provide your IDE, version, and SonarLint version?