Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Exception when getting issues from server #59

Open
roskens opened this issue Aug 27, 2017 · 5 comments
Open

Unexpected Exception when getting issues from server #59

roskens opened this issue Aug 27, 2017 · 5 comments

Comments

@roskens
Copy link

roskens commented Aug 27, 2017

I have a project that has a lot of sonar bugs, and this results in 20 pages of bugs. When this plugin attempts to load the 21 page, its gets a 400 Bad Request from the Sonar server, and that results in an Unexpected Exception:

javax.ws.rs.BadRequestException: HTTP 400 Bad Request
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:193)
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:170)
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:473)
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.get(ClientInvocationBuilder.java:169)
	at qubexplorer.server.SonarQube.getIssues(SonarQube.java:104)
	at qubexplorer.server.SonarQube.getIssues(SonarQube.java:90)
	at qubexplorer.server.SonarQube.getSummary(SonarQube.java:247)
	at qubexplorer.ui.summary.SummaryTask.execute(SummaryTask.java:45)
	at qubexplorer.ui.summary.SummaryTask.execute(SummaryTask.java:25)
	at qubexplorer.ui.task.TaskExecutor$TaskWorker.doInBackground(TaskExecutor.java:71)
	at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at javax.swing.SwingWorker.run(SwingWorker.java:334)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[catch] at java.lang.Thread.run(Thread.java:748)

This is with SonarQube 6.5, and the 3.0.1 plugin for netbeans.

@roskens
Copy link
Author

roskens commented Aug 27, 2017

If I do a call to the URL, this is the response from SonarQube:

{"errors":[{"msg":"Can return only the first 10000 results. 10500th result asked."}]}

@hmvictor
Copy link
Owner

Yes, the Sonar API has a limit in the number of issues that can be retrieved. So maybe it would be useful to handle this case and to show a more meaningful message to the user.

@astaicu
Copy link

astaicu commented Mar 26, 2018

Is there a way to get around this limitation? I would like to be able to export all the issues for a language to further categorise them. There are plenty of projects that have more than 10000 issues.

@hmvictor
Copy link
Owner

Hi @astaicu For remote issues, the plugin invokes the REST API provided by the SonarQube Server. I don't know of any workaround for the remote case.

In the local analysis with sonar runner these limitation should not exist.

@ATakaSKY
Copy link

Hey guys. Facing the same issue here. Not able to get issues beyond 10000. Even the API https://docs.sonarqube.org/pages/viewpage.action?pageId=2392181 says that cannot fetch more than 10000 issues. Is there any other tool that exposes all the issues in the API which I can make use of in my application?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants