aspose file tools*
The moose likes Tomcat and the fly likes Accessing detailed server logs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Accessing detailed server logs" Watch "Accessing detailed server logs" New topic
Author

Accessing detailed server logs

Mandy Singh
Greenhorn

Joined: May 30, 2011
Posts: 23

Hello Everyone,

I encountered a problem while running a small test application on Tomcat. The server gives an HTTP Status 500 error along with an exception.

The actual error that I get is...





There is a note at the end which states : "The full stack trace of the root cause is available in the Apache Tomcat/7.0.8 logs."

Where are these logs located ?

The only logs that I can see being updated are the ones located in my workspace:

"C:\J2EE workspace\StrutsPractice\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\logs"

Catalina Base is set as (In eclipse, VM arguments for Server Configuration)...

catalina.base="C:\J2EE workspace\StrutsPractice\.metadata\.plugins\org.eclipse.wst.server.core\tmp0

and the "logging.properties" file in Tomcat/conf folder specifies juli.FileHandler.directory as :
FileHandler.directory = ${catalina.base}/logs

for these handlers...
1. catalina.org.apache.juli.FileHandler,
2. localhost.org.apache.juli.FileHandler,
3. manager.org.apache.juli.FileHandler,
4. host-manager.org.apache.juli.FileHandler

So I assumed that I was looking at the correct location (my workspace, as specified above) for the logs. Please correct me if I a wrong.

The logs at this location aren't really helpful, with output similar to this...
0:0:0:0:0:0:0:1 - - [03/May/2012:15:19:16 +0530] "GET /KurniawanChap02Struts/ HTTP/1.1" 500 1789

So my questions are...

1. Am I looking at the correct location for my logs ?
2. How do I get more detailed logs or how should I access the "full stack trace of the root cause" as stated in line 23 of the Server's error report ?

*** If opportunity doesn't knock, build a door !! ***
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15661
    
  15

Send your puppy on a search for catalina.out. That's the file that usually receives the stdout/stderr streams from the Tomcat server and that's where the detailed stack traces and server messages end up. In rare cases, there will be info in "localhost" log files (usually in the same directory as catalina.out).


Customer surveys are for companies who didn't pay proper attention to begin with.
Mandy Singh
Greenhorn

Joined: May 30, 2011
Posts: 23

The puppy's sad. There is no "catalina.out" in tomcat dir or in the workspace. What should I do and where is this file normally located ? There are some localhost_access_log files in my workspace, but again as I said, they don't contain enough details.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15661
    
  15

It looks like you're using that horrible built-in server manager to run Tomcat. It's probably sending the stdout and stderr to your IDE console windowpane.
Mandy Singh
Greenhorn

Joined: May 30, 2011
Posts: 23

So what should I do now? How to access the logs containing the details of the exception ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing detailed server logs
 
Similar Threads
Web Service Exception!!
No Class def found error
interceptor not working
The server encountered an internal error () that prevented it from fulfilling this reque:
HTTP Status 404 error in tomcat