Bug 199580 - Line breakpoint in servlet always invalid
Line breakpoint in servlet always invalid
Status: CLOSED WONTFIX
Product: serverplugins
Classification: Unclassified
Component: WebLogic
7.0.1
PC All
: P2 (vote)
: 7.0.1
Assigned To: Martin Entlicher
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-21 12:18 UTC by Jiri Skrivanek
Modified: 2011-11-28 11:51 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
fastswap stacktrace (2.19 KB, text/plain)
2011-11-16 12:40 UTC, Petr Hejl
Details
standard stacktrace (1.77 KB, text/plain)
2011-11-16 12:41 UTC, Petr Hejl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2011-06-21 12:18:34 UTC
It is not possible to submit line breakpoint in servlet in web application with WebLogic server. It works if servlet is in web application inside enterprise application. It also works in NB7.0 (related to bug 65969). To reproduce:

- create java web application with WebLogic server
- create new servlet
- toggle line breakpoint at executable line. It seems valid.
- debug project. Once debugger is started, the breakpoint is invalidated

Not able to submit breakpoint LineBreakpoint NewServlet.java : 35, reason: No executable location available at line 35 in class w.NewServlet.
Invalid LineBreakpoint NewServlet.java : 35

- it is possible to toggle method breakpoint and when debugger stops at method breakpoint it is possible to iterate over all lines of code

Product Version: NetBeans IDE 7.0.1 RC1 (Build 201106202100)
Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b15
System: Windows XP version 5.1 running on x86; Cp1250; en_US (nb)
Comment 1 Petr Hejl 2011-11-10 14:02:10 UTC
It looks like this happens with fast swap enabled - in runtime the class is using some proxy.
Comment 2 Petr Hejl 2011-11-16 12:38:58 UTC
I'm afraid there is not much we can do in serverplugin (except disabling fastswap).

Martine could you look into this? Can debugger somehow stop even on changed location? Should WL runtime provide WL runtime line numbers for every stack element event in fastwap (and thus is this a WL issue)?

I'll attach two stacktraces from simple servlet throwing an exception to show the difference.
Comment 3 Petr Hejl 2011-11-16 12:40:49 UTC
Created attachment 113253 [details]
fastswap stacktrace
Comment 4 Petr Hejl 2011-11-16 12:41:12 UTC
Created attachment 113254 [details]
standard stacktrace
Comment 5 Petr Hejl 2011-11-16 14:38:06 UTC
Discussed with PetrJ - P2.
Comment 6 Martin Entlicher 2011-11-16 18:40:39 UTC
I do not think we'll be able to do anything about it.
The class in question is class test.NewServlet (loaded by instance of com.bea.wls.redef.RedefiningClassLoader(id=1133))
This class has a method "processRequest".
But when I ask for it's bytecode, it gives me just an array of length 7: [42, 43, 44, -72, 0, 103, -79]. It's clear that this is not the original method body.
Query for all line locations throws an AbsentInformationException and method location has line -1.
The class has 67 methods! There is a bunch of bea...() methods, therefore the class loader performs some redefinitions.

I do not think we're able to retrieve the information which is not provided.
I've tried to search some information about FastSwap, but was not much successful, if you know about some configuration options that add the line locations, it would fix the problem.

This can not be fixed on debugger side AFAIK. Moving back to Weblogic.
Comment 7 Petr Hejl 2011-11-21 10:36:00 UTC
(In reply to comment #6)
> I do not think we'll be able to do anything about it.
> The class in question is class test.NewServlet (loaded by instance of
> com.bea.wls.redef.RedefiningClassLoader(id=1133))
> This class has a method "processRequest".
> But when I ask for it's bytecode, it gives me just an array of length 7: [42,
> 43, 44, -72, 0, 103, -79]. It's clear that this is not the original method
> body.
> Query for all line locations throws an AbsentInformationException and method
> location has line -1.
> The class has 67 methods! There is a bunch of bea...() methods, therefore the
> class loader performs some redefinitions.
> 
> I do not think we're able to retrieve the information which is not provided.
> I've tried to search some information about FastSwap, but was not much
> successful, if you know about some configuration options that add the line
> locations, it would fix the problem.
> 
> This can not be fixed on debugger side AFAIK. Moving back to Weblogic.

Martine, could you please file a bug to WL runtime (product 5242 on bug.oraclecorp.com). You can specify your requirements more precisely than me and discuss the details with WL guys. In case this could not be fixed we may decide to disable fastswap.

BTW Information on fastswap I used is here (no technical details unfortunately) http://download.oracle.com/docs/cd/E12840_01/wls/docs103/deployment/deployunits.html#wp1053872
Comment 8 Martin Entlicher 2011-11-23 10:15:31 UTC
I've submitted
https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=13423091
for this problem.
Comment 9 Martin Entlicher 2011-11-23 10:31:28 UTC
FYI: Stepping is possible, but it's performed in class NewServlet$beaVersion0_2. If you're able to provide this class from:
ElementUtilities.getBinaryName(CompilationController.getTreeUtilities().scopeFor(offset).getEnclosingClass()) you will probably fix this.
Comment 10 Martin Entlicher 2011-11-23 10:33:23 UTC
But if the class name is changed after each fastswap, it would break the breakpoints functionality anyway.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo