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.
It is not possible to debug web applications on WebLogic server. I found two different cases. Please, let me know if you want me to file another issue for second. 1) - start IDE - add WebLogic server in Runtime view - create new Web Application project and select WebLogic server in wizard - add breakpoint to index.jsp - start debugger (F5). It starts but breakpoint is never reached. Neither when you reload page in browser. 2) - use web application from case 1 - create new Servlet - add breakpoint to servlet - finish debugging (if still running) - start to debug servlet (Ctrl+Shift+F5) - it reaches breakpoint successfully - press F7 but it accidentally continues and additionally servlet is never shown in browser. Build 20051005-0426, WindowsXP, JDK1.5.0_05, WebLogic9.0.
I have tested it and have also same problem with same system configuration.
#1 fixed. Checking in actions/JspToggleBreakpointActionProvider.java; /cvs/web/jspdebug/src/org/netbeans/modules/web/debug/actions/JspToggleBreakpointActionProvider.java,v <-- JspToggleBreakpointActionProvider.java new revision: 1.8; previous revision: 1.7 done Checking in util/Utils.java; /cvs/web/jspdebug/src/org/netbeans/modules/web/debug/util/Utils.java,v <-- Utils.java new revision: 1.32; previous revision: 1.31 done Issue for the #2 will be filed.
Previous fix is only a workaround because there are some problems on the WL side and even on the NB side. The workaround is not to allow user to set BP when WebLogic 9 is selected as the target server of the owning project. It can be a little bit confusing when a user uses other server supporting JSP debugging and sets some BPs. When she later switches to WL9, the BPs will remain set but debugger will ignore them. Here is the list of problems to solve to make debugging on WL fully functional: 1. [NB side] NB expects class with package org.apache.jsp.* but WL generated servlet into jsp_servlet package by default. We should ask server plugin for the correct extension. See issue 66407. 2. [NB side] The Location's source path is taken from the servlet's source path, e.g. we have following structure: webmodule.jar |---index.jsp |---subdir |---pagexy.jsp ...and default package prefix (jsp_servlet). Then following source path for JSP pages is returned: index.jsp.....jsp_servlet/index.jsp (we expect index.jsp) d/pagexy.jsp.....jsp_servlet/_d/pagexy.jsp (we expect d/pagexy.jsp) Generally we expect a relative path from the web module root. It should obtained from the server plugin. See issue 66409. 3. [WL side] Wrong SMAP extension in the servlet's class file causes that we cannot obtain the location for the line where JSP BP is set. E.g. servlet class for the page index.jsp generated for the web project does not contain mapping for line 22 (the page will be attached).
Created attachment 25771 [details] index.jsp generated in the current build, i.e. 051007
4. Current fix compares server ID returned from J2eeModuleProvider with hard-coded WL server ID (WebLogic9). Better weay is to ask server whether it supports JSP debugging or not, see issue 66447.
QA agreed to postpone JSP debugging on WL to the next release, thus TM set to 'future' and issue type to 'enhancement'.
Case 2 (cannot debug servlet) filed separately as issue 66464.
Item 3 [WL side] is not correct, mapping seems to be good when comparing to the Servlet source. WL does not map all lines, instead it treats the continual block of the HTML code as a one line in the Servlet. I expect that Java code will be mapped as expected. It might be a little bit confusing for the user bcs NB allows him to set breakpoint whereever but debugger will not stop. On the other hand in fact a user does not want to step through the HTML code, thus the limitation is insignificant. Attaching JSP, Servlet and the class file with the SMAP extension.
Created attachment 28243 [details] index.jsp generated in the current build, i.e. 060102
Created attachment 28244 [details] Servlet generated for index.jsp
Created attachment 28245 [details] Compiled servlet with SMAP extension
Created attachment 28248 [details] server-spec descr. used for a Servlet code keeping
Not sure if anything has improved in the last 3 years that would make this possible. Also not sure what the situation is with the latest version of WebLogic.
*** Bug 189072 has been marked as a duplicate of this bug. ***
Use case 2) works now.
Created attachment 104869 [details] The first version of patch. The patch is not yet ready for integration, but in general it should work. The big problem (and hack) is in EngineContextProviderImpl. The source file for index.jsp is reported as jsp_servlet/index.jsp and IDE can't open the source. This is hacked in EngineContextProviderImpl - I think the correct approach would be a hook into JPDA debugger and "normalize" the path. Note that the debugging of JSPs on WebLogic only works for Java code due to way how JSP servlets are generated on WL.
Created attachment 104880 [details] The second version of the patch
I pushed the patch to web-main branch serverplugins-next d55b0fb86a99.
For the record - fixed c&p bug web-main serverplugins-next 220848aebd38.
This issue does not really depend on 66447.
Integrated into 'main-golden', will be available in build *201104220000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/d55b0fb86a99 User: phejl@netbeans.org Log: #65969 [67cat] Cannot debug web application on WebLogic
JSP debugging still does not work for me in NetBeans 7.4.
(In reply to Jiri Skrivanek from comment #22) > JSP debugging still does not work for me in NetBeans 7.4. For the record (one of previous comments): Note that the debugging of JSPs on WebLogic only works for Java code due to way how JSP servlets are generated on WL. So now it is semi-working and hard to tell whether this will ever be fixed.