| Author |
Message |
|
|
Post subject: Debug JBoss app built with ant
Posted: May 19, 2005 - 08:07 PM
|
|

Joined: May 19, 2005
Posts: 6
|
|
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! |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 19, 2005 - 08:37 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23883
|
|
| 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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 21, 2005 - 10:24 AM
|
|

Joined: May 19, 2005
Posts: 6
|
|
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? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 21, 2005 - 04:43 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23883
|
|
| 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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: same problem here as above help needed
Posted: Jun 12, 2005 - 04:13 AM
|
|

Joined: Jun 12, 2005
Posts: 1
|
|
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] |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jun 13, 2005 - 02:45 AM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23883
|
|
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" |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: Cannot set breakpoint in EJB
Posted: Sep 01, 2005 - 01:06 AM
|
|
Registered Member


Joined: May 17, 2005
Posts: 3
|
|
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 |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 01, 2005 - 01:10 AM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23883
|
|
|
|
|
 |
|
|
Post subject:
Posted: Sep 07, 2005 - 09:43 PM
|
|
Registered Member


Joined: May 17, 2005
Posts: 3
|
|
| 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. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jun 05, 2009 - 04:10 AM
|
|
Joined: Jun 05, 2009
Posts: 1
|
|
|
|
|
 |
|
|