This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing detailed server logs

 
Mandy Singh
Greenhorn
Posts: 23
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Mandy Singh
Greenhorn
Posts: 23
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what should I do now? How to access the logs containing the details of the exception ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic