Re: debugging tomcat itself with netbeans

2005-07-14 Thread Geertjan Wielenga


Hi Herman,

Did you get further with this?

-- Geertjan

Hernan Ochoa wrote:


Hi all,

I'm trying to debug tomcat itself v5.5.9 using netbeans 4.1 without much luck.
I'm able to attach to a running instance of tomcat using JPDA, but
then my breakpoints are activated erraticaly.

Did someone try this before?
These are the things I did:

-compiled tomcat 5.5.9 with a build.properties file containing:
compile.debug=on
compile.deprecation=off
compile.optimize=off
debuglevel=lines,vars,source
-I added all .java files into a new netbeans project (I created a new
project with the option new project with existing java source files
or sthg like that)
-I run tomcat using the command /bin/catalina.sh jpda start
-I attach to the instance of tomcat running with netbeans
-I set the breakpoints by toggling them into the .java source files I
added on netbeans. Sometimes I do this from the Files window, and
sometimes from the Projects windows. Here I'm not sure what's the
right way to go.

Any help with this would be much appreciated.
If anyone has sucessfully debugged tomcat with another debugger,
please let me know also.

Thanks in advance.
bye!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Debugging tomcat startup

2005-04-02 Thread Larry Meadors
Realm implementations should go into server/lib.

On Apr 2, 2005 12:16 AM, Anto Paul [EMAIL PROTECTED] wrote:
 
 On Apr 2, 2005 1:27 AM, Sasha Borodin [EMAIL PROTECTED] wrote:
 
 What is the motive to place jars in server/lib. These jars are not
 visible to applications.



Re: Debugging tomcat startup

2005-04-02 Thread Larry Meadors
Hey Sasha, I have been wanting to do an iBATIS realm for a while. Glad to 
see I am not alone. ;-)

You have a couple of options.

I use IDEA, and run tomcat externally. When I want to debug startup code, I 
set JPDA_OPTS (in setenv.sh/bat) to this:

JPDA_OPTS=-Xdebug 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y

Most of that is already there (in tomcat 5.0.27 line 141 of catalina.sh), 
and tells the JVM to start the debugger in server mode using sockets, to 
listen on address 8000, and to suspend immediately, until a debugger 
attaches.

Then, set your breakpoints, and start tomcat using this:

$CATALINA_HOME/bin/catalina.sh jpda start

Once it starts, you can attach, and debug everything starting at the 
beginning.

Java rocks! :-D

Larry

On Apr 1, 2005 12:57 PM, Sasha Borodin [EMAIL PROTECTED] wrote:
 
 I'd like to solicit suggestions for debugging Tomcat startup - 
 specifically
 various class initializations.
 
 I've written a custom Realm implementation; in it, I use some data access
 classes which use iBatis; these classes work great when used in a web
 application (all jars residing in the apps WEB-INF/lib); but I'm getting
 errors when these classes are initialized from jars in the server/lib
 directory at startup.
 
 If you have suggestions for how to debug the startup, especially from an 
 IDE
 like Idea, please post. Also, if there are guidelines for where to place
 certain types of jars (common vs. server), please post a link. Right now
 I've got my jdbc jars in common/lib, and my custom Realm and data access
 classes (including ibatis related jars) in server/lib.
 
 Thanks for your help,
 
 -Sasha Borodin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Debugging tomcat startup

2005-04-01 Thread Anto Paul
On Apr 2, 2005 1:27 AM, Sasha Borodin [EMAIL PROTECTED] wrote:
 I'd like to solicit suggestions for debugging Tomcat startup - specifically
 various class initializations.
 
 I've written a custom Realm implementation; in it, I use some data access
 classes which use iBatis; these classes work great when used in a web
 application (all jars residing in the apps WEB-INF/lib); but I'm getting
 errors when these classes are initialized from jars in the server/lib
 directory at startup.
 
 If you have suggestions for how to debug the startup, especially from an IDE
 like Idea, please post.  Also, if there are guidelines for where to place
 certain types of jars (common vs. server), please post a link.  Right now
 I've got my jdbc jars in common/lib, and my custom Realm and data access
 classes (including ibatis related jars) in server/lib.
 
 Thanks for your help,
 
 -Sasha Borodin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

Read the classloader docs.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html

What is the motive to place jars in server/lib. These jars are not
visible to applications.

-- 
Anto Paul
Benchmark Softech
www.benchmarksoft.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Debugging Tomcat

2004-08-12 Thread QM
On Thu, Aug 12, 2004 at 08:58:21AM +0100, Allistair Crossley wrote:
: 1) Everywhere in the documentation on Tomcat and in the comments for
: server.xml, when the debug attribute is discussed, it will always say a
: higher number means more output. I find this statement reasonably confusing.
: It raises quite a lot of questions about what the maximum number is and what
: that translates to in terms of logging output.

I can tell you what it means: not a whole lot, at least not these days.

I understand most Tomcat logging is done via commons-logging so you'd
tune that config for output instead.


: 2) Looking in the TC source last night I found that the kind of logging I
: would like to be output is always encapsulated with a if (log.isLogEnabled())
: statement. I would like to know which log this translates to, and how to
: enable it.

What type of variable is log? ;)

btw, what was with the completely unrelated message at the bottom of
your last post?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Debugging Tomcat

2004-08-12 Thread Shapira, Yoav
Hi,

1) Everywhere in the documentation on Tomcat and in the comments for
server.xml, when the debug attribute is discussed, it will always say
a
higher number means more output. I find this statement reasonably
confusing. It raises quite a lot of questions about what the maximum
number
is and what that translates to in terms of logging output.

The number is from 0-99, 0 meaning no logging and being the default, 99
meaning all the logging the component can generate *via that mechanism*.
Which brings us to our next point, that most Tomcat logging is now done
via commons-logging.  To configure Tomcat's logging via commons-logging,
see http://jakarta.apache.org/tomcat/faq/misc.html#commonsLoggingLog4j.

(log.isLogEnabled()) statement. I would like to know which log this
translates to, and how to enable it.

Those are from commons-logging.  The log variable is an instance of
org.apache.commons.logging.Log corresponding to the class' logger.

I have tried setting ALL debug attributes within server.xml to 4 but
this
does not yield the logging statements I am looking for from (2).

Read the above FAQ entry, then set org.apache.catalian = DEBUG in the
logging configuration file, and set debug=99 for all components in
server.xml that support that attribute.  That's the most logging you're
going to get.

Yoav Shapira

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Debugging Tomcat

2004-08-12 Thread Allistair Crossley
Hi,

Yes, the Log that is created internally is a commons-logging Log acquired from 
commons-logging LogFactory. However, the isLogEnabled() flag must be set somewhere in 
a Tomcat configuration file no? I'm not aware of any logging configuration file for 
commons-logging within the Tomcat dist - I only know of the debug attributes on the 
various elements of server.xml but none of those has yielded the logging statements 
within the TC code.

I am not sure which unrelated message you are referring to but if you clarify I'd be 
happy to explain!

Allistair

 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2004 13:26
 To: Tomcat Users List
 Subject: Re: Debugging Tomcat
 
 
 On Thu, Aug 12, 2004 at 08:58:21AM +0100, Allistair Crossley wrote:
 : 1) Everywhere in the documentation on Tomcat and in the comments for
 : server.xml, when the debug attribute is discussed, it will 
 always say a
 : higher number means more output. I find this statement 
 reasonably confusing.
 : It raises quite a lot of questions about what the maximum 
 number is and what
 : that translates to in terms of logging output.
 
 I can tell you what it means: not a whole lot, at least not 
 these days.
 
 I understand most Tomcat logging is done via commons-logging so you'd
 tune that config for output instead.
 
 
 : 2) Looking in the TC source last night I found that the 
 kind of logging I
 : would like to be output is always encapsulated with a if 
 (log.isLogEnabled())
 : statement. I would like to know which log this translates 
 to, and how to
 : enable it.
 
 What type of variable is log? ;)
 
 btw, what was with the completely unrelated message at the bottom of
 your last post?
 
 -QM
 
 -- 
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Debugging Tomcat

2004-08-12 Thread Allistair Crossley
Hm,

Sorry that this is kinda straying into log4j territory now. Adding the following to my 
web application log4j.properties

log4j.logger.org.apache.catalina=debug, R

starts to yield _some_ logging, e.g

2004-08-12 15:23:34,283 - DEBUG (org.apache.catalina.session.StandardManager:653) - 
Force random number initialization completed
2004-08-12 15:23:34,283 - DEBUG (org.apache.catalina.session.StandardManager:653) - 
Force random number initialization completed
2004-08-12 15:23:34,283 - DEBUG (org.apache.catalina.session.StandardManager:359) - 
Start: Loading persisted sessions
2004-08-12 15:23:34,283 - DEBUG (org.apache.catalina.session.StandardManager:359) - 
Start: Loading persisted sessions

Although why there is 2 of everything I have no idea.

What I am really interested in is the logging from 
log4j.logger.org.apache.catalina.load so I can see what class is being loaded when 
ThreadDeath occurs. I'm going to try and look at this problem if I can but this is my 
first ever look at Tomcat source so I am hopeful but not optimistic ;)

I tried adding a log4j.properties and log4j jar to commons/lib as the FAQ suggests to 
get TC logging but no new log is created and no logging of the load package happens 
(boo).

Do TC developers not have the logging switched on when developing?

Allistair Crossley
New Media Group, QAS Ltd
Telephone: 020 7819 5343

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2004 13:43
 To: Tomcat Users List
 Subject: RE: Debugging Tomcat
 
 
 Hi,
 
 1) Everywhere in the documentation on Tomcat and in the comments for
 server.xml, when the debug attribute is discussed, it will always say
 a
 higher number means more output. I find this statement reasonably
 confusing. It raises quite a lot of questions about what the maximum
 number
 is and what that translates to in terms of logging output.
 
 The number is from 0-99, 0 meaning no logging and being the 
 default, 99
 meaning all the logging the component can generate *via that 
 mechanism*.
 Which brings us to our next point, that most Tomcat logging 
 is now done
 via commons-logging.  To configure Tomcat's logging via 
 commons-logging,
 see 
 http://jakarta.apache.org/tomcat/faq/misc.html#commonsLoggingLog4j.
 
 (log.isLogEnabled()) statement. I would like to know which log this
 translates to, and how to enable it.
 
 Those are from commons-logging.  The log variable is an instance of
 org.apache.commons.logging.Log corresponding to the class' logger.
 
 I have tried setting ALL debug attributes within server.xml to 4 but
 this
 does not yield the logging statements I am looking for from (2).
 
 Read the above FAQ entry, then set org.apache.catalian = DEBUG in the
 logging configuration file, and set debug=99 for all components in
 server.xml that support that attribute.  That's the most 
 logging you're
 going to get.
 
 Yoav Shapira
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Debugging Tomcat

2004-08-12 Thread Shapira, Yoav
Hi,

Although why there is 2 of everything I have no idea.

Additivity, you need to set it to false for org.apache.catalina.

Do TC developers not have the logging switched on when developing?

Some do, sometimes, is the only possible answer.  I don't know how
everyone else develops ;)  I bet people add logging statements so
certain parts of the code they're working on as need be, and then they
sometimes take those statements out after they're done.  That's what I
frequently do anyways.  It's always a judgement call where and how to
add logging statements.

Yoav Shapira

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: debugging tomcat/jvm crash

2003-03-09 Thread Cameron Hart
I ran Tomcat from the console, when the JVM crashed I got the following message:


Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC= 0x2BE5C46D
SIGNAL= -1073741819
FUNCTION NAME = (N/A)
OFFSET= 0x
LIBRARY NAME  = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.


Anyone know why this might occur or how to get the JVM to write to the error
report file?

Thanks.


Quoting [EMAIL PROTECTED]:

 i have been experiencing a serious crash running my webapp on
 tomcat4.1.18 +
 j2sdk1.4.1_02 + win2k. the tomcat/java process completely disappears
 without a
 trace. nothing is left in any of the logs suggesting what caused the
 crash and
 we are unable to reproduce it in our testing environment.
 
 can anybody give me some advice on how i can get more information on
 what is
 causing the crash. on a un*x os i would expect a core file to be left
 behind
 after a crash. does anyone know how it is possible to get that kind of
 crash
 data out of java on win2k?
 
 thanks,
 
 
 - 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]