facebook

Debug JBoss app built with ant

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #229892 Reply

    watchmaker
    Member

    Hi,

    I’m trying to debug JBoss 3.0.7 code using MyEclipse. My code is developed in MyEclipse but I use an ant script to build it. I have MyEclipse set up so I can start and stop JBoss from it. I’m able to debug client side JUnit classes but I’d like to be able to debug code running in JBoss.

    When I attempt to set a breakpoint in this code I get the following error message:
    Unable to install breakpoint in … due to missing line number attributes. Modify compiler options to generate line number attributes.
    Reason: Absent line number information

    The compiler options for generating line number info are selected in MyEclipse. However, as stated above I’m using ant to build it.

    In answer to the standard questions:

    What operating system and version are you running?
    Windows XP professional

    What Eclipse version and build id are you using? (Help > About Eclipse Platform)
    Version: 3.0.2
    Build id: 200503110845

    – Was Eclipse freshly installed for MyEclipse?
    Yes

    – If not, was it upgraded to its current version using the update manager?
    N/A

    – Are any other external plugins installed?
    Yes – checkstyle

    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    7

    What MyEclipse version are you using? (Help > About Eclipse Platform > Features)
    3.8.4

    What JDK version are you using to run Eclipse? (java -version)
    1.4.2

    What JDK version are you using to launch your application server?
    1.4.1

    What steps did you take that resulted in the issue?
    See above – Try to insert breakpoint in code or generally debug server code.

    What application server are you using?
    JBoss 3.0.7 with Jetty

    Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)
    No

    Thanks for any replies!

    #229897 Reply

    Riyad Kalla
    Member

    The compiler options for generating line number info are selected in MyEclipse. However, as stated above I’m using ant to build it.

    You need to adjust your Ant script, the settings in Eclipse have nothing to do with Ant and visa versa. Building your project via Ant is totally independent, you likely need to add the “debug=true” attribute to your javac task as well as adding all 3 debugging information flags.

    #230009 Reply

    watchmaker
    Member

    Thanks for your reply – that’s working now.

    One question though – do those debug flags have a performance impact?

    Should I remove them before building a release?

    #230014 Reply

    Riyad Kalla
    Member

    One question though – do those debug flags have a performance impact?

    Should I remove them before building a release?

    If you are writing a game engine, yes they might, if you are writing a normal client app, I don’t think anyone will every notice… ever.

    #230912 Reply

    I have the same problem with debug=true enabled but I could not get the problem cleared can you please help me on the line posted earlier for the solution which says:

    ” add the “debug=true” attribute to your javac task as well as adding all 3 debugging information flags.

    I am a new user of myEclipse and JBOSS with ant. Please kindly elaborate the steps.[/b]

    #230929 Reply

    Riyad Kalla
    Member

    gopher,
    Check out the Ant manual here: http://ant.apache.org/manual/index.html

    Drill down to the Ant Tasks > Core Tasks > javac, look at the “debug” and “debuglevel” arguments, the 3 information flags are “lines, vars, source”

    #236295 Reply

    evhiii
    Member

    Hi,

    I have same problem. I am building for WebSphere 6.0 using Ant. I have set debug=”on” and debuglevel=”lines,vars,source”. I cannot set a breakpoint on the code in my EJB project. The message I see is:

    ————————————–
    Unable to install breakpoint in
    com.ibm.websphere.samples.plantsbywebsphereejb.LoginBean due to missing
    line number attributes. Modify compiler options to generate line number
    attributes.

    Reason:
    Absent Line Number Information
    ————————————–

    Here is my compile Ant task:

    ————————————–
    <target name=”compile”>
    <tstamp/>
    <echo message=”PlantsByWebSphere Compiling…”/>
    <javac srcdir=”${src}/PlantsByWebSphereEJB/ejbModule” destdir=”${bldPBW}” deprecation=”true” debug=”on” debuglevel=”lines,vars,source” classpath=”${prereq.classpath}” failonerror=”${failonerror}”/>
    <javac srcdir=”${src}/PlantsByWebSphereWEB/JavaSource” destdir=”${bldPBW}” deprecation=”true” debug=”on” debuglevel=”lines,vars,source” classpath=”${prereq.classpath}” failonerror=”${failonerror}”/>
    </target>
    ————————————–

    FYI, I am running:

    OS: Windows XP
    MyEclipse version 4.0
    Eclipse version 3.1

    My computer is a ThinkPad 42p, 2GHz processor, 1GB of memory.

    I have tried launching the server (server1, standalone deployment) from the IDE and also by external launch, attaching via remote debug. No difference in behavior.

    I have been able to set JSP breakpoints, however.

    Thanks in advance for your help,
    Ed

    #236296 Reply

    Riyad Kalla
    Member
    #236829 Reply

    evhiii
    Member

    It turned out that my problem was the Ant task that builds the EJB jar includes the source. When the source is present, the EJBDeploy process in WebSphere recomplies the code (without debug) as part of the deployment process. Weird. Once I removed the .java files from the archive, I was able to debug my EJBs.

    #299075 Reply

    vanesssa99
    Member

    Thanks for your idea

    simulationcredit

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Debug JBoss app built with ant

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