From the course: Learning Apache Tomcat

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Finding a bug using Tomcat logs

Solution: Finding a bug using Tomcat logs - Tomcat Tutorial

From the course: Learning Apache Tomcat

Start my 1-month free trial

Solution: Finding a bug using Tomcat logs

(upbeat music) - [Narrator] Now the first part of this challenge was just installing bug.war, which should be pretty easy by now. So, I'll sudo cp, and it's just in my vagrant directory. (typing) So, bug.war, and then I'll send that to var/lib/tomcat8/webapps. (typing) Now, bug.war is installed, let's take a look at it. 192.168.33.10 port 80 80/bug (typing) So, here's our initial bug, and you can see there is a file not found exception, but it doesn't actually tell us what the file is. And this is actually intentional. I wanted this to be somewhat difficult to figure out. So we need to go looking at the actual logs that were produced from this error. So, let's take a look at that. We'll clear the screen, and I'm going to use vim (typing) just 'cause that's simpler for me. I'll look at var/lib/tomcat8/logs (typing) and then we'll look at localhost and today's date. Now, here's our log from our Stack trace app. Let me go to the bottom of the file to get the most recent errors. Here is…

Contents