This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 108594 [details] The test output panel with the partial classpath evidenced Hi there, this is a little bug that annoys me since several NB versions. I'm wondering if it may be finally solved. 1) Executing a failing JUnit 4.7 test through the IDE a stack trace error is shown in the Output panel. 2) clicking the link of one of the classes (part of the same project of the JUnit test) it opens in the IDE Now the problem: 3) the class is opened in the editor but it isn't evidenced in the Projects panel 4) requiring to do so by using the "Select in project" right-mouse-click menu will cause a popup request to open the owning project (the one we are working with which is obviously already opened). The other (maybe related) problem is that the link doesn't cover the entire classpath but starts right after the first part of the domain name (see attached picture). Thank you and keep up with the good job! Francesco
I should add that this problem doesn't appear all the time but only once in a while.
It seems related to having a debugging session opened.
Re 4) and what happens if you agree on opening project?
>3) the class is opened in the editor but it isn't evidenced in the Projects >panel >4) requiring to do so by using the "Select in project" right-mouse-click menu >will cause a popup request to open the owning project (the one we are working >with which is obviously already opened). If the project is not in the Projects panel it's not opened. It's only a dependence of a opened project. For example: You have project B which depends on project A. Only B is opened. You can navigate into project A source as it's a dependence of B, but it's not opened. If you invoke Select in project" the IDE asks if the project should be opened. Did I misunderstand something in your comments?
(In reply to comment #3) If I agree I found two instances of the same project opened in the Projects panel. (In reply to comment #4) What you say is what it should be, but instead I have that project already opened and present in my Projects panel, thus the problem. -- As soon as possible I will try to found a procedure to replicate the problem, in the meantime I leave the status (resolved) unchanged.
Can you attach screenshots of this projects with tooltip (containing the absolute path)? You will need to create 2 screenshots 1 for each of these projects. Thanks
Sorry to be so late guys, I have stumbled over this problem again and I had the sense of recording it, so now I have a procedure that can reproduce the problem and a video as well ;). That's the procedure: 1) just "clean and build" a maven module with a bug in a test 2) having get the stack trace click on a class which is part of the module 3) the class will open in the editor with the cursor on the proper line 4) if you ask to "select in project" you will be asked to open the module again Thanks and keep on the good job! Francesco ps. I haven't found any way to actually upload my video (2.6 Mb), the attachment form is way too slow (starts with 2 kb/s, and then dies few seconds after). Do you have other means to get it (i.e. an email or something)?
(In reply to comment #7) > I haven't found any way to actually upload my video (2.6 Mb) There are various sites for uploading large files for temporary sharing, though precise steps to reproduce are more valuable than any video. (In reply to comment #5) > If I agree I found two instances of the same project opened in the Projects > panel. Normally this does not happen. I did however find that there is a symlink bug. Create a Maven quickstart app, then close it and create a symlink to it. Open the project via the symlink, and edit AppTest.java to fail(). Alt-F6 and click on the AppTest.java link in the resulting failure log. AppTest.java is opened via the canonical path, rather than the symlink path as expected.
More relevant summary. Note that jumping to source from the Test Results window works correctly; it is the separate Output Window tab for the test failure that is broken. (In reply to comment #0) > The other (maybe related) problem is that the link doesn't cover the entire > classpath but starts right after the first part of the domain name Unrelated; see bug #197915.
The link to the video (xvid-AVI, 2.6 Mb): http://uploading.com/files/92bf4693/defect.avi/ It shows clearly how the duplicated project (module) gets opened.
The problem is not in NetBeans as such but the output line "Surefire report directory: ..." which prints the canonicalized path. This does not look like a bug in the Surefire plugin either; Maven itself configures /** * Base directory where all reports are written to. * * @parameter default-value="${project.build.directory}/surefire-reports" */ private File reportsDirectory; to the canonicalized path. Relates to bug #178420, but even a fix of that would not help much since you would still be opening an individual file using the wrong path; you would be prevented from opening a duplicate copy of the whole project, but there would still be issues.
The plot thickens. Maven does not seem to be canonicalizing anything; rather, the Java launcher itself does! jrunscript -e 'println(java.lang.System.getProperty("user.dir"))' prints the physical path when you cd to the symlink. Also, mvn -f /full/path/to/symlink/pom.xml works even when (cd /full/path/to/symlink; mvn) does not. NB does not normally invoke Maven this way, since there can be some problematic mojos or POMs which assume a particular CWD, but perhaps it has to do do when the project path contains symlinks.
(In reply to comment #10) > http://uploading.com/files/92bf4693/defect.avi/ /home/frm/Development -> /home/data/Development? Try opening the project from the latter path.
(In reply to comment #13) > /home/frm/Development -> /home/data/Development? Try opening the project from > the latter path. You are right! I had a symlink in the path of the module. Opening the same module in a path without symlinks solved the problem.
I filed #7061568 for the JVM since I think this should be fixed upstream. In the meantime I will consider a workaround in NB. (The NB Ant integration is not affected. While Ant itself is affected, NB does not fork Ant and so does not rely on the CWD; it embeds Ant in-VM and passes an absolute file name to the script.)
core-main #3a7357cccfd2
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/3a7357cccfd2 User: Jesse Glick <jglick@netbeans.org> Log: #198997: Running Maven follows symlinks in project path
verified in trunk according to steps in comment #7 Product Version: NetBeans IDE Dev (Build 201108220601) Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-384 System: Mac OS X version 10.6.8 running on x86_64; MacRoman; en_US (nb) User directory: /Users/tomas/.netbeans/dev Cache directory: /Users/tomas/.netbeans/dev/var/cache
(In reply to comment #18) > verified in trunk according to steps in comment #7 Did you check comment #8 too? releases #514e73d4d2f9
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/514e73d4d2f9 User: Jesse Glick <jglick@netbeans.org> Log: #198997: Running Maven follows symlinks in project path (transplanted from 3a7357cccfd28fc363cc04a250b1ff8418e4229a)
verified in patch (yes, i followed also comment #8)
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/84f4bd5bcd9c User: Jesse Glick <jglick@netbeans.org> Log: #198997: Running Maven follows symlinks in project path (transplanted from 3a7357cccfd28fc363cc04a250b1ff8418e4229a)