🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #32

Re: method calls logging

#32
From: Paul Nichols (TeamB)
Date: Thu, 20 Jan 2005 02:12
37 lines
2558 bytes
"Victor Ceban" <vceban@eei1.com> wrote in message
news:41ed63d6$1@newsgroups.borland.com...
> Hi,
>
>  we have a complex J2EE application that runs on Tomcat 5/Linux and uses
> struts heavily. We also have a couple extra libraries used in the system.
>
>  The system started to crash on the server and it crashes JVM with no
useful
> information written to the log file.
>
>  I was wondering if there is a mechanism to track all method calls sent to
> Java for us to identify which method crashes the system. We would like to
> avoid adding logging methods to every method: methodIn, methodOut and time
> (may be). Any JVM triggers we can use ? additional libraries ?
>
Two ways, youmight go about this, but it will drag the response time from
the server.

(1) Use debugging with log4j. This will dump to your log4j files the full
stack trace from the running application.

(2)  Start your catalina session with the debug option. You will need to
start the catalina.sh or .bat file in a local terminal and this too will
produce a stack trace of output. Unless you want to monitor all activity, I
would suggest redirecting this info to a file.


Info on log4j:  http://logging.apache.org/log4j/docs/documentation.html

Info on Catalina debugging:
http://www.fawcette.com/javapro/2003%5F06/online/debugging%5Fkjones%5F06%5F23%5F03/
Look toward the bottom for command line info on using the debug mode.

Again, expect your app to slow down dramatically, as the stack trace goes
through class loaders and methods..
Technical Details
Message-ID: <41edc04c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!dedekind.zen.co.uk!zen.net.uk!demorgan.zen.co.uk!194.72.9.35.MISMATCH!news-peer1!btnet-feed3!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41ed63d6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,a7b8d4ffc2d2f8a6
X-Google-Attributes: gid1089d0,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Paul Nichols \(TeamB\)" <paul@comp.net>
From: "Paul Nichols \(TeamB\)" <paul@comp.net>
Newsgroups: borland.public.jbuilder.java.api
References: <41ed63d6$1@newsgroups.borland.com>
Subject: Re: method calls logging
Date: Wed, 19 Jan 2005 20:12:13 -0600
Lines: 41
Organization: clc
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.113.106.148
Message-ID: <41edc04c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106100300 68.113.106.148 (18 Jan 2005 18:05:00 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!dedekind.zen.co.uk!zen.net.uk!demorgan.zen.co.uk!194.72.9.35.MISMATCH!news-peer1!btnet-feed3!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail