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

Go to source is not working #34

Open
GoogleCodeExporter opened this issue May 1, 2015 · 18 comments
Open

Go to source is not working #34

GoogleCodeExporter opened this issue May 1, 2015 · 18 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Get issues from server
2. double click on an issue type
3. right click on an issue and click Go to Source

What is the expected output? What do you see instead?
It is expected to go to the line the issue detected, but it does not do 
anything.

What version of the product are you using? On what operating system?
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25
Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b26
System: Windows 8 version 6.2 running on amd64; Cp1252; en_US (nb)



Original issue reported on code.google.com by [email protected] on 13 Apr 2015 at 4:05

@mario-s
Copy link

mario-s commented Jun 9, 2016

I have the same issue with NetBeans 8.1 and Java 1.8.0_66. I'm using version 2.6 of the plugin.
I get an error dialog with a message like this: Project not found with key: XXX
This happens only on a Maven multi-module project, when I choose "Get Issue from server" for a sub module.

Stacktrace:
qubexplorer.ProjectNotFoundException
at qubexplorer.ui.issues.IssueLocation.getFile(IssueLocation.java:101)
at qubexplorer.ui.issues.IssueLocation.getFileObject(IssueLocation.java:119)
[catch] at qubexplorer.ui.SonarIssuesTopComponent.openIssueLocation(SonarIssuesTopComponent.java:683)
at qubexplorer.ui.SonarIssuesTopComponent.access$300(SonarIssuesTopComponent.java:108)
at qubexplorer.ui.SonarIssuesTopComponent$4.actionPerformed(SonarIssuesTopComponent.java:173)
at qubexplorer.ui.SonarIssuesTopComponent.issuesTableMouseClicked(SonarIssuesTopComponent.java:551)

@hmvictor
Copy link
Owner

hmvictor commented Jun 13, 2016

Hi @mario-s, let me check this out. I haven't tested Radar with SonarQube 5.6 that is available since this month. What version of SonarQube are you using?

@adrianolabate
Copy link

I also experience the same issue "Project not found with key: ch.blabla.framework.epayment:xframework-epayment-ei".
I have also a multi-module Maven project where ch.blabla.framework.epayment is the parent project and xframework-epayment-ei is one of the modules.

radar-netbeans is version 2.6, sonar is version 4.5, netbeans is version 8.1 patch 1.

@CobaltChicken
Copy link

I've just submitted an issue with project key prefixes, which may be the same problem in other guise. Problem seems to be that Radar assumes project key from sonar = project name in Netbeans, which is not always the case.

@sahlex
Copy link

sahlex commented May 5, 2017

Same for me. I'm working with NB 8.2, radar plugin 2.7, SonarQube 6.2.

The problem seems to be occurring when the code in question is contained in a sub-project, which itself is not a project of it's own right in sonar. At least it doesn't show up in the project list. However, when selecting the sub-project in sonar UI , the link pointing to the subproject shows the correct (sub-) project page.

So maybe the project list downloaded from SonarQube does not contain the sub projects and because of this it's not found by netbeans-radar?

@hmvictor
Copy link
Owner

hmvictor commented May 9, 2017

Hi, @sahlex. Do you have an example to reproduce this issue?

Thanks in advance.

@sahlex
Copy link

sahlex commented May 9, 2017

Hi @hmvictor.

Unfortunately all of our code is closed-source so I can't provide you access to neither our code nor the sonar server.

In the meantime I tried with the sonar runner in each of the subprojects/modules, which is working fine. But of course I'd like to work with the issues from sonar server as the sonar runner needs local processing which takes a lot of time.

How could I help you by other means?

Alexander

@hmvictor
Copy link
Owner

A sample project, not real code, but something to replay this issue would be useful.

Nice day.

@sahlex
Copy link

sahlex commented May 10, 2017

I'll prepare it, Hang on.

@sahlex
Copy link

sahlex commented May 10, 2017

Ok, Here you go.

Steps to reproduce:

  1. compile project (see zip file below)
  2. execute sonar maven plugin with:
    mvn sonar:sonar -Dsonar.host.url=https://your.sonar.host -Dsonar.login=****** -Dsonar.branch=master -Dsonar.language=java -Dsonar.java.source=1.8 -Dsonar.java.target=1.8
  3. load project in netbeans
  4. on main (aggregator) project (radarIssue) call SonarQube -> Get Issues From Server
  5. In SonarQube Tool Window open Summary and double-click on an issue. Issue Tool Tab opens up.
  6. In Issues Tab double-click the first issue
  7. voilá

image
radarIssue-master-3f787d0b1215f9913cf7e372cdbde4bf55351538.zip

@sahlex
Copy link

sahlex commented May 10, 2017

However, in sonar the projects show up perfectly:

image

@hmvictor hmvictor closed this as completed Jul 4, 2017
@sahlex
Copy link

sahlex commented Jul 5, 2017

So is it solved? Any progress?

@hmvictor
Copy link
Owner

hmvictor commented Jul 6, 2017

I have tested with your example but I had to remove the parent from the main pom file in your folder because I don't have such parent pom. In this scenary, issues in subprojects are correctly opened.

image

image

@hmvictor hmvictor reopened this Jul 6, 2017
@sahlex
Copy link

sahlex commented Jul 7, 2017

OK. I removed the parent dependency, recompiled and re-run sonar analysis.

Still, I get the very same error.

What's the difference?

@hmvictor
Copy link
Owner

hmvictor commented Jul 7, 2017

What version of the sonar-maven-plugin are you using to analyze your project? Maybe that's the difference.

@jiai
Copy link

jiai commented Jul 10, 2017

<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.3.0.603</version>

My profile differs from the the one suggested by SonarQube because only Jenkins executes it in a scheduled build. Therefore, there are no entries in settings.xml and only a reduced configuration exists in the pom.xml. Does radar-netbeans try to extract some information from these entries in settings.xml or pom.xml?

Jenkins uses "Enable injection of SonarQube server configuration as build environment variables".

@fishermans
Copy link

fishermans commented Oct 5, 2017

👍
Any news here? Some issue occured. Cannot use the plugin.

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

No branches or pull requests

8 participants