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 134458 - debugging jsp and servlet files with GlassFish v2 ur2 don't work
Summary: debugging jsp and servlet files with GlassFish v2 ur2 don't work
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker with 5 votes (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-03 16:55 UTC by vladperl
Modified: 2008-05-26 08:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
That's my project in NetBeans 6.1 and GlassFish v2 ur2. Try to submit any breakpoint on Servlet or JSP files. (156.54 KB, application/x-compressed)
2008-05-14 21:41 UTC, cibra
Details
Contains the Enterprise project, the table, a text file of where the breakpoints are and the 3 log outputs including the breakpoint submissions (92.16 KB, text/plain)
2008-05-15 11:34 UTC, tomsimmons
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vladperl 2008-05-03 16:55:32 UTC
I installed final version of netbeans 6.1 with supplied version of glassfish.
I put couple of debug points in my jsf application and started it in debug mode.
Problem is that running application doesn't stop when running accross the debug points.
Do I have to test debugging of web application with example supplied with Netbeans?
I'd like to know if somebody else has similar issue.
Looks like not just me has this problem:
http://forums.java.net/jive/thread.jspa?messageID=272535&tstart=0

My jsf application also build as enterprise application.
Comment 1 Peter Pis 2008-05-04 19:06:32 UTC
Reassigning to "debugger" for evaluation.
Comment 2 keltus 2008-05-05 15:19:10 UTC
I have the same troubles with NB 6.1 + Glassfish v2ur2 on Win Vista and an Entreprise application with Visual Web JSF
and EJB.

With this configuration, I have identified an other problem. When I put a Woodstock component in the design page, the
setter and getter are not defined. Then the autocomplete function does not work in the edit mode.
Comment 3 vitellozzo 2008-05-06 17:08:05 UTC
We're experiencing such problem also on Linux Opensuse 10.3, Netbeans 6.1, debugging both against Glassfish V2 ur2
(9.1_02 - build b04-fcs) AND Glassfish V2 (9.1 - b58g-fcs)
Comment 4 tomsimmons 2008-05-11 16:21:01 UTC
Yep, same issue here, vanilla install of 6.1 final release with the supplied Glassfish installed on Vista and XP, 
breakpoints being ignore in an enterprise app.

Sadly I've had to revert to 6.01, can't afford to be without them.

Tom
Comment 5 cibra 2008-05-11 19:10:11 UTC
I have the same problem!! Please solve this problem as soon as possible!!!
Comment 6 Daniel Prusa 2008-05-12 12:50:39 UTC
I cannot reproduce the problem using netbeans jsf sample application. If you have a simple test case, can you attach it,
please?
Comment 7 Daniel Prusa 2008-05-12 12:53:34 UTC
Reassigning to web/jspdebug for evaluation.
Comment 8 Daniel Prusa 2008-05-12 12:57:30 UTC
Duplicate of issue 133189, evaluation has been already done there.

*** This issue has been marked as a duplicate of 133189 ***
Comment 9 vladperl 2008-05-12 20:02:11 UTC
>I cannot reproduce the problem using netbeans jsf sample application. If you have a simple test case, can you attach 
>it,
>please?

Indeed for "JSFJPA" and "CustomerCMP" examples debugging is working.
And I don't have the simple test case to reproduce the problem.
I hope that I will find some time to prepare test case.
Comment 10 cibra 2008-05-14 21:41:21 UTC
Created attachment 61405 [details]
That's my project in NetBeans 6.1 and GlassFish v2 ur2. Try to submit any breakpoint on Servlet or JSP files.
Comment 11 cibra 2008-05-14 21:45:04 UTC
I think that's a different issue... IMHO
Comment 12 tomsimmons 2008-05-15 10:23:27 UTC
Did a bit more testing on this last night, using my project.....

breakpoint in JSP is fine
breakpoint in Facade is fine
breakpoint in a utility class is fine
breakpoint in Backing Bean ignored

The breakpoint I added in the Facade was in a method called by another in the same facade, and the parent method was 
the one being called from the Backing Bean line that I added the breakpoint to.  When it's stopped at the Facade 
breakpoint, if I change back to the Backing Bean code, the line is marked with the gray triangle showing the origin.

The project is an Enterprise app consisting of the 3 projects, the EJB project, and the WEB project, and the umbrella 
project (Backing beans and JSP in the WEB, Facade and utility class in the EJB).

I did try looking at the sample projects, but I couldn't find a project of this structure.  I tried the JSFJPA project 
with a breakpoint in UserManager.createUser, that works.
Comment 13 tomsimmons 2008-05-15 11:34:09 UTC
Created attachment 61428 [details]
Contains the Enterprise project, the table, a text file of where the breakpoints are and the 3 log outputs including the breakpoint submissions
Comment 14 cibra 2008-05-15 12:04:28 UTC
I tried the testcase posted by tomsimmons (ID=61428) and the breakpoints work fine on my NetBeans 6.1!
So I think that's a malformed project problem. I generated twice my project (ID=61405) used both NetBeans 6.01 and 6.1
(Enterprise Application with .jar and .war) and breakpoints don't work in JSP and Servlet files (every files on .war).
Which NetBeans' version did you use to genetate that project?? (ID=61428)

Please try mine!
Comment 15 tomsimmons 2008-05-15 21:13:05 UTC
Another update!!!

If you add a field breakpoint to your Backing Bean then use CTRL + F5 to start, the breakpoints are registered and 
execution stops in the Backing Bean.

Also, if you start with CTRL + F5, then stop the deubgger, SHIFT + F5, then re-attach the debugger (Run menu) then 
line breakpoints work in your Backing Bean.

Cibra, I'm afraid so far I haven't tested servlets, only backing beans and jsp, the only problem I've found being in 
backing beans.  I've only got 6.01 installed here and I'm afraid I don't have the time tonight to install 6.1 again.  
I'll test your project and reply tomorrow.  I also have a project with servlets in of my own I can test tomorrow.  Out 
of interest, how do you launch debugging mode?
Comment 16 cibra 2008-05-16 10:56:17 UTC
I launch debug mode by right-clicking on my project -> "debug". Usually I start Glassfish in debug mode before... but
nothing change! Yesterday I tried my project on NetBeans 6.0 and GlassFish v2 ur1: Every breakpoints work... but there
are some strange messages on the "debugger console" like "Unable to submit breakpoint at *******: line X" and then
"breakpoint successfully submitted at ********: line X" for each breakpoint! (I don't remember exactly the output... but
"X" is the same line!!).
And then I copied the same project, opened it on NetBeans 6.1 and Glassfish v2ur2, but breakpoints don't work! The
"debugger console" don't report anything about those breakpoints!! (I mean ONLY Servlet' and JSP' breakpoints!!)
I can reach those breakpoints by putting other breakpoints in some lines before calling any JSP or Servlet and executing
the code step by step. When I reach a JSP' or Servlet' breakpoint, "debugger console" shows the message "breakpoint
reached at *********: line X" (something like that...!)
So Netbeans is able to reach every breakpoints but not to stop the execution on those!!

Could you try this testcase on other Netbeans' version too??

Thank you!!
Comment 17 cibra 2008-05-16 13:04:01 UTC
IMPORTANT UPDATE!!!

Using my testcase (id=61405), I did those 2 attempts:

FIRST ATTEMPT: 
1)Start GlassFish in "Debug Mode"
2)Menu -> Run -> "Attach Debugger..."
3)The field "host" shows "mycomputername" and I DON'T CHANGE this field's value
4)"Debugger Console" shows that ALL MY BREAKPOINTS (servlet and JSP too!!!) are SUBMITTED!!!
5)Right-click on the project -> Debug
6)BUILD FAILED
7)Right-click on the project -> Run
8)BUILD OK and the program starts!
9)during the execution, ALL BREAKPOINTS ARE REACHED AND PROCESSED!!

SECOND ATTEMPT: 
1)Start GlassFish in "Debug Mode"
2)Menu -> Run -> "Attach Debugger..."
3)The field "host" shows "mycomputername" and I CHANGE IT with "localhost"
4)"Debugger Console" shows that ALL MY BREAKPOINTS (servlet and JSP too!!!) are SUBMITTED!!!
5)Right-click on the project -> Debug
6)BUILD OK and the program starts!
7)during the execution, ALL BREAKPOINTS ARE REACHED AND PROCESSED!!

So this issue is still UNRESOLVED but can be BY-PASSED by these solutions!!
Comment 18 vladperl 2008-05-18 03:38:36 UTC
I tried the Cibra's "First Attempt" and can confirm that worked for my project.
Thank you very much Cibra for finding the way to work around of the issue.
Definitely using debugging saving plenty of time for many people.

By the way I noticed one more weird thing. I opened "Attach" form and port value on this form was empty. 
Then I tried to press OK and netbeans required to define value for port parameter. 
After I put 9009 value in corresponding box debugger was started. 
I believe that in case if port value is undefined system should use the default value.
Comment 19 vladperl 2008-05-25 03:57:28 UTC
NetBeans 6.1 Patch fixed the issue.
Now debugging mode started from project is working with breakpoints in my project.
Comment 20 Dan Kolar 2008-05-26 08:53:38 UTC
v.