facebook

Debugging struts helper classes with myEclipse

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

    nedda76
    Member

    Hi all,

    I am running into a debugging problem – perhaps due to lack of understanding of how myEclipse works with struts.
    I am using the tomcat5 connector, I start up tomcat inside eclipse and hit breakpoints in my Action classes just fine but… I cannot step into methods which are implemented in helper classes that the Actions call.
    I am using myEclipse 3.0.8.4, tomcat5 and struts 1.1 Tomcat is set to run in debug mode –
    Do I need to do additional configuration steps to the tomcat connector paths?

    Any hints/clues/help woul be appreciated.

    Thanks,
    Nedda

    #226110 Reply

    Riyad Kalla
    Member

    Nedda,
    If you are trying to step into Struts code, then you need to download the Struts source code from struts.jakarta.org and attach it to your struts.jar file, then you’ll be able to step into it. Make sure you grab the right version of the source code (Struts 1.1).

    #226116 Reply

    nedda76
    Member

    Hi RK,

    the code I am trying to step into is part of my struts project – these are some regular java classes (helpers if you will) that my Action classes call to do things like db and other tedious work. These helper classes are built, packaged and deployed together with the Action, Form, Bean and all other classes belonging to the project. The source code is all under the same directory com.xxx.etc

    #226118 Reply

    Riyad Kalla
    Member

    Oh I see, yes you should be able to step into those withour problems.

    1) Are you working with multiple projects here or just 1?
    2) Are your ‘helper’ classes packaged in a JAR or are they part of the /src tree that is built into the /classes output directory under WEB-INF dir?
    3) When you set a breakpoint IN your helper classes, do they get hit?
    4) When you step from other code INTO your helper classes, what happens that “doesn’t work”?
    5) Are you using a 1.4+ VM to launch Eclipse (using -vm argument) AND also to run your Java app?

    #226121 Reply

    nedda76
    Member

    Hi Ri9d,

    1) I have one project, which has several packages – each one with its own struts configuration files.
    2) My helper classes are part of the /src tree that is built into the /classes output under WEB-INF
    So I have something like this:

    src/xyz/actions
    src/xyz/forms
    src/xyz/helpers

    and so on…

    3) When I set a breakpoint in my helper classes they do not get hit
    4) For example, I call a helper class method in one of my actions, set a break point on that line and on F5 it just executes and goes to next line – basically steps over.

    5) I am using 1.4VM to launch eclipse – I am not using -vm args – Here is a stupid qs: should I start up eclipse with -vm ?

    #226125 Reply

    Riyad Kalla
    Member

    I would suggest shutting down Tomcat, removing your deployment, rebuilding your entire project (Project > Clean) and then redeploying it and restarting Tomcat.

    5) -vm is usually a good idea so you KNOW the version of VM running eclipse, just point it at the javaw.exe executable.

    #226239 Reply

    nedda76
    Member

    hi Riyad,

    i cleaned up tomcat, my build dir and eclipse setup and now everything works. Dunno what was wrong in the first place. Thanks for your help!!!

    Nedda

    #226241 Reply

    Riyad Kalla
    Member

    Glad to hear it is working now Nedda.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Debugging struts helper classes with myEclipse

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