You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lukas Österreicher <lu...@sbg.ac.at> on 2002/12/14 11:00:32 UTC

Two inhibiting problems in developement with tomcat 4

Hello there.

I use tomcat 4.1.12 and there are two problems i have:

- each time I recompile some classes (servlets) I have to
restart tomcat. I have read tomcat 4 has a switch to auto-load
these new classes so I don't have to restart again. What to do
to "turn over" this switch to have auto-loading enabled?

- my own classes show up with "Unknown source" when they throw
an exception and this is giving me a headache on properly debugging.
I use exactly the same project (deploying with ant) on a tomcat 3
server and there the line-numbers are displayed correctly, so I guess
it's something tomcat 4 does - how to configure him to display lines
where the exception occoured correctly?

Thank you in advance,
Lukas

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Two inhibiting problems in developement with tomcat 4

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sun, 15 Dec 2002, Tomcat User wrote:

> Date: Sun, 15 Dec 2002 23:18:13 -0700
> From: Tomcat User <to...@secristfamily.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: Two inhibiting problems in developement with tomcat 4
>
> Lukas Österreicher wrote:
>
> >Maybe I can find that switch somewhere.
> >
> >As to the other problem I'm still wondering. I have the standard binary
> >distribution of tc 4.1.12 and all other sources in the exception do show
> >line numbers, only my own don't.
> >Will you believe me it's tomcat itself somehow if I copy those classes
> >used on tomcat 3 which do show line numbers to my tomcat 4 install and
> >there suddenly they aren't shown?
> >Maybe theres some configuration about this too.
> >
> >Lukas
> >
> >--
> >To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> >
> Does reloading work if you have the reloadable=true attribute within
> your context tag?  (The context tag will be in your server.xml looking
> something like this.)
> <Context path="" docBase="ROOT" debug="0" reloadable="false"
> crossContext="false" />
>  From my understanding, servlets should automatically reload if that
> flag is set to true.
>
> I'm pretty sure there is not a config in tomcat explicitly for not
> printing line numbers when the jvm dumps stacks.  (Can anyone confirm
> this?)  I do know that TC does print the line numbers though if you
> compile with debug info.  I do this all the time, and have verified that
> it works under 4.1.12.  However I can't be 100% sure that this is the
> only mitigating factor, only say - 90% sure since I don't know that part
> of the catalina code base very well yet.
>

There is no configuration in Tomcat controlling this -- indeed, all Tomcat
does with an exception to log it is calls printStackTrace().

Whether line numbers are printed or not is a function of whether the
source code was compiled with the debug command line option (-g).

> Randy

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Two inhibiting problems in developement with tomcat 4

Posted by Tomcat User <to...@secristfamily.com>.
Lukas Österreicher wrote:

>Maybe I can find that switch somewhere.
>
>As to the other problem I'm still wondering. I have the standard binary
>distribution of tc 4.1.12 and all other sources in the exception do show
>line numbers, only my own don't.
>Will you believe me it's tomcat itself somehow if I copy those classes
>used on tomcat 3 which do show line numbers to my tomcat 4 install and
>there suddenly they aren't shown?
>Maybe theres some configuration about this too.
>
>Lukas
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>
Does reloading work if you have the reloadable=true attribute within 
your context tag?  (The context tag will be in your server.xml looking 
something like this.)
<Context path="" docBase="ROOT" debug="0" reloadable="false" 
crossContext="false" />
 From my understanding, servlets should automatically reload if that 
flag is set to true.

I'm pretty sure there is not a config in tomcat explicitly for not 
printing line numbers when the jvm dumps stacks.  (Can anyone confirm 
this?)  I do know that TC does print the line numbers though if you 
compile with debug info.  I do this all the time, and have verified that 
it works under 4.1.12.  However I can't be 100% sure that this is the 
only mitigating factor, only say - 90% sure since I don't know that part 
of the catalina code base very well yet.

Randy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Two inhibiting problems in developement with tomcat 4

Posted by Lukas Österreicher <lu...@sbg.ac.at>.
> I don't know for sure about your first problem since I haven't played
> with auto load extensivly since tomcat 3x.  I believe however that there
> is a switch somewhere in server.xml...
> 
> As for your other problem:
> If you compile your classes without the debugging information, the JVM
> can't tell you what line number exceptions are thrown.  The only reason
> I can think of that TC 4.1.12 wouldn't show you the line numbers would
> be because either your classes, or the classes TC uses were compiled
> without debugging options.  Obviously, this is done to increase runtime
> speed.
> 
> Randy

Maybe I can find that switch somewhere.

As to the other problem I'm still wondering. I have the standard binary
distribution of tc 4.1.12 and all other sources in the exception do show
line numbers, only my own don't.
Will you believe me it's tomcat itself somehow if I copy those classes
used on tomcat 3 which do show line numbers to my tomcat 4 install and
there suddenly they aren't shown?
Maybe theres some configuration about this too.

Lukas

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Two inhibiting problems in developement with tomcat 4

Posted by Tomcat User <to...@secristfamily.com>.
Lukas Österreicher wrote:

>Hello there.
>
>I use tomcat 4.1.12 and there are two problems i have:
>
>- each time I recompile some classes (servlets) I have to
>restart tomcat. I have read tomcat 4 has a switch to auto-load
>these new classes so I don't have to restart again. What to do
>to "turn over" this switch to have auto-loading enabled?
>
>- my own classes show up with "Unknown source" when they throw
>an exception and this is giving me a headache on properly debugging.
>I use exactly the same project (deploying with ant) on a tomcat 3
>server and there the line-numbers are displayed correctly, so I guess
>it's something tomcat 4 does - how to configure him to display lines
>where the exception occoured correctly?
>
>Thank you in advance,
>Lukas
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>
Lukas,

I don't know for sure about your first problem since I haven't played 
with auto load extensivly since tomcat 3x.  I believe however that there 
is a switch somewhere in server.xml...

As for your other problem:
If you compile your classes without the debugging information, the JVM 
can't tell you what line number exceptions are thrown.  The only reason 
I can think of that TC 4.1.12 wouldn't show you the line numbers would 
be because either your classes, or the classes TC uses were compiled 
without debugging options.  Obviously, this is done to increase runtime 
speed.

Randy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>