facebook

Testing and debugging with Tomcat

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #279751 Reply

    Jon Ericson
    Member

    I have been in a develop / deploy / test cycle with myEclipse to Tomcat. I have been starting the Tomcat container from outside of Eclipse (by executing the startup script from windows)

    My problem is that i can’t seem to work with Tomcat within eclipse. I deploy to Tomcat, but when i start Tomcat from within Eclipse (by selecting the icon from the ide menu bar) the application does not load. I get a 404 error when I try to access my JSP and HTML pages. Tomcat is starting okay from within Eclipse (I get a console spew) and I can get to the manager screen (http://127.0.0.1:8080/), but I cannot see the application in the Tomcat manager panel. When i start Tomcat from outside the IDE, the applications work fine including the manager screen (where the application is displayed), but I cannot debug in this mode.

    My project deployment is defined:

    C:\Tools2007\apache-tomcat-5.5.23\webapps\shopapps

    My Tomcat Base and Home directory is defined to Eclipse at:

    C:\Tools2007\apache-tomcat-5.5.23

    My Eclipse workspace & project is located at:

    C:\Tools2007\workspace\shopapps

    What am i doing wrong?

    Thank you for your help.

    #279754 Reply

    Loyal Water
    Member

    Can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.

    Can you switch to a new workspace, create a new project and try deplyoing that. Does it work ?

    #279769 Reply

    Jon Ericson
    Member

    Hi Nipun,

    I did what you suggested. I created a new workspace, created a new project, etc. The project has one simple “Hello World” class, compiled, and when I go to deploy it I get this error message:

    “Error Creating Deployment” – The selected service is enabled but not configured properly. Deployment to it will not be permitted until the problem is corrected. Please navigate to the server preference pages and verify the field with the prompt: Tomcat JDK name.

    On the same message box is a linke, “show preference page”, I click on it, and it takes me to the preference page. The Tomcat 5 selections are:

    Enable/Disable (Enabled)
    Tomcat Home Directory: C:\Tools2007\apache-tomcat-5.5.23
    Tomcat Base Directory: C:\Tools2007\apache-tomcat-5.5.23
    Tomcat Temp Directory: C:\Tools2007\apache-tomcat-5.5.23\temp

    The installation details for this new workspace/project are:

    *** Date:
    Tuesday, December 18, 2007 8:34:08 AM PST

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.6.0_03

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA

    Eclipse Project SDK

    Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
    Build id: M20070212-1330

    Eclipse Platform

    Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
    Build id: M20070212-1330

    Eclipse Plug-in Development Environment

    Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
    Build id: M20070212-1330

    Eclipse RCP

    Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
    Build id: M20070212-1330

    Eclipse Java Development Tools

    Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
    Build id: M20070212-1330

    Eclipse Graphical Editing Framework

    Version: 3.2.2.v20070208
    Build id: 20070208-1315

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\Tools2007\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    1728_7c
    -product
    com.genuitec.myeclipse.product.ide
    -vm
    C:\WINDOWS\system32\javaw.exe

    ==================================================

    At least on the first workspace (where I originally posted the problem) I could deploy, even if the only way to execute was to run Tomcat outside of Eclipse.
    What follows is the details from the first workspace/project of my original post:

    *** Date:
    Tuesday, December 18, 2007 8:45:41 AM PST

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.6.0_03

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA

    Eclipse Project SDK

    Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
    Build id: M20070212-1330

    Eclipse Platform

    Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
    Build id: M20070212-1330

    Eclipse Plug-in Development Environment

    Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
    Build id: M20070212-1330

    Eclipse RCP

    Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
    Build id: M20070212-1330

    Eclipse Java Development Tools

    Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
    Build id: M20070212-1330

    Eclipse Graphical Editing Framework

    Version: 3.2.2.v20070208
    Build id: 20070208-1315

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\Tools2007\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    934_7c
    -product
    com.genuitec.myeclipse.product.ide
    -vm
    C:\WINDOWS\system32\javaw.exe

    =============================

    #279771 Reply

    Loyal Water
    Member

    Go to Window > Preferences > MyEclipse > Servers > Tomcat 5 > JDK and point it to a full JDK instead of a JRE. That should sort this issue out.

    #279776 Reply

    Jon Ericson
    Member

    Thank you. That fixed my second workspace, and now the first workspace is working without changing anything there!

    Now to the original objective, and that is to debug my bean that is powering my JSP. I could have sworn this worked before, but now it doesn’t. I mark my source code (toggle breakpoint), but when I execute my page it does not break. I am starting Tomcat from within Eclipse. What am I doing wrong? Is this part of the same symptom?

    #279817 Reply

    Loyal Water
    Member

    If you are able to debug a newly created project, then I would suggest you transfer your code to this new project and try debugging it. Does it work ?

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Testing and debugging with Tomcat

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