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.
The issue started to occur when trying to debug a testcase with different versions of a class libary. Product Version: NetBeans IDE Dev (Build 201111120600) How to reproduce: - Download Apache Wicket versions 1.5.1 and 1.5.2 and extract them. - In the subdirectory src in each extracted directory, execute mvn -Dmaven.test.skip=true install - Open with an editor the POM.xml (not the project) of the attached project and check the Wicket version to 1.5.1: <wicket.version>1.5.1</wicket.version> - Close the file - Check that the target dir in the attached project is empty - Open NetBeans in a new empty userdir - do not import settings - Menu|Tools|Options|Miscellaneous|Files|uncheck Enable auto-scanning of sources|OK - Open the attached project - Menu|Navigate|Go to Type|RequestCycle|OK Should find file in wicket-core-1.5.1.jar - Set a breakpoint on line 208 requestHandlerExecutor.execute(handler); - Project|Debug|Server GlassFish 3.1|Remember in current IDE session|OK The debugger breaks on this line as expected. - Menu|Debug|Continue - Finish the debug session - In the Services window, undeploy the application and re-start the server (in debug mode) - Remove the breakpoint - Close RequestCycle.java - open the project's pom.xml in the NetBeans editor and change the Wicket version to 1.5.2: <wicket.version>1.5.2</wicket.version> - Save and close - Project|Clean and build - Menu|Navigate|Go to Type|RequestCycle|OK Should find file in wicket-core-1.5.2.jar - Set a breakpoint on line 208 requestHandlerExecutor.execute(handler); - Project|Debug Attaching to localhost:9009 Not able to submit breakpoint LineBreakpoint RequestCycle.java : 208, reason: No source root found for URL 'jar:file:/C:/Documents%20and%20Settings/treinebe/.m2/repository/org/apache/wicket/wicket-core/1.5.1/wicket-core-1.5.1-sources.jar!/org/apache/wicket/request/cycle/RequestCycle.java'. Verify the setup of project sources. Invalid LineBreakpoint RequestCycle.java : 208 User program running Cross check is to start the test fresh with 1.5.2 then switch to 1.5.1 to ensure that the error is not in the 1.5.2 distribution. - Open with an editor the POM.xml (not the project) of the attached project and check the Wicket version to 1.5.2: <wicket.version>1.5.2</wicket.version> - Close the file - Check that the target dir in the attached project is empty - Open NetBeans in a new empty userdir - do not import settings - Menu|Tools|Options|Miscellaneous|Files|uncheck Enable auto-scanning of sources|OK - Open the attached project - Menu|Navigate|Go to Type|RequestCycle|OK Should find file in wicket-core-1.5.2.jar - Set a breakpoint on line 252 requestHandlerExecutor.execute(handler); (note the different line number - was line 208 in 1.5.1) - Project|Debug|Server GlassFish 3.1|Remember in current IDE session|OK The debugger breaks on this line as expected. - Menu|Debug|Continue - Finish the debug session - In the Services window, undeploy the application and re-start the server (in debug mode) - Remove the breakpoint - Close RequestCycle.java - open pom.xml and change the Wicket version from 1.5.2 to 1.5.1: <wicket.version>1.5.1</wicket.version> - Save and close - Project|Clean and build - Menu|Navigate|Go to Type|RequestCycle|OK Should find file in wicket-core-1.5.1.jar - Set a breakpoint on line 252 requestHandlerExecutor.execute(handler); - Project|Debug Attaching to localhost:9009 User program running Not able to submit breakpoint LineBreakpoint RequestCycle.java : 252, reason: No source root found for URL 'jar:file:/C:/Documents%20and%20Settings/treinebe/.m2/repository/org/apache/wicket/wicket-core/1.5.2/wicket-core-1.5.2-sources.jar!/org/apache/wicket/request/cycle/RequestCycle.java'. Verify the setup of project sources. Invalid LineBreakpoint RequestCycle.java : 252 - Project|Clean - Project|Build with Dependencies - Project|Debug Attaching to localhost:9009 Not able to submit breakpoint LineBreakpoint RequestCycle.java : 252, reason: No source root found for URL 'jar:file:/C:/Documents%20and%20Settings/treinebe/.m2/repository/org/apache/wicket/wicket-core/1.5.2/wicket-core-1.5.2-sources.jar!/org/apache/wicket/request/cycle/RequestCycle.java'. Verify the setup of project sources. Invalid LineBreakpoint RequestCycle.java : 252 User program running
Created attachment 113240 [details] Testcase in jar file
I have reproduced the problem exactly by following the described steps. However, after: open the project's pom.xml in the NetBeans editor and change the Wicket version to 1.5.2: <wicket.version>1.5.2</wicket.version> - Save and close - Project|Clean and build - Menu|Navigate|Go to Type|RequestCycle|OK Should find file in wicket-core-1.5.2.jar The Go to Type dialog says, that the RequestCycle is from .../wicket-core/1.5.2/wicket-core-1.5.2.jar, but the tooltip on the file's tab says that it comes from .../wicket-core/1.5.1/wicket-core-1.5.1-sources.jar Therefore the error message that is printed when it's not possible to submit the breakpoint is correct. Debugger warns you correctly, since you have opened a wrong file. Moving to maven to evaluate and to figure out why a bad source file was opened.
(In reply to comment #0) > - Download Apache Wicket versions 1.5.1 and 1.5.2 and extract them. > - In the subdirectory src in each extracted directory, execute mvn > -Dmaven.test.skip=true install Why would you not simply use these versions of Wicket from Maven Central? Saves the long source package download and build steps, and seems to have the same result. (In reply to comment #2) > The Go to Type dialog says, that the RequestCycle is from > .../wicket-core/1.5.2/wicket-core-1.5.2.jar, but the tooltip on the file's tab > says that it comes from .../wicket-core/1.5.1/wicket-core-1.5.1-sources.jar Reproduced. Fixed by simply closing and reopening the project. Seems Go to Type is using stale data somehow. I can confirm that RepositorySourceForBinaryQueryImpl is giving correct results, but presumably JavaTypeProvider is failing somewhere; without being able to follow what that class is doing, hard to tell whether the root problem is in Maven integration code or not.
If I saw both wicket-1.5.1.jar and wicket-1.5.2.jar in Window->Debugging->Sources, could that somehow be related to this issue?
Might be related to bug #216448.
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.