facebook

Trying to set a breakpoint under JBOSS 4.03 SP1 gives error

💡
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. Installation, Configuration & Updates
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #249951 Reply

    Mork
    Participant

    Hi,

    I’m trying to debug a J2EE application from wihin MyEclipse by starting JBOSS 4.0.3SP1 and then settting a breakpoint (I’ve also tried setting the breakpoint first).

    The problem is that when I try to set a breakpoint either before or after JBOSS has initialized inside MyEclipse, I get an error that tells me I need to “…modify the compiler options to generate line number attributes”.

    When I right-click the project, I see that this line number option is already checked.

    This is a CVS project, but all the code I’m trying to debug is local.

    Not sure why this line number is happening or what to try next.

    I can not currently debug this project!

    If I ignore the error messages about the line numbers and just “hope” the debugging will work anyway, I go straight to the Exceptions page. No breakpoint happens.

    Can somebody please suggest something to try?

    Thanks.

    — M

    #249974

    Riyad Kalla
    Member

    Mork,
    Are you letting MyEclipse handle all aspects of this project or are you by chance using an Ant script to build and deploy this project? If you are, be sure to edit the javac task and turn on debugging (double check the Ant docs for the exact param, debug=true or debug=g or somethign like that).

    #250071

    Mork
    Participant

    Thanks for the input.

    I know you don’t support Ant, but there seems to be a disconnect between MyEclipse and a deployed EAR file under JBOSS.

    Based on your last reply, I updated my build.xml, for the javac task, to include the following two lines for the debugger:

    debug=”true”
    debuglevel=”lines,vars,source”

    Then, inside MyEclipse, I start JBOSS using the -c option to point to the correct JBOSS deployment’s EAR file.

    However, when JBOSS is initializing in MyEclipse, I am still getting the error saying I need to initialize the compiler option to include line numbers for the debugger. The Java class I have the breakpoint set on is part of the error message.

    If I try to wait until JBOSS initializes and then set the breakpoint, I get the same error.

    Until I figure this out, I cannot debug this project.

    I’ve posted messages on an Ant forum, but so far, nothing there. It’s probably a user error (mine) or a subtle MyEclipse/JBOSS debug issue I don’t understand.

    Can you help me figure this out?

    Thanks in advance for your help.

    — M

    #250080

    Riyad Kalla
    Member

    Then, inside MyEclipse, I start JBOSS using the -c option to point to the correct JBOSS deployment’s EAR file.

    Please clarify wha tyou mean by the “-c” option, have you added optional VM args in your JBoss 4 connector setup? If you have done anything custom in the connector setup, let me know what it is and additionally why you needed to do it (so I can tell if we need to enhance something or maybe point out you are doing something unecessary).

    Mork,
    Are you doing the deployment of your EAR to JBOss using MyEclipse’s deployment manager or are you using your build script to do everything (build, created EAR, deploy, etc.)?

    #250143

    Mork
    Participant

    Hi,

    Thanks for your replies.

    Under the main JBOSS 4 setup, I have the following:

    JBOSS Home Dir: C:\Program Files\jboss-4.0.3SP1
    Server Name: myProject
    Optional Program Arguments:
    Optional Shutdown arguements: –shutdown

    Launch mode: Debug Mode

    —–

    Yes an Ant Script is being used.

    I modifed it the Ant script’s “build.xml” file to include the following two lines for debugging:

    debug=”true”
    debuglevel=”lines,vars,source”

    Hower, this made no difference.

    When I set a breakpoint (either before or after JBOSS initializes), I get a “missing line number information”.

    The “project” in question is actually multiple projects that the Ant script uses to build the EAR file, which I manually copy to the JBOSS ‘myProject’ deploy directory.

    Each project with Java files (in MyEclipse) already has the add line number information for the debugger checked. Note that all the projects don’t contain Java code (some just hold dependency or build information.

    I’m stumped. Hopefully you can tell me what’s going on.

    Thanks very much in advance.

    — M

    #250165

    Riyad Kalla
    Member

    Under the main JBOSS 4 setup, I have the following:

    JBOSS Home Dir: C:\Program Files\jboss-4.0.3SP1
    Server Name: myProject
    Optional Program Arguments:
    Optional Shutdown arguements: –shutdown

    That all looks good. I don’t understand your -c comment above, can you clarify or was that just a mistype?

    I modifed it the Ant script’s “build.xml” file to include the following two lines for debugging:

    debug=”true”
    debuglevel=”lines,vars,source”

    Yes that looks right, did you make sure to rebuild the whole project after that and remove your old deployment and recreate the new one? It’s possible JBoss is using an old cached version and not seeing your changes. Be sure to clean out all the old stuff.

    When I set a breakpoint (either before or after JBOSS initializes), I get a “missing line number information”.

    The “project” in question is actually multiple projects that the Ant script uses to build the EAR file, which I manually copy to the JBOSS ‘myProject’ deploy directory.

    Your settings both in MyEclipse and in your Ant script look good. I think JBoss might be holding on to an old version of the EAR somewhere.

    Each project with Java files (in MyEclipse) already has the add line number information for the debugger checked. Note that all the projects don’t contain Java code (some just hold dependency or build information.

    Did you be sure to edit ALL your <javac> tasks in all your builds scripts to add those debug parameters? (I don’t know how many build scripts there are or if there is just one master, but make sure you rebuild everything).

    #250186

    Mork
    Participant

    Hi Riyad,

    The -c option is the way in JBOSS you can start JBOSS and “point it” to a particular deployment.

    For example, in MyEclipse, (I had done this originally), I had in the optional program arguments:

    -c myProject

    I found I really didn’t need this optional way of starting JBOSS with my deployment since I could just mention the actual deployment’s name directly.

    ————————–

    There are multiple build.xml files, but only one with a javac task. The others simply import the project’s build.xml that has the javac task.

    Not sure what to try next…

    — M

    #250188

    Riyad Kalla
    Member

    Did you try shutting down JBoss and erasing the deployment like I suggested, then rebuilding the entire set of all the projects and the EAR and redeploying it then relaunching JBoss?

    Since this isn’t a MyEclipse issue I’m really just troubleshooting Ant build/deployment/cache issues here with you. So all this stuff is run of the mill “make sure it’s not running an old cached version” type troubleshooting.

    #250191

    Mork
    Participant

    I really appreciate your help.

    I’ve tried deleting the tmp folder that gets created under the delpoyment directory.

    I’ll keep at this. If you think of anything else, please let me know.

    Much appreciated!!!

    Best,

    — M

    #250194

    Riyad Kalla
    Member

    A tip to be able to tell if JBoss is actually using the cache version or new version of your deployment is if you go to load up a page (say index.jsp) and it loads immediately, it is using the cached version. If it takes a few seconds after a clean deployment and you see plenty of messages like “Deploying app MyApp.EAR” in the console, then it is using your new copy.

    I’ll see if I can find any more tips online.

    #250197

    Mork
    Participant

    Thanks. I was deleting the tmp folder between starts in MyEclipse so I don’t thing caching is the issue. And, I’ve been closing JBOSS down from within MyEclipse and “Terminating closed versions” each time so I don’t think they could hang around that way either.

    Look forward to anything you can figure out.

    Thanks again!!!

    –M

    #250312

    Mork
    Participant

    This issue was apparently brought up before, but I’m not sure from the cryptic replies that it was solved then either.

    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-8309.html

    I’m still having the same problem.

    #250316

    Riyad Kalla
    Member

    Unfortunately I didn’t find more on the subject and without sitting infront of your computer running the scripts and really checking things out, I don’t have any suggestions.

    You could try launching JBoss remotely then connecting the remote debugger to it and see if that works: http://www.myeclipseide.com/images/tutorials/quickstarts/remotedebugging/

    #250319

    Mork
    Participant

    Tried it, got the same results. It’s clearly an Ant thing. I was just wondering if the posting I put up in my last email helped jog any memories.

    I appreciate your help!!!

    🙂

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Trying to set a breakpoint under JBOSS 4.03 SP1 gives error

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