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 188670 - Invalid LineBreakpoint in basic Server Application
Summary: Invalid LineBreakpoint in basic Server Application
Status: RESOLVED WORKSFORME
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P1 normal (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 19:30 UTC by bht
Modified: 2010-07-28 14:11 UTC (History)
0 users

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 2010-07-14 19:30:09 UTC
How to reproduce the bug:

File|New Project|Samples|Servlet Stateless (Java EE6)|Finish

In Projects window, project ServletStateless|Right click|Properties|Run
Change from "GlassFish Server 3" to "GlassFish Server 3 1"|OK

- Projects Window|Right click on project|Properties
- Run|Deploy on Save: uncheck it

In StatelessSessionBean.java,
Set a breakpoint on this line:

return "Hello, " + name + "!\n";

In Services Window|Servers|GlassFish Server 3 1|Right click|Stop
- Projects Window|Right click on project|Clean and build
- Projects Window|Right click on project|Debug
LineBreakpoint StatelessSessionBean.java : 39 successfully submitted.

Debugging works.

Insert code above breakpoint as follows:
    public String sayHello(String name) {
        if(name != null){
            throw new Error();
        }
        return "Hello, " + name + "!\n";
    }

and set breakpoints on new code.

Not able to submit breakpoint LineBreakpoint StatelessSessionBean.java : 39, reason: No executable location available at line 38 in class servlet.stateless.StatelessSessionBean.
Invalid LineBreakpoint StatelessSessionBean.java : 39

- Projects Window|Right click on project|Clean and build

Breakpoint is still broken.
- Projects Window|Right click on project|Debug
Breakpoint is still broken.
Debugger does not stop on broken breakpoint
- Try to set and unset breakpoint
Not able to submit breakpoint LineBreakpoint StatelessSessionBean.java : 39, reason: No executable location available at line 38 in class servlet.stateless.StatelessSessionBean.
Invalid LineBreakpoint StatelessSessionBean.java : 39

...

In practice, with my project, whenever I am in trouble and I make some code changes to see what is happening, then I am distracted by this failure, so NetBeans breaks when I need it the most.
Comment 1 Martin Entlicher 2010-07-28 14:11:18 UTC
Reproduced.
But you have unchecked Deploy on Save. Therefore after you modify the program, you have still the old code deployed on the server. Therefore the breakpoint is broken.
After I've deployed the project again, I was able to debug without problems.