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 134276 - Missing Sources makes web in ear debugging difficult
Summary: Missing Sources makes web in ear debugging difficult
Status: RESOLVED FIXED
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:
: 147122 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-30 17:26 UTC by Vince Kraemer
Modified: 2010-04-07 03:11 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed fix (9.83 KB, text/plain)
2008-05-06 10:45 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vince Kraemer 2008-04-30 17:26:42 UTC
Breakpoints in the java source of a web app embedded in and ear are skipped/ignored.

Steps to reproduce.

1. Create a new enterprise application and include a web app and an ejb module.
2. create a stateless session bean in the ejb module.
3. add a method to the module.
4. create a servlet in the web app.
5. uncomment the boiler-plate code in the processRequest method of the servlet
6. call the ejb's method somewhere in processRequest.
7. set a bp in the ejb method
8. set a bp in the servlet's processRequest method... somewhere BEFORE the ejb's method is called.
9. Debug the ear project.
10. enter the url to fire the servlet
   the BP in the ejb is hit.  the BP in the servlet is skipped.

Notice the following message in ant output...

Incrementally deploying DebugTest_localhost:4848_server
Completed incremental distribution of DebugTest
connect-debugger:
Non-existing path "/export/home/vkraemer/j12008/NetBeansProjects/DebugTest/${javac.classpath}" provided.
Non-existing path "/export/home/vkraemer/j12008/NetBeansProjects/DebugTest/${run.classpath}" provided.
Attached JPDA debugger to localhost:9009
debug-display-browser:
Browsing: http://localhost:8080/DebugTest-war/

Open the Sources view... and notice that there are two source path entries...

.../EarName/EarName-ejb/src/java
.../EarName/EarName=war/web

If I add the following path to the Sources list, debugging the web app's java code seems to work correctly

.../EarName/EarName-war/src/java
Comment 1 David Konecny 2008-05-06 10:45:53 UTC
Created attachment 61076 [details]
proposed fix
Comment 2 David Konecny 2008-05-06 10:48:06 UTC
Tomas, this is regression caused by java.api.common refactorings. Could you please review my fix and tell me whether
there are some other places/modules which may need similar fix? Thanks, -D

This is potential candidate for 6.1.x patch release.
Comment 3 Tomas Mysik 2008-05-06 11:59:02 UTC
The patch looks fine to me, only two minor notes:

TM01 I prefer Lists to Arrays but this is nothing important.
TM02 Coding style - "String testBinaryProperties[]" should be "String[] testBinaryProperties" (incorrect position of [ 
and ]).

Davide, thanks for fixing this issue and sorry about this regression.
Tomas
Comment 4 David Konecny 2008-05-06 23:01:20 UTC
TM01 - I will stick with array in this instance - the params are static and there are no operation on them so array is ok
TM02 - ok

Fixed in 684faf9e5f94.
Comment 5 Quality Engineering 2008-05-07 04:50:41 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #180 build
Changeset: http://hg.netbeans.org/main/rev/684faf9e5f94
User: David Konecny <dkonecny@netbeans.org>
Log: #134276 - SFBQ and JFBQ were broken because web project uses 'dist.war' instead of J2SE's 'dist.jar'
Comment 6 Dan Kolar 2008-05-12 10:50:00 UTC
v. in trunk build 20080510193218
Comment 7 pgebauer 2008-05-12 11:39:38 UTC
Marked as VERIFIED based on the comment above.
Comment 8 pslechta 2008-05-12 12:22:54 UTC
The fix has been ported into the release61_fixes branch.

http://hg.netbeans.org/release61_fixes/rev/0c7040ff9b39
Comment 9 Martin Entlicher 2008-09-13 12:36:23 UTC
*** Issue 147122 has been marked as a duplicate of this issue. ***
Comment 10 ymajoros 2008-10-15 12:57:02 UTC
not fixed on 6.1, latest patches; see
http://www.nabble.com/unable-to-debug-servlet-or-web-application-td17426704.html#a19991775
Comment 11 David Konecny 2008-10-15 21:36:03 UTC
I installed 6.1 and updated it first to get the latest patch. I followed the steps in this issue to reproduce the
problem but everything worked fine. I tried debugging simple Web project with a servlet and debugger stopped on a
breakpoint in the servlet class as well. Please provide steps how to reproduce and file them as new issue. Thanks.
Comment 12 northar 2010-04-03 23:53:19 UTC
This error is reproducable on netbeans 6.8 as Vince Kramer describes in the first comment. It worked fine in 6.7.1, and so, could it be a regression?
Comment 13 David Konecny 2010-04-07 03:11:35 UTC
Please file a new issue for this problem - this one was resolved for NB 6.5, It is always possible there is a regression. Although I cannot reproduce it. It works fine for me. The only related problem I found was Step Into which does not work correctly and I filed that one as  Bug 183614. Thanks.