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.
When building with Maven, the error hyperlinks no longer work: they neither open the related file, nor go the error line. Product Version: NetBeans IDE 7.0 RC1 (Build 201103280000) Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: H:\projects\.netbeans\7.0rc1 Maven: 3.0.3 Error navigation still works with ant based Netbeans projects.
unable to reproduce both on XP and OS X, on 7.0 rc1 JDK 6u24. - create maven java application - modify App.java class (e.g. change System.out to System.outxxx) - save file - close editor window - clean an build - click on hyperlink showing compilation error in output window -> editor with App.java gets opened with cursor on desired line. Closing as worksforme, please reopen with detailed steps, how we can reproduce from scratch, thanks.
I cleaned up all my caches. No more user dir. When I execute the steps below, it simply doesn't work: clicking on the error hyperlink does nothing. I use an external Maven 3.0.3 installation. I'll do so other tests tomorrow to see if I can restore error navigation.
The only idea i have is that possible problem could be if hyperlink contains path with space (e.g. you project is located in c:\My Folder With Space\project). Is that the case? > When I execute the steps below, it simply doesn't work: clicking on the error > hyperlink does nothing. Please try also with bundled, but i guess it should not make difference. > I use an external Maven 3.0.3 installation. I'll do so other tests tomorrow to > see if I can restore error navigation.
Using the bundled Maven does not make any difference. As I told Jesse Glick on the netcat mailing list: hyperlink navigation in compilation errors works on Mac OS X and not on Windows (at least mine). I flushed everything and installed no additional plugin. I suspect now that the problem is related to the path: no drive letter prefix in the paths: Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000) Maven home: C:\Program Files\netbeans\7.0rc1\java\maven\bin\.. Java version: 1.6.0_23, vendor: Sun Microsystems Inc. Java home: C:\Program Files\java\jdk1.6.0_23\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows xp", version: "5.1", arch: "x86", family: "windows" Scanning for projects... ------------------------------------------------------------------------ Building mavenproject2 1.0-SNAPSHOT ------------------------------------------------------------------------ [resources:resources] Using 'UTF-8' encoding to copy filtered resources. skip non existing resourceDirectory H:\lab\mavenproject2\src\main\resources [compiler:compile] Compiling 1 source file to H:\lab\mavenproject2\target\classes ------------------------------------------------------------- COMPILATION ERROR : ------------------------------------------------------------- \lab\mavenproject2\src\main\java\ch\skyguide\inch\mavenproject2\App.java:[14,27] ';' expected \lab\mavenproject2\src\main\java\ch\skyguide\inch\mavenproject2\App.java:[14,63] not a statement \lab\mavenproject2\src\main\java\ch\skyguide\inch\mavenproject2\App.java:[14,92] ';' expected 3 errors ------------------------------------------------------------- ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 0.694s Finished at: Tue Apr 05 09:22:35 GMT 2011 Final Memory: 3M/15M ------------------------------------------------------------------------ Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project mavenproject2: Compilation failure: Compilation failure: \lab\mavenproject2\src\main\java\ch\skyguide\inch\mavenproject2\App.java:[14,27] ';' expected \lab\mavenproject2\src\main\java\ch\skyguide\inch\mavenproject2\App.java:[14,63] not a statement \lab\mavenproject2\src\main\java\ch\skyguide\inch\mavenproject2\App.java:[14,92] ';' expected -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Windows FS problem?!
btw: your drive H: is local filesystem, or some mounted network FS?
Local filesystem.
However at runtime, exception stack navigation works fine: Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000) Maven home: C:\Program Files\netbeans\7.0rc1\java\maven\bin\.. Java version: 1.6.0_23, vendor: Sun Microsystems Inc. Java home: C:\Program Files\java\jdk1.6.0_23\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows xp", version: "5.1", arch: "x86", family: "windows" Scanning for projects... ------------------------------------------------------------------------ Building mavenproject2 1.0-SNAPSHOT ------------------------------------------------------------------------ [resources:resources] Using 'UTF-8' encoding to copy filtered resources. skip non existing resourceDirectory H:\lab\mavenproject2\src\main\resources [compiler:compile] Nothing to compile - all classes are up to date [exec:exec] java.lang.ExceptionInInitializerError Caused by: java.util.MissingResourceException: Can't find bundle for base name bundly, locale en_US at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250) at java.util.ResourceBundle.getBundle(ResourceBundle.java:705) at ch.skyguide.inch.mavenproject2.App.<clinit>(App.java:11) Could not find the main class: ch.skyguide.inch.mavenproject2.App. Program will exit. Exception in thread "main" [INFO] ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 0.956s Finished at: Tue Apr 05 09:24:20 GMT 2011 Final Memory: 3M/15M ------------------------------------------------------------------------ Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (default-cli) on project mavenproject2: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Compilation error navigation works on my XP with Netbeans 6.9.1 and Maven 2.2.1
Compilation error navigation does not work with Netbeans 7.0rc1 and Maven 2.2.1
The bug is still present in Netbeans 7.0 rc2
reproduced: What makes difference is where you place your project, there are two types of hyperlinks: case 1: - project in default location in NetbeansProjects folder on C: drive, error navigation works fine, error hyperlink seems to be relative to sourceroot ------------------------------------------------------------- COMPILATION ERROR : ------------------------------------------------------------- com/mycompany/mavenproject1/App.java:[11,14] cannot find symbol symbol : variable ouxxxxt location: class java.lang.System 1 error case 2: - project in e.g. H:\NB folder, error navigation does not work,hyperlink is absolute, but "H:" is omitted from path: ------------------------------------------------------------- COMPILATION ERROR : ------------------------------------------------------------- \NB\mavenproject2\src\main\java\com\mycompany\mavenproject2\App.java:[11,14] cannot find symbol symbol : variable ouxxxxt location: class java.lang.System 1 error
Looks like a Maven bug; command-line javac prints full path names without any issue, but command-line Maven (3.0.3 tested) prints path names without a drive letter. This is true for both the C: and the F: projects I made (though the IDE managed to hyperlink only the C: project for some reason). Need to file the upstream bug. NB 6.9 does not hyperlink output from _either_ project when using M3, and 7.0 in my tests does hyperlink both projects when Maven 2.2.1 is used, so this is no regression.
Upstream bug already filed, apparently causing similar problems in IDEA.
Filed a patch for upstream bug; I hope that will make it into the next release of the compiler plugin. Still need a workaround in NB for the benefit of projects using older versions of the plugin.
Workaround in NB seems pretty safe, so up to QE whether to accept it in 7.0 or leave it for an update. Will affect anyone developing a Java-oriented Maven project (using more or less current versions of the compiler plugin) on a Windows drive distinct from that of the IDE's working directory (which is arbitrary but may correspond to the location of the IDE installation).
core-main #9351eabe7f43
it really looks like that workaround should not do any harm, so i'd vote for porting to 7.0 once I verify it in trunk.
(In reply to comment #18) > it really looks like that workaround should not do any harm, so i'd vote for > porting to 7.0 once I verify it in trunk. If it will not be in release70 in next 70 minutes, it won't be in NB 7.0. So I vote to leave it for NB 7.0.1
I think it can be skipped. Hyperlinking of errors is basic, but not critical, functionality; you can always jump to the mentioned class and line manually. (Especially javac errors, which would normally be displayed in the IDE's editor to begin with.) I just thought of a hypothetical bug in this impl, too, though I cannot think of a way to trigger it; relates to UNC paths. core-main #83295a14b9c6
Integrated into 'main-golden', will be available in build *201104060400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/9351eabe7f43 User: Jesse Glick <jglick@netbeans.org> Log: #197381: [70cat][maven] Compilation error hyperlinks misparsed when on different Windows drive
verified in trunk. Product Version: NetBeans IDE Dev (Build 201104060400) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\tomas\.netbeans\dev
*** Bug 197448 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201104070400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/83295a14b9c6 User: Jesse Glick <jglick@netbeans.org> Log: #197381 cont'd: refinement to ignore UNC paths.
*** Bug 197915 has been marked as a duplicate of this bug. ***
*** Bug 198493 has been marked as a duplicate of this bug. ***
releases #11d95f28d48d, releases #c48f0fbea650, releases #4bba1140ade6
v. in 70patch1