• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing detailed server logs

 
Greenhorn
Posts: 23
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what should I do now? How to access the logs containing the details of the exception ?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic