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 debugging a web application that is part of an enterprise project, source code of web project libraries is missing, and the debugger treats it as hidden. This is very irritating and frustrating, especially because one can view the source code. This can be reproduced as follows: Create a Wicket web project (requires the installation of the Wicket plugin) Menu|New Project|Java Web|Web Application|Next Server: GlassFish 2.1 Frameworks: Wicket 1.4 (from installed plugin) Finish. public HomePage() { System.out.println("Hello"); } Set a breakpoint on this line and debug the application. In the Debug Sources window, the Wicket library is included as expected. Undeploy the web project from the server. Create a Java EE Enterprise application. Uncheck "Create EJB Module" Uncheck "Create Web Application Module" Add the web module to the new enterprise application. In the enterprise application properties, Run, enter the relative URL /wicket as copied from the web module. Debug the the enterprise application. In the Debug Sources window, the Wicket library is NOT included as expected.
It works for me with libraries used in JavaSE projects. Can you please let me know where did you get the Wicket plugin from? I did not find it among "Available Plugins" in 6.8 dev build.
Sorry for the inconvenience. The plugin is at http://www.netbeans.org/issues/show_bug.cgi?id=174818
bht, you've added a link to *this* issue, you probably mean some other issue...
Sorry, the plugin is at: http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3586
Reproduced. Wicket library is not included. But debugger shows just what the project provides. The classpath debugger gets through nbjpdaconnect is /home.local/martin/NetBeansProjects/EnterpriseApplicationWicket/${javac.classpath}:/home.local/martin/NetBeansProjects/WebApplicationWicket/dist/WebApplicationWicket.war and sourcepath /home.local/martin/NetBeansProjects/WebApplicationWicket/web Therefore we show just /home.local/martin/NetBeansProjects/WebApplicationWicket/src/java and /home.local/martin/NetBeansProjects/WebApplicationWicket/web, we do not know anything about wicket-1.4.0-sources.jar
Vince, I cannot recollect why but I think that this is as designed - if WAR (packaged in EAR) depends on a library then that library has to be explicitly listed in EAR's project properties in "Libraries" category in "Embedded Classpath Elements" list. Is that true or was that one designed for something else? Do you remember? I must say it is strange that debugging WebApp which is using Wicket Framework should make Wicket sources available in EAR's debugging automatically. But code does not seem to cater for that case. So what are your thoughts Vince? Thanks!
No... the 'design' is a work-around for a bug in the way the classpath of a project is calculated. I filed an enhancement for this some time in the past... http://www.netbeans.org/issues/show_bug.cgi?id=52273... Others have filed similar issues against j2se projects... Last I checked, most of them were closed... I do not know whether they have been fixed.
Thanks for the issue Vince - I completely forgot about it (it was filed in 2004!). bht, till issue 52273 gets fixed you can "workaround" this by adding Wicket library to "Embedded Classpath Elements" in EAR's project properties (Libraries category) and it will work as expected. *** This issue has been marked as a duplicate of 52273 ***