facebook

JSP Debugging: Source not found

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 15 posts - 16 through 30 (of 81 total)
  • Author
    Posts
  • #259399 Reply

    Riyad Kalla
    Member

    aries,
    Create a new web project, add a single new JSP page to the root of it (Use the default JSP template form MyEclipse), set a breakpoint on the scriplet that prints out the basename in the <head> of the file and run it in Tomcat, does that work?

    #259403 Reply

    I created a new web project. If I deploy it inside my existing exploded ear project; then when a break point is hit you get the message “Source not found for xxx._jspService(…)”. If I deploy the web project by itself (i.e. not part of my ear project); then when a break point is hit the debugger works perfectly.

    I will now try to create a new ear project and see if I experience the same issues with my existing ear project. (I just thought I would share my findings in an attempt to possibly help narrow down a resolution). 😀

    Not sure if this will help also but here are my files in my new war project:
    testMe.jsp

    
    <%@ page language="java" buffer="64kb" autoFlush="true" %>
    
    <%
        System.out.println("hello");
        Long foo = new Long(0);
        System.out.println("hello: " + foo);
    %>
    
    <html>
        <head>
            <title>test</title>
        </head>
        <body>
            <h1>HELLO</h1>
        </body>
    </html>
    

    web.xml

    
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" 
        xmlns="http://java.sun.com/xml/ns/j2ee" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    
    </web-app>
    

    weblogic.xml

    
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
        <description>WebLogic Descriptor</description>
    
        <jsp-descriptor>
            <jsp-param>
                <param-name>verbose</param-name>
                <param-value>TRUE</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>pageCheckSeconds</param-name>
                <param-value>1</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>printNulls</param-name>
                <param-value>false</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>debug</param-name>
                <param-value>true</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>keepgenerated</param-name>
                <param-value>true</param-value>
            </jsp-param>
            <jsp-param>
                <param-name>workingDir</param-name>
                <param-value>concorde</param-value>
            </jsp-param>
        </jsp-descriptor>
        <container-descriptor>
            <servlet-reload-check-secs>-1</servlet-reload-check-secs>
            <prefer-web-inf-classes>true</prefer-web-inf-classes>
        </container-descriptor>
    </weblogic-web-app>
    
    #259404 Reply

    After I created a new ear project and associated the new testMe web project to it; the debugger worked (kind of suprised me). Next I will try to rebuild/recreate my existing/development ear project and see if debugging will work (** fingers crossed **)

    #259406 Reply

    Riyad Kalla
    Member

    oh this is very strange, anthony I appreciate you digging in and giving us a running update of your finds. It all helps.

    #259411 Reply

    You thought that was strange; how about this: I re-created my development ear project (I deleted the project in eclipse telling it to not remove the files, then I created a new “Enterprise Application Project” with the same name). The only change I did after that was change the ear project to not automatically update the application.xml (I have to use a custom one for this). And here is the strange part:
    1. When setting break points in the initial pages (i.e. logon.jsp). You get the “Source not found for xxx._jspService(…)” error; however,
    2. When setting a break point in another file, it debugs just fine! (what the heck is going on).

    I thought about this a little more, so then I tried what was originally suggested in this issue (cleaned all projects, re-started eclipse with the -clean argument, and then issued the redeploy command). And, now none of the breakpoints are working again (they work I just get this error stating that the “Source not found…”). 🙁 The last thing I am going to try is to recreate the entire workspace (making sure to only import source files and let eclipse/myEclipse re-create all the metadata and .prefs files). (** all me fingers are crossed this time **)

    #259461 Reply

    Riyad Kalla
    Member

    *pulling out hair* ok keep me posted

    #259481 Reply

    That did it, I had to rebuild the entire workspace (what a pain in the you know what). 🙁 It is extremely time consuming to have to re-setup everything:
    1 EAR project
    1 EJB project
    2 WEB projects
    2 JAVA projects
    3 JAVA APPLETS projects

    Plus having to reset all the workspace settings:
    1. Java compiler
    2. MyEclipse settings
    a) Application Server
    b) Turn off validation
    c) J2EE Project settings
    d) Database explorer
    3. Perspectives, viewes, tasks
    4. All custom launches and remote debug setup as well (ugh).

    Then I had to re-setup the perforce plugin we use to access the source control.

    If I knew I had to rebuild my workspace before upgrading to MyEclipse 5.0 and Eclipse 3.2 I wouldn’t have done it. 🙁 This is also one workspace, I have 2 more workspaces that I need to upgrade as well (we have to have a workspace for each release we are supporting). I may just live without jsp debugging in my other workspaces. 🙁

    Hopefully this will help anyone else having similar issues,

    Anthony

    #259501 Reply

    Riyad Kalla
    Member

    Oh half of me is happy to hear it’s working, the other half has an ulcer. While I can certainly believe that there were settings or plugin state buried somewhere deep down i nthe bowles of the workspace to cause this, it’s frustrating to not be able to help more than I did. I think this thread will be very helpful to others, thank you Anthony.

    #259951 Reply

    Ugh, you are not going to believe this but I can’t debug my JSP’s again. 🙁 I can debug the initial pages (such as logon.jsp) but any other file I am getting the “Source not found for __ …” error again. 🙁 I can’t rebuild my workspace every time this happens (way too time consuming for me) 🙁 Any ideas what may cause this? I really hate using System.out’s for debugging but that it was I am forced to do for the time being.

    #259955 Reply

    Riyad Kalla
    Member

    Ok, before we get too far off course, try this:

    1) Shut down app server
    2) Remove deployment
    3) Go to debug perspective, right click, remove all break points from the break point view (even if there are non listed)
    4) Restart using -clean command line argument
    5) Clean/Rebuild all the projects
    6) Redeploy

    Did that work?

    #259962 Reply

    ;-( That made it worst, now I can’t even debug the startup JSP’s (i.e. logon.jsp). (Can you hear me cry!!)

    #259974 Reply

    Riyad Kalla
    Member

    Can you hear me cry!!

    Not over my own screams unfortunately.

    Anthony I remember you sent me a test workspace a while back, but I don’t have it any longer (for security we clear that stuff out). Would you be able to create a workspace that this fails in and send it to me to beat on and file ASAP? We are planning 5.0.3 bugs right now.

    #259988 Reply

    I just sent you an email with the workspace and a word document showing the issue. HOPEFULLY IT WILL HELP!!!!!!!!!!!!!!!!!!!!! 😀

    Thank you very much for all the help,
    Anthony

    #259992 Reply

    Riyad Kalla
    Member

    You rock, I got the attachment, I’m going to go break the debugger in half.

    #260382 Reply

    rvanbree
    Member

    Replace tomcat with Weblogic and you have my problem. Worked fine before – rebuild ; cleaned; delete dontnotdelete…
    source is there in the dontdelete (keepgenerated=true)…..

Viewing 15 posts - 16 through 30 (of 81 total)
Reply To: JSP Debugging: Source not found

You must be logged in to post in the forum log in