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.

Bug 174818 - Web Project Library Sources missinig when debugging containing Enterprise Project
Summary: Web Project Library Sources missinig when debugging containing Enterprise Pro...
Status: RESOLVED DUPLICATE of bug 52273
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-17 20:32 UTC by bht
Modified: 2009-10-28 20:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2009-10-17 20:32:25 UTC
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.
Comment 1 Martin Entlicher 2009-10-22 16:35:53 UTC
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.
Comment 2 bht 2009-10-22 19:05:54 UTC
Sorry for the inconvenience.
The plugin is at
http://www.netbeans.org/issues/show_bug.cgi?id=174818
Comment 3 Martin Entlicher 2009-10-23 12:57:40 UTC
bht, you've added a link to *this* issue, you probably mean some other issue...
Comment 5 Martin Entlicher 2009-10-26 14:58:48 UTC
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
Comment 6 David Konecny 2009-10-28 04:02:37 UTC
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!
Comment 7 Vince Kraemer 2009-10-28 06:52:35 UTC
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.
Comment 8 David Konecny 2009-10-28 20:37:26 UTC
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 ***