facebook

[Closed] Problems debugging tomcat JSP

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

    ismoore999
    Member

    Hi
    I have a tomcat 5.5.20 application that I am trying to debug in myEclipse.
    I have just installed MyEclipse demo as we are thinking of moving to it so it is possible I am doing something wrong.
    When I insert a break point the application does not break.
    I have tried creating a test application and that works fine – the break point is activated each time.
    However this does hot happen on application I am trying to debug. I have tried different breakpoints in different places but to no avail.

    The tomcat startup is as below:
    26-Jul-2007 11:05:32 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    26-Jul-2007 11:05:32 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1489 ms
    26-Jul-2007 11:05:32 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    26-Jul-2007 11:05:32 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
    26-Jul-2007 11:05:32 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    26-Jul-2007 11:05:34 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    26-Jul-2007 11:05:35 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    26-Jul-2007 11:05:35 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/403 config=null
    26-Jul-2007 11:05:35 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3227 ms

    Installation Summary:
    *** Date:
    Thursday, 26 July 2007 11:19:09 o’clock BST

    ** System properties:
    OS=Linux
    OS version=2.6.13-15.15-default
    Java version=1.6.0

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 6.0.0 M1
    Build id: 20070629-6.0.0-M1

    *** Eclipse details:
    Eclipse Platform

    Version: 3.3.0
    Build id: I20070621-1340

    Eclipse Plug-in Development Environment

    Version: 3.3.0.v20070607-7N7M-DUUEF6Ez0H46IcCC
    Build id: I20070621-1340

    Eclipse Platform

    Version: 3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G
    Build id: I20070621-1340

    Eclipse Graphical Editing Framework

    Version: 3.3.0.v20070620
    Build id: 20070620-1021

    Eclipse RCP

    Version: 3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG
    Build id: I20070621-1340

    Eclipse Java Development Tools

    Version: 3.3.0.v20070606-0010-7o7jCHEFpPoqQYvnXqejeR
    Build id: I20070621-1340

    Eclipse Graphical Editing Framework

    Version: 3.3.0.v20070620
    Build id: 20070620-1021

    Eclipse startup command=-os
    linux
    -ws
    gtk
    -arch
    x86
    -showsplash
    -launcher
    /opt/eclipse_europa/eclipse
    -name
    Eclipse
    –launcher.library
    /opt/eclipse_europa/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.0.v20070606/eclipse_1017a.so
    -startup
    /opt/eclipse_europa/plugins/org.eclipse.equinox.launcher_1.0.0.v20070606.jar
    -exitdata
    58d78022
    -vm
    /opt/java/jre1.6.0/bin/java

    #273184 Reply

    ismoore999
    Member

    Just some more information on this – if I add a break point into the java code, it stops in the debugger – it only seems to fail for JSP’s

    #273236 Reply

    Loyal Water
    Member

    Make sure your MyEclipse Tomcat connector is setup to launch Tomcat in debug mode, not Run mode.

    Also, try shutting down Tomcat, removing your deployment, cleaning/rebuilding your project, then going to your debug perspective, selecting the Breakpoints view, right clicking and selecting Remove All, then restarting MyEclipse using the -clean command line argument. Then recreate your project deployment, set a break point and run it, did it work?

    #273354 Reply

    ismoore999
    Member

    thanks for the information. sorry for the delay in getting back to you – I was away for a few days.
    I have tried all of the above (twice just to make sure I had not omitted anything) but it still does not work.
    To confirm, the connector is set to launch in debug mode ( ie the checkbox is set to debug)

    Ian

    #273370 Reply

    ismoore999
    Member

    Just another test. I created a new web project from scratch and added one JSP with a breakpoint, redeployed that with the server and all works fine.
    It is definitely something related to this one project as far as I can make out.
    One other bit of information – the project in question was an existing web project and was “converted” into a MyEclipse web project. It is possible therefore that I have done something wrong.
    I am happy to check it out again and retry to see if it works. Do you have any information on how a project can be imported – the one key issue I had at first was that the “root” of the web deployment is set to a directory “web” not webApp and I could not edit this easily. I eventually created a new project with web as its web root and moved the other information below it, including moving the classes etc and rebuilding the project path.

    #273396 Reply

    Loyal Water
    Member

    The project in question was an existing web project and was “converted” into a MyEclipse web project.

    How did you convert this project to a MyEclipse web project ? The import functionality can be used only to import MyEclipse projects.

    The best way to import your project would be to create a new Web Project in MyEclipse and copy paste parts from your old project.

    #273483 Reply

    ismoore999
    Member

    I did as you suggested and you are right that it works. It has been a bit of a struggle.

    As I may transfer other projects, is there any plan to make the import or at least the “Add Web project” capabilities or should I raise the problem as a bug?

    Just in case anyone wants to know there are the steps I took. (I have marked some SVN as I needed to configure it for source control)

      SVN: if not available already, check out the project
      Import existing project into the workspace. Make sure that the name is not the same as the project you require as this version will be deleted afterwards.
      Create new web project, making the web root “web” and the source directory web/WEB-INF/src/java
      Open up both the existing project and the new project in eclipse
      Using copy and paste in eclipse, take all of the files from the exising project into the new project. Do not try copying at command level as this does not appear to work. You may get errors regarding existing directories within eclipse, therefore if there are directories that already exist, you are better to copy from inside that directory. There will be few in a new project
      SVN: Exit eclipse
      SVN: to copy the SVN files, go into the project directory of the existing project and do

      tar cvf ../svn.tar `find . -name ".svn"`

      SVN: go to the new project and untar this file.
      SVN:Startup eclipse
      SVN:Refresh the project to see the SVN entries

    you may want to check that your web.xml and context.xml files are as expected
    That is it!

    #273489 Reply

    Loyal Water
    Member

    is there any plan to make the import or at least the “Add Web project” capabilities

    We do have Add Web Project Capabilites option under the MyEclipse menu option. Is that what your talking about?

    #273518 Reply

    ismoore999
    Member

    …and I should have completed the sentence to say “is there any plan to make the import or at least the “Add Web project” capabilities allow an existing project to be converted into a MyEclipse Web Project that would allow the JSP’s to be edited.”

    This is the action I had tried but it did not succeed.

    Regards
    Ian

    #273529 Reply

    Loyal Water
    Member

    An existing porject cannot be converted to a MyEclipse project like this. There is no plan to add such a functionality in our next release but ill take this as a feature request.

    Thanks for this post.

    #273604 Reply

    ismoore999
    Member

    Excellent – thanks for all your help.
    Regards
    Ian

    #273620 Reply

    Loyal Water
    Member

    Your welcome…

    #274668 Reply

    ismoore999
    Member

    Just a quick addition to this one – I have found that now the GA release is installed, this is no longer a problem and that even on existing projects I can now debug JSP’s without issue. If this is a fix – many thanks to the team!

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: [Closed] Problems debugging tomcat JSP

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