This content has been marked as final. Show 7 replies
I am able to identify the problem. Putting down the reason, as it may be helpful to someone.
This issue was arising because the web application classloader was not actually loading the classes i compiled using ant task javac with debug=true option.
Why the classloader did not load is because there was another web application in the same server which has the same class files which i was using in my web application. The application servers classloader was loading those classes instead of mine. These classes which got loaded were not compiled with debug=true option and hence did not contain line numbers in it.
When trying to do remote debugging from eclipse, it was connecting to these loaded classes without line numbers, hence it gave the valid error message i.e. unable to install breakpoint.
I have this question by myself as i got the reason for error
See [Unable to install break point due to missing line number attributes |http://solveme.wordpress.com/2008/08/27/unable-to-install-breakpoint-due-to-missing-line-number-attributes/]
It explains the solution
[Java Servlet tutorial|http://www.jsptube.com/]
To resolve this issue, do follow the process mentioned below.
1. If you clean using any tool(Ant, etc) clean it(if required)
2. Clean the project clean using your IDE(eclipse--> Project-->Clean)
3. Proceed further.
Always remember, if you clean using any other tool, secondly you should always clean using your IDE. Otherwise, the IDE cannot identify the class which it has created, which it use to debug. Hence the error occurs.
Hope its useful.
If you are using the Tomcat and Eclipse and building using Ant and facing this problem....
Unable to install breakpoint due to missing line number attributes. Modify compiler options to generate line number attributes
Then the accurate solution of your problem is that you have to modify your ant file.
As many places you see <javac ...... > just add <javac debug="true" ....... >
<javac debug=true srcdir=" destdir=">
<javac srcdir=" destdir=" verbose=false debug=true debuglevel=lines,vars,source>
This surely works and if you need more help then email me email@example.com
AJAY PRATAP SINGH APTS
Hi! I'm using j2sdk1.4.2_19, IDE: Eclipse Europa, Ant to build and Tomcat... and I'm having this problem. As you say aps and as I've found surfing the web I set the javac to debug="on" and debuglevel="lines, vars, source" and I'm still having the problem. The thing is that I can set breakpoints in another different project I deployed with Tomcat! I don't know what else I could change. The 'Add line number attributes...' in the Compiler is checked
Please any help I will really appreciated!!
Thanks in advance.-
Is this problem solved or still need solutions because for me it worked out with the above explainations.
Ajay Pratap Singh APTS