facebook

JSP Source debugging in Tomcat 5 problems [Closed]

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #200372 Reply

    sc1969
    Member

    Hello and Happy T- Day,

    Real quick question this morning – I’m considering making the big jump from a well known IDE to Eclipse, and since most of my work is in the J2EE realm, naturally I was interested in the MyEclipse Plugin. For me to feel comfortable doing this, and thus recommending to our team the same, I wanted to feel comfortable in two areas, both in debugging. I need to be able to do JSP source debugging / Java source debugging in Tomcat 5 ( which I understand that it supports the JS045), and I need to be able to do Java Source debugging in 9ias/Oc4j (which i understand doesn’t as of yet support the spec).

    I read through the documentation and followed numerous posts, ending with this one: https://www.genuitec.com/forums/topic/tomcat-5-on-windows-closed/ – specifically the versions recommended at that point – my set up is identical except for the eclipse version, which is 2.1.2

    Thus the following issues I’m having…

    #1 I cannot for the life of me get the JSP source debugging to happen – it complains that it cannot find the source for line# xxx – in otherwords it seems as though it either can’t map between the jsp source and the generated servlet, or it can’t find the generated servlet at all. I CAN get the Java source debugging to work just fine. The app I’m testing with is about as basic as it gets – one test jsp with a breakpoint set, and one test class called from the jsp with a string assignment spread over three lines to make it easier to verify watches etc..

    settings:
    – Home/Base dir: C:\Tomcat 5.0
    – Temp: C:\Tomcat 5.0\temp

    #2 I cannot get the Java source debugging to occur in the stand alone oc4j container – it does copy the source to the /j2ee/application-autodeploy directory, and does kick the server off, but once oc4j is up and running, I don’t see that it’s copied it over to the /j2ee/home/applications directory, nor when I hit localhost:8888 does it recognize the test web context for this test app

    settings:
    – Oracle AS Home Dir: C:\OC4J\j2ee\home
    Ormi port is the default

    A lot to hit you with on Thanksgiving – thanks in advance for any help you can give

    — sc

    —————————————————————–
    What operating system and version are you running?
    Windows XP

    What Eclipse version and build id are you using?
    2.1.2

    Was Eclipse freshly installed for MyEclipse?
    Yes – both new installs

    Are any other external plugins installed?
    No

    How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    7

    What MyEclipse version are you using?
    Version: 2.6.4
    Build id: 200311041200

    What JDK version are you using to run Eclipse? (java -version)
    1.4.2_02

    What JDK version are you using to launch your application server?
    1.4.2_02 for Tomcat
    1.3.1_07 for OC4J

    What steps did you take that resulted in the issue?
    see above

    What application server are you using?
    9ias/OC4J, Tomcat 5.0

    Are there any errors in the Eclipse log? (<workspace>/.metadata/.log)
    none

    #200390

    Scott Anderson
    Participant

    I’ll do these in reverse order. The most likely problem with #2 (OC4J) is that the server.xml file needs to be configured to autodeploy applications, which by default it is not. The outer tag needs to look something like this:

    
    <application-server application-directory="../applications"
     application-auto-deploy-directory="../application-autodeploy"
     deployment-directory="../application-deployments"
     connector-directory="../connectors"
    >
    

    That should get you debugging on OC4J, but please bear in mind that hot swap debugging is only available when using JDK 1.4+ JVM’s since it relies on modifications to the debugger API’s that are only available since 1.4. “Regular” debugging should work fine though.

    On #1: Tomcat
    Have you changed any of the default Tomcat settings? Are you deploying using our deployers? Exploded or archive format? Is the debugger stopping at the breakpoint in the JSP and just failing source lookup? You’re not deploying yourself using Ant or anything, right?
    One other possibility is the JDK. There have also been reports on the Eclipse newsgroups as well as on our forums of problems with the latest build of 1.4.2 (1.4.2_02). Could you try launching Tomcat with JDK 1.4.1 and see if debugging works properly on that configuration for you?

    –Scott
    MyEclipse Support

    #200393

    sc1969
    Member

    Scott –

    Thanks for your reply –

    “The most likely problem with #2 (OC4J) is that the server.xml file needs to be configured to autodeploy applications, which by default it is not.”

    This seems to be the problem, although in order for that to work, it has to be deployed as an .ear file, which ours would be – so in a nutshell, solved ;c)

    On #1: Tomcat
    “Have you changed any of the default Tomcat settings?”

    No, it’s the default install

    “Are you deploying using our deployers?”
    Yes – via the ‘Deploy J2EE project to server’ icon

    Exploded or archive format?
    exploded format – does it need to be packaged as .war?

    “Is the debugger stopping at the breakpoint in the JSP and just failing source lookup? “
    exactly the problem, which made me think somehow it isn’t finding the mapping to the generated servlet, which I did confirm existed in ‘C:\Tomcat 5.0\work\Catalina\localhost\<site name>\org\apache\jsp\’

    “You’re not deploying yourself using Ant or anything, right? “
    Nope, using the MyEclipse deployer

    “One other possibility is the JDK. There have also been reports on the Eclipse newsgroups as well as on our forums of problems with the latest build of 1.4.2 (1.4.2_02). Could you try launching Tomcat with JDK 1.4.1 and see if debugging works properly on that configuration for you?”

    Thanks again for your reponse – will let you know what I find on Tomcat/JDK 1.4.1

    –sc

    #200395

    Scott Anderson
    Participant

    SC,

    Yep, OC4J doesn’t support exploded deployment using autodeploy so you are correct that archived is a must in this case. However, debugging should still be fine.

    “Is the debugger stopping at the breakpoint in the JSP and just failing source lookup? ”
    exactly the problem, which made me think somehow it isn’t finding the mapping to the generated servlet, which I did confirm existed in ‘C:\Tomcat 5.0\work\Catalina\localhost\<site name>\org\apache\jsp\’

    The file being mapped to is not a generated .java file, but to the JSP source file itself. As a result, the servlet file doesn’t need to be generated.

    Also, which version of Tomcat 5 are you using? I believe there was a problem with beta 3, for example.

    –Scott
    MyEclipse Support

    #200403

    sc1969
    Member

    Scott –

    I reinstalled JDK 1.4.2, and everything seems great, so all problems solved. Thanks for the quick replies!

    –sc

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: JSP Source debugging in Tomcat 5 problems [Closed]

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