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 91160 [details] suite containing core-renderer.jar and core-renderer-src.zip I have a library wrapper module with source attachment. C:\Users\ecerulm\Documents\NetBeansProjects\test\suite9\core-renderer\release\modules\ext\core-renderer.jar C:\Users\ecerulm\Documents\NetBeansProjects\test\suite9\core-renderer\release\modules\ext\core-renderer-src.jar I have set a breakpoint in org/xhtmlrender/swing/SwingReplacedElementFactory.java in C:\Users\ecerulm\Documents\NetBeansProjects\test\suite9\core-renderer\release\modules\ext\core-renderer-src.jar When I debug the netbeans application I get the following error in the Not able to submit breakpoint LineBreakpoint SwingReplacedElementFactory.java : 60, reason: No source root found for URL 'jar:file:/C:/Users/ecerulm/Documents/NetBeansProjects/test/suite9/core-renderer/release/modules/ext/core-renderer-src.zip!/org/xhtmlrenderer/swing/SwingReplacedElementFactory.java'. Verify the setup of project sources. Invalid LineBreakpoint SwingReplacedElementFactory.java : 60 The sources are properly attached as I can navigate from src/NewClass.java to SwingReplacedElementFactory.java by Ctrl-clicking the class name. The same core-renderer.jar / core-renderer-src.jar seems to work fine (can set breakpoints properly) on a regular Java Application project. I'm attaching both a netbeans application suite and a regular java project with the jars. Related to my Issue #176800 (but it's not a duplicate I think).
Created attachment 91161 [details] javaapplication project containing the same library and source zip
Forgot to mention that this only occurs when the source attachment is done by name convention (<jarfilename>-src.zip in the same directory as the jar) If the sources are attached via a Library (Tools->libraries) with C:\Users\ecerulm\Documents\NetBeansProjects\test\suite9\core-renderer\release\modules\ext\core-renderer.jar C:\Users\ecerulm\Documents\NetBeansProjects\test\suite9\core-renderer\release\modules\ext\core-renderer-src.jar Then the breakpoints work as expected in the suite project.
And which project did you debug? Was it JavaApplication1? If yes, then you have to submit the breakpoint to org/xhtmlrenderer/swing/SwingReplacedElementFactory.java in JavaApplication1/lib/core-renderer-src.zip and not in org/xhtmlrenderer/swing/SwingReplacedElementFactory.java in suite9/core-renderer/release/modules/ext/core-renderer-src.zip It depends on where you open the SwingReplacedElementFactory from. If you open it from suite9/core-renderer/src/suite9/flyingsaucer/NewClass.java you get a different file location than when opened from JavaApplication1/src/javaapplication1/Main.java
Created attachment 91316 [details] screenshot
I was debugging suite9 (see screenshot) and the source file open is SwingReplacedElementFactory.java in C:/Users/ecerulm/Documents/NetBeansProjects/test/suite9/core-renderer/release/modules/ext/core-renderer-src.zip I just tried again with NB 6.8 200911161401 and I got the same result. Make sure that you don't define a library for core-renderer.jar in Tools->Libraries. This only happens if the source attachment is done by name convention jarfile.jar <jarfile>-src.jar.
I'm REOPENING this one this additional information I traced it down to ClassPath.getClassPath (or at least that what I think) in LineBreakpointImpl.setRequests:155 SourcePath.getRelativePath:121 SourcePathProviderImpl.getRelativePath:678 ClassPath.getClassPath:545 when the source is attached as a library ClassPath.getClassPath(fo, ClassPath.SOURCE) uses J2SELibraryClassPathProvider to provide a ClassPath but when there is no library ClassPath.getClassPath return null. I guess that ProjectClassPathProvider should provide a ClassPath when using the -src.zip source attachment. Otherwise, SourcePath.getRelativePath fallbacks to get a ClassPath.getClassPath(fo, ClassPath.COMPILE) that returns a ClassPath provided by DefaultClassPathProvider which is not able to getResourceName(fo,...). It seems that in Issue 66275 http://hg.netbeans.org/main-golden/rev/612151d66b5f they forgot to add special logic to org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl to handle this case. But I'm no expert on netbeans internals so I can be wrong. They thing is that the breakpoints don't work if the source are provided through a -src.zip file instead of a library.
Thanks for your comments, moving to apisupport/projects to evaluate the behavior of org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl
core-main #ee9744e6ecf9