MyEclipse: Debug JBoss app built with ant

watchmaker - May 19, 2005 - 08:07 PM
Post subject: Debug JBoss app built with ant
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!
support-rkalla - May 19, 2005 - 08:37 PM
Post subject:
Quote:

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.
watchmaker - May 21, 2005 - 10:24 AM
Post subject:
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?
support-rkalla - May 21, 2005 - 04:43 PM
Post subject:
Quote:

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.
gopherCodeLeo - Jun 12, 2005 - 04:13 AM
Post subject: same problem here as above help needed
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]
support-rkalla - Jun 13, 2005 - 02:45 AM
Post subject:
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"
evhiii - Sep 01, 2005 - 01:06 AM
Post subject: Cannot set breakpoint in EJB
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
support-rkalla - Sep 01, 2005 - 01:10 AM
Post subject:
Try: debug="true"

http://ant.apache.org/manual/CoreTasks/javac.html
evhiii - Sep 07, 2005 - 09:43 PM
Post subject:
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.
vanesssa99 - Jun 05, 2009 - 04:10 AM
Post subject:
Thanks for your idea

simulationcredit
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits