When I got an exception in my web application, tomcat logs the exception stack trance, but it doesn't tell me the line number, for instance:
java.lang.NumberFormatException: For input string: "100003ff" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at au.com.auscript.admin.controller.ManagerInterviewDetailController.handleRequest(Unknown Source)
The above error message didn't tell me the link number. But when I debug the same web application under 'Eclipse/Lomboz', I can see the error line number in the eclipse console.
I think it's because eclipse has my source code but Tomcat doesn't. Does any know how to make tomcat aware of my source code location so I can get a more precise error message.
This is because you compiled your source code for Tomcat without debug information. If you use ant you can add debug="true" to javac task. If you do not, AFAIK you can specify -g command line parameter in javac.
Joined: Dec 23, 2002
Thanks a lot Roman. I feel sorry myself as I 'considered' myself as advanced java programmer but I even didn't know these basic techniques.
Thanks for help!
Joined: Apr 24, 2006
It's OK, don't pay much attention to this. It's impossible to know all the things.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com