You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by hezjing <he...@gmail.com> on 2008/04/22 16:27:17 UTC

Directories in Tomcat 5.5\temp

Hi

I'm developing and testing application (Tomcat 5.5\webapps\myapp)
using Tomcat 5.5 on Windows XP.

After some times, I notice that there are directories created in Tomcat 5.5\temp
1-myapp, 2-myapp, 3-myapp and etc.

These directories are there even after I restarted Tomcat.

Can anyone explaines why these directories are created?
and why these directories are not being clean-up by Tomcat?


-- 

Hez

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Directories in Tomcat 5.5\temp

Posted by Mark Thomas <ma...@apache.org>.
hezjing wrote:
> Hi Chuck
> 
> Hmmm ... I don't think my web application is explicitly writting
> anything into the directory
> 
> When I look further into these directories, they contain the same (and
> only) JAR files of my web application,
> e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
> Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar

Deployment with the tag option?

Use of the anti-locking attributes?

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Directories in Tomcat 5.5\temp

Posted by David Smith <dn...@cornell.edu>.
I *think* the antiResourceLocking in tomcat may cause this if configured 
in your <Context ...> element.  Those with better knowledge might want 
to comment further.  Last I know the webapp is copied/expanded to either 
temp or work when it's enabled.

--David

hezjing wrote:
> Hi Chuck
>
> Hmmm ... I don't think my web application is explicitly writting
> anything into the directory.
>
> When I look further into these directories, they contain the same (and
> only) JAR files of my web application,
> e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
> Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar
>
>
> On Tue, Apr 22, 2008 at 11:09 PM, Caldarale, Charles R
> <Ch...@unisys.com> wrote:
>   
>>> From: hezjing [mailto:hezjing@gmail.com]
>>> Subject: Directories in Tomcat 5.5\temp
>>>
>>> Can anyone explaines why these directories are created?
>>>       
>> Your webapps are creating them.
>>
>>     
>>> and why these directories are not being clean-up by Tomcat?
>>>       
>> Tomcat merely provides the workspace for the webapps; usage of it,
>> including any desired cleanup, is up to the webapps.
>>
>>  - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Directories in Tomcat 5.5\temp

Posted by hezjing <he...@gmail.com>.
You may read more about the log4j error at
http://marc.info/?l=log4j-user&m=120897082320333&w=2

So, that seems to be a normal behaviour in Tomcat.

Maybe we should conclude that this is an expected side-effect of using
antiResourceLocking?

:-)


On 4/23/08, Caldarale, Charles R <Ch...@unisys.com> wrote:
> > From: hezjing [mailto:hezjing@gmail.com]
> > Subject: Re: Directories in Tomcat 5.5\temp
> >
> >     log4j:ERROR LogMananger.repositorySelector was null likely due to
> > error in class reloading, using NOPLoggerRepository.
>
> Not likely to be the problem, but I can't be sure.
>
> >     23-Apr-2008 21:06:31 org.apache.catalina.core.AprLifecycleListener
> > lifecycleEvent
> >     INFO: Failed shutdown of Apache Portable Runtime
>
> This certainly isn't the cause; that's just because you don't have APR
> installed.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 

Hez

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Directories in Tomcat 5.5\temp

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: hezjing [mailto:hezjing@gmail.com] 
> Subject: Re: Directories in Tomcat 5.5\temp
> 
>     log4j:ERROR LogMananger.repositorySelector was null likely due to
> error in class reloading, using NOPLoggerRepository.

Not likely to be the problem, but I can't be sure.

>     23-Apr-2008 21:06:31 org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
>     INFO: Failed shutdown of Apache Portable Runtime

This certainly isn't the cause; that's just because you don't have APR
installed.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Directories in Tomcat 5.5\temp

Posted by hezjing <he...@gmail.com>.
The Monitor Tomcat is one of the menu items created by Tomcat installer.
You can find it from Windows Start -> Programs -> Apache Tomcat 5.5 ->
Monitor Tomcat
where it's target is pointing to Tomcat 5.5\bin\tomcat5w.exe.

My application is using log4j release 1.2.15 and now, I noticed the
following suspicious error in stdout_20080423.log (appeared after
Tomcat is stopped),

    log4j:ERROR LogMananger.repositorySelector was null likely due to
error in class reloading, using NOPLoggerRepository.


and this INFO message in catalina.2008-04-23.log,

    23-Apr-2008 21:06:31 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
    INFO: Failed shutdown of Apache Portable Runtime


I'm not sure if the above is causing the abrupt termination of Tomcat?



On Wed, Apr 23, 2008 at 12:28 AM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
> > From: hezjing [mailto:hezjing@gmail.com]
> > Subject: Re: Directories in Tomcat 5.5\temp
> >
> > Yes, I'm using antiResourceLocking as shown in Tomcat
> > 5.5\webapps\myapp\META-INF
>
> Unless you really, really need that, I'd turn it off.
>
> > I stopped Tomcat service normally (using Monitor Tomcat).
>
> I don't know what that is, but I suspect it's causing an abrupt
> termination rather than an orderly shutdown.  You should be using either
> the shutdown script or the tomcat5w.exe program to stop the Tomcat
> service.
>
> > The following are the steps I performed,
>
> The exact same steps (using the tomcat5w.exe program to start/stop the
> service) work fine for me, and result in an empty temp directory.
>
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



-- 

Hez

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Directories in Tomcat 5.5\temp

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: hezjing [mailto:hezjing@gmail.com] 
> Subject: Re: Directories in Tomcat 5.5\temp
> 
> Yes, I'm using antiResourceLocking as shown in Tomcat 
> 5.5\webapps\myapp\META-INF

Unless you really, really need that, I'd turn it off.

> I stopped Tomcat service normally (using Monitor Tomcat).

I don't know what that is, but I suspect it's causing an abrupt
termination rather than an orderly shutdown.  You should be using either
the shutdown script or the tomcat5w.exe program to stop the Tomcat
service.

> The following are the steps I performed,

The exact same steps (using the tomcat5w.exe program to start/stop the
service) work fine for me, and result in an empty temp directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Directories in Tomcat 5.5\temp

Posted by hezjing <he...@gmail.com>.
Yes, I'm using antiResourceLocking as shown in Tomcat 5.5\webapps\myapp\META-INF

<Context reloadable="true" antiJARLocking="true" antiResourceLocking="true">
<Manager className="org.apache.catalina.session.PersistentManager"
saveOnRestart="false" />
</Context>


I stopped Tomcat service normally (using Monitor Tomcat).
The following are the steps I performed,

1) Stopped Tomcat 5.5 service.
2) Delete all files in Tomcat 5.5\temp\.
3) Started Tomcat 5.5 service.
4) Tomcat created Tomcat 5.5\temp\0-myapp\.
5) Opened IE and load http://localhost:8080/myapp, then closed IE.
6) Stopped Tomcat 5.5 service.

7) Tomcat 5.5\temp\0-myapp still exists


On Tue, Apr 22, 2008 at 11:53 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
> > From: hezjing [mailto:hezjing@gmail.com]
> > Subject: Re: Directories in Tomcat 5.5\temp
> >
> > When I look further into these directories, they contain the same (and
> > only) JAR files of my web application,
> > e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
> > Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar
>
> You must have antiResourceLocking set to "true" for those (or possibly
> all) webapps.  Doing so will indeed cause Tomcat to use the temp
> directory; however, with a normal Tomcat shutdown, these will be
> removed.  Are you terminating Tomcat abnormally, or are you just poking
> around while it's running?
>
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



-- 

Hez

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Directories in Tomcat 5.5\temp

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: hezjing [mailto:hezjing@gmail.com] 
> Subject: Re: Directories in Tomcat 5.5\temp
> 
> When I look further into these directories, they contain the same (and
> only) JAR files of my web application,
> e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
> Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar

You must have antiResourceLocking set to "true" for those (or possibly
all) webapps.  Doing so will indeed cause Tomcat to use the temp
directory; however, with a normal Tomcat shutdown, these will be
removed.  Are you terminating Tomcat abnormally, or are you just poking
around while it's running?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Directories in Tomcat 5.5\temp

Posted by hezjing <he...@gmail.com>.
Hi Chuck

Hmmm ... I don't think my web application is explicitly writting
anything into the directory.

When I look further into these directories, they contain the same (and
only) JAR files of my web application,
e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar


On Tue, Apr 22, 2008 at 11:09 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
> > From: hezjing [mailto:hezjing@gmail.com]
> > Subject: Directories in Tomcat 5.5\temp
> >
> > Can anyone explaines why these directories are created?
>
> Your webapps are creating them.
>
> > and why these directories are not being clean-up by Tomcat?
>
> Tomcat merely provides the workspace for the webapps; usage of it,
> including any desired cleanup, is up to the webapps.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



-- 

Hez

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Directories in Tomcat 5.5\temp

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: hezjing [mailto:hezjing@gmail.com] 
> Subject: Directories in Tomcat 5.5\temp
> 
> Can anyone explaines why these directories are created?

Your webapps are creating them.

> and why these directories are not being clean-up by Tomcat?

Tomcat merely provides the workspace for the webapps; usage of it,
including any desired cleanup, is up to the webapps.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org