Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to analyse log file in tomcat

 
rammie singh
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody..
although i have done a handful of progrramming in java .... i am not comfortable in analysing the logs.
i amean what are the important points to conclude from the log...or how to determine that at which point my error is coming.
can anybody help me in analysing important conclusions from the log.
I am posting a sample log which is being produced in my application.

althoug i am able to conclude that there is a class cast exception.....i would like know wht else important point can be concluded from this log.


 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the important information:



The top of the stacktrace tells you where the error arose.

In this case it was networkUser.jsp that threw a ClassCastException in like 340.

Note that this is not line 340 in your JSP but in the translated Java file that is under the work folder.
If you can't spot the error in your JSP go to the translated java file and look into line 340.
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Singh,

Every jsp will be compiled and converted to a servlet before execution. The log shows you have ClassCastException at line 340 of your networkUser.jsp. The line number 340 will the line number of the converted servlet and not the line number of the jsp.

You can go to your tomcat home > work\Catalina\localhost\your project name\org\apache\jsp

Open networkUser_jsp.java and go to line number 340 to find where the problem is.
 
rammie singh
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body ..thanks for your valuable information.
and sorry for not replying you all as i was a bit busy...
ok i have understood the meaning of firat two lines as you all have mentioned.
i alsso checked the converted servlet(jsp to servlet) file in tomcat work directory.
that was definately good .
Is there any other information we can extract from other lines....if posssible any one can prvide me some link ormaterial source to study this in detail.
Thanks.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most important ines that point to the offending code are the top line of the log. The other lines may provide information, but not sure how useful that might be to you.
 
rammie singh
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks every body.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic