facebook

[Closed] Debug on Server not present

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

    SydneyOs
    Member

    I am wanting to debug my web application, and have got so far as:

    1. WebTools installed
    2. Tomcat installed
    3. Launch configuration for Tomcat created (all defaults)

    However, according to some tutorials and demos I’ve seen, I think I’m supposed to have a Debug on Server option when I right click a JSP. I don’t. If I just do a straight Debug, Tomcat starts but no web page launches and no breakpoints are hit. I feel I must be missing a step.

    Thanks for your help.

    #269519 Reply

    Loyal Water
    Member

    Make sure you are doing the following:
    1) Running MyEclipse and Tomcat with atleast a JDK 1.4 or later.
    2) The MyEclipse Tomcat connector is setup to launch Tomcat in debug mode, not Run mode.

    If you have done all of that and none of it has helped, 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?

    #269528 Reply

    SydneyOs
    Member

    Thanks. How do I “clean and rebuild” my project?

    #269530 Reply

    Loyal Water
    Member

    Select your project and go to Project > Clean to clean the project and incase Build Automatically is not checked go to Project > Build Project to build the project.

    #269537 Reply

    SydneyOs
    Member

    Afraid not. I have the Debug As:

    1. Javascript Application
    2. Debug

    options only if I right click the JSP. Under no Debug menu do I ever see Debug on Server.

    Is a browser supposed to launch, or is there something I need to do to specify this?

    Also, these might just be version issues, but I don’t have a “Project Explorer” as shown in some demos – I have a Package Explorer.

    Also, the jre for MyEclipse is not the one in the JDK directory – not sure if that makes a difference.

    I have a Global Forward configured for my login page.

    Thanks for your help.

    #269540 Reply

    Riyad Kalla
    Member

    Sydney,
    I believe this is some confusion here between WTP and MyEclipse. Do you have both of them installed? If so, this is going to be a fairly confusing learning experience as both can provide overlapping menu items that look to be the same and you won’t be sure where which one is comming from.

    I would suggest settling on either WTP or MyEclipse. If you decide to stick with MyEclipse, definately go through our Web Project beginner guide here. It shouldn’t take more than 20mins (maybe 10?) and covers all the basics of how functionality works in MyEclipse:
    http://www.myeclipseide.com/images/tutorials/quickstarts/webprojects/

    #269547 Reply

    SydneyOs
    Member

    I’m sure you are right about that – I would like to go with MyEclipse – is there something I need to uninstall (e.g., the WebTools)? I do believe I have only been using the MyEclipse menus where possible.

    #269549 Reply

    Loyal Water
    Member

    I suggest for the cleanest experience, you should uninstall WebTools and MyEclipse and reinstall using the MyEclipse *All In One* installer to a new directory and reopen your workspace.

    Please note that project types in MyEclipse are different, so you may need to re-create them.

    #269554 Reply

    SydneyOs
    Member

    Will do – can I use JDK 6.0? I see the documentation says 1.4 or 1.5, but I’d like to have the latest version.

    #269555 Reply

    Loyal Water
    Member

    Eclipse hasn’t been certified on JDK 6. There are some known issues with it and we are woking them in the 3.3 code stream. So, I would advise you to stick to 1.5 / 1.4 only for now.

    #269557 Reply

    Riyad Kalla
    Member

    Nipun is correct. I’d also like to add that the version of Java you use to actually run MyEclipse, has no bearing on the version of Java you want to use to develop your project in. The 2nd (which I believe is what you are asking about?) is controlled in your project properties under the Java Compiler settings.

    #269564 Reply

    SydneyOs
    Member

    Okay, I uninstalled MyEclipse and the JDK (just for kicks) and Tomcat.

    Following the instructions in: http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html:

    Installed JDK 1.5
    Installed MyEclipse SDK 3.2.2
    Installed Tomcat 6.0

    According to the documentation (http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html), I think my install was correct the first time – I had been creating MyEclipse Web Projects, but I never had a .myeclipse folder or .mymetadata file and I still don’t, even when creating a new Test project.

    Is this a problem?

    #269566 Reply

    Riyad Kalla
    Member

    Any dot file is hidden in the package explorer view, you would have to switch to Navigator to see them.

    #269569 Reply

    SydneyOs
    Member

    Great. Thanks.

    Now, I have JSP debugging working – here’s the step I was missing. In addition to having a breakpoint set in your JSP, you have to manually launch IE and run the page. I’m used to working in an environment where debugging launches the browswer for you. Simple.

    However, I am not hitting breakpoints in my Action or ActionForms though they look good in the struts-config file. The last debug lines are:

    16:04:21,328 DEBUG BeanUtils:792 – BeanUtils.populate(com.gensa.struts.form.LoginForm@18706f6, {password=[Ljava.lang.String;@10dd4c8, username=[Ljava.lang.String;@10cafa1})
    16:04:21,328 DEBUG BeanUtils:873 – setProperty(com.gensa.struts.form.LoginForm@18706f6, password, [])
    16:04:21,343 DEBUG ConvertUtils:369 – Convert string ” to class ‘java.lang.String’
    16:04:21,343 DEBUG ConvertUtils:377 – Using converter org.apache.commons.beanutils.converters.StringConverter@1e8fa70
    16:04:21,343 DEBUG BeanUtils:873 – setProperty(com.gensa.struts.form.LoginForm@18706f6, username, [])
    16:04:21,343 DEBUG ConvertUtils:369 – Convert string ” to class ‘java.lang.String’
    16:04:21,343 DEBUG ConvertUtils:377 – Using converter org.apache.commons.beanutils.converters.StringConverter@1e8fa70
    16:04:21,343 DEBUG RequestProcessor:940 – Validating input form properties
    16:04:21,359 DEBUG RequestProcessor:945 – No errors detected, accepting input
    16:04:21,359 DEBUG RequestProcessor:305 – Looking for Action instance for class com.gensa.struts.action.LoginAction
    16:04:21,359 DEBUG RequestProcessor:322 – Creating new Action instance

    At this point I have radio silence from the output.

    This is odd for the following reasons:
    1. I entered invalid data
    2. My breakpoint in the setUsername is not being hit
    3. My breakpoint in the ActionForm.validate function is not being hit nor is the log.debug… statement outputting anything
    4. My breakpoint in the LoginAction.execute function is not being hit nor is the log.debug… statement outputting anything

    Again, I’m guessing this is something painfully simple to the experienced MyEclipse user and/or Struts programmer.

    Any thoughts much appreciated.

    Thanks

    #269570 Reply

    Riyad Kalla
    Member

    1) Are you launching Tomcat from within MyEclipse? Did you double check that Window > Prefs > MyEclipse > App Servers > Tomcat 5 > Launch is set to launch in debug mode?

    2) Are you building and deploying your app from inside MyEclipse or using ant?

    3) If you go under Project Properties > Java Compiler, are the debugging symbols (all at the bottom) getting compiled into your source code?

Viewing 15 posts - 1 through 15 (of 21 total)
Reply To: [Closed] Debug on Server not present

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