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 65120 - Debugger often cannot attach to sun app. server
Summary: Debugger often cannot attach to sun app. server
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Roman Ondruska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-26 13:38 UTC by Jiri Skrivanek
Modified: 2005-09-29 10:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (21.75 KB, text/plain)
2005-09-26 13:39 UTC, Jiri Skrivanek
Details
Server log (90.05 KB, text/plain)
2005-09-26 13:40 UTC, Jiri Skrivanek
Details
Contents of output window. (1.19 KB, text/plain)
2005-09-26 13:41 UTC, Jiri Skrivanek
Details
Proposed patch (1.97 KB, patch)
2005-09-27 15:41 UTC, Jiri Skrivanek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2005-09-26 13:38:13 UTC
Very often debugger cannot attach to sun application server. It gets stuck in
the middle of debug action but IDE is alive. To reproduce:

- run IDE with empty userdir
- add Sun App. server in Runtime view
- create web application project from template
- add breakpoint at index.jsp (e.g. line 18)
- start debugger (F5). Server is started, debugger is started but it never
reaches the breakpoint. If it works try to stop debugger and start it again.

I will attach thread dump and other logs. Debugger console prints 

Attaching to localhost:9009
Attaching to localhost:9009

or 

User Program Running
User Program Running

Build NB5.0 Beta 200509251930 or NB dev 20050926-0457, JDK1.5.0_05, WindowsXP,
sjsas_pe-8_1_02_2005Q2-b11.
Comment 1 Jiri Skrivanek 2005-09-26 13:39:50 UTC
Created attachment 25178 [details]
Thread dump
Comment 2 Jiri Skrivanek 2005-09-26 13:40:10 UTC
Created attachment 25179 [details]
Server log
Comment 3 Jiri Skrivanek 2005-09-26 13:41:04 UTC
Created attachment 25180 [details]
Contents of output window.
Comment 4 Jiri Skrivanek 2005-09-26 14:32:45 UTC
Workaround is to reload page in browser or restart debugger.
Comment 5 Petr Blaha 2005-09-26 14:44:11 UTC
The debugger doesn't work only for Sun App server (with Tomcat we can't
reproduce it). I'm reassign issue to sunappserv8 to evaluate. 
Comment 6 _ ludo 2005-09-26 17:52:33 UTC
does it work with jdk1.5.04?

When you see:
Attaching to localhost:9009
Attaching to localhost:9009
or 
User Program Running
User Program Running"

did you debug twice or only once? this is important: the plugin does not control
these messages emitted by the debugger. Maybe the debugger is starting twice?

You describe the workaround to reload the index page: does it work all the time,
i.e the brkpoint is then reached?
Comment 7 _ ludo 2005-09-26 22:44:50 UTC
Cannot reproduce with JDK1.5.04
I updraged also AS and nb to jdk1.5.)5, and still cannot reproduce.

Petr Blaha, can you confirm you can reproduce this state?

Please attach the domain.xml of this server for analysis.
Comment 8 Petr Blaha 2005-09-27 14:19:56 UTC
Hi Ludo,
I can't reproduce the issue on Linux neither on Win XP machine with the latest
beta build and mentioned jdk. I asked Jirka for testing this more thoroughly and
try to find some reproducible case. 
He was trying to show me the issue on Win XP box and after starting debug
session several time he got this issue. He started debugger (press F5) in very
short sequence and he didn't get warning message about raunning other debugg
session. However, then the issue disappeared :-(.
I suggest to mark the issue as RANDOM.
Comment 9 Jiri Skrivanek 2005-09-27 15:40:42 UTC
It seems to be a problem in debugger JPDA. Debugger states were not fired
accurately. I tried to patch StartActionProvider.java and then it worked without
problems. I asked guys from debugger team to review my changes and integrate
them if it is correct.
Comment 10 Jiri Skrivanek 2005-09-27 15:41:44 UTC
Created attachment 25233 [details]
Proposed patch
Comment 11 Roman Ondruska 2005-09-27 16:41:36 UTC
Should be fixed (thanks to Jirka Skrivanek):

Checking in StartActionProvider.java;
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StartActionProvider.java,v
 <--  StartActionProvider.java
new revision: 1.20; previous revision: 1.19
done
Comment 12 Jiri Skrivanek 2005-09-29 10:34:28 UTC
Verified in build 20050928-1818.