Are you starting and stopping Tomcat under Cygwin? I've seen some interesting 
file locking problems (as well as the "terminate batch job?" question) when 
running Windows applications under Cygwin.

How are you deploying your web application? Are you copying the new war file 
into $CATALINA_HOME/webapps, using the manager application, or deploying via an 
IDE?

I'm on Linux at the moment, so I can't explore this. However, here are some 
things you might try.

1. Run everything under DOS.

If you're a UNIX person, then this is not going to be as comfortable as running 
Cygwin, but it will remove some unintended consequences. Or as Konstantin 
suggested, run things on Linux.

2. Use the manager application for deployment.


If you are looking at a command line mechanism for deploying applications to 
production, you might take a look at the Ant tasks. Documentation for the Ant 
tasks can be found here:

http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Executing_Manager_Commands_With_Ant


(sorry for the wrapped line)

3. Use the IDE in a development environment

Both NetBeans and Eclipse allow you to deploy to a running Tomcat (and start / 
stop Tomcat) from within the IDE. In a development environment I find that much 
more convenient than opening a shell and executing commands.

Some quick notes on your web application (which I don't think will affect its 
loading and unloading):

1. Debug is no longer a valid attribute for the Context element.
2. There appear to be some issues with with your Resource element describing 
your JDBC connection.
3. Some of the connection pool threads issues could be due to a JDBC driver. If 
you're using MySQL, make sure you have the latest JDBC driver. Versions before 
5.1.11 did cause problems.

. . . . just my two cents.

/mde/


----- Original Message ----
From: Sean McEligot <seanmc...@gmail.com>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Wed, August 18, 2010 12:04:46 PM
Subject: Re: war not redeploying

On Wed, Aug 18, 2010 at 11:56 AM, Konstantin Kolinko
<knst.koli...@gmail.com> wrote:
>> 6.0.25
>
> An odd version...

I'm in the middle of purchasing springsource-tc. The version is
actually springsource tomcat-6.0.25.A-RELEASE, but I don't think they
change anything except they have multiple catalina.base servers for
one catalina.home. I had the same problem on standard tomcat 6.0.20.

>
>> shutdown; rm
> -rf webapps/appname work/* temp/*; startup.
>
> Do you run rm -rf on Windows?

Yes. I'm using cygwin.

> Note, that there is also the following file:
> conf/Catalina/localhost/<appname>.xml   What is its modification time?
> Is clock set up correctly on the machine?

The clock is working.There isn't anything in conf/Catalina/localhost.
The directory is empty.
>
>> antiJARLocking="true" antiResourceLocking="true"
>
> It would be better to test on some Linux machine. You won't be using
> the above options on Solaris.

Well, this is important in production, but also in development. Since
the problem is sporadic and fails silently. There's been a few
occasions where I think my code fix isn't working, only to find out
the code was never deployed. That can be very frustrating.

For now I'll reset the context.xml to <Context> since none of those
options are helping me.

>
> Also different end-of-line handling, '/' vs '\', file names, filename
> case sensitivity may catch you.
>
>>    <WatchedResource>build.txt</WatchedResource>
>
> WatchedResource is used to reload a webapp (e.g. when editing
> web.xml), not to redeploy it.

OK. I don't need WatchedResource then. I've removed it.

>   By the way, please create or edit your
> webapp's META-INF/context.xml,  not the default one.

I've reset context.xml back to default except jdbc resources and access logging.

> Are there any messages in the logs?

No. The logs are silent when I deploy. There were some errors on the
last undeploy before it stopped working. See below.

>
> Are you using this webapps folder (e.g., Tomcat can be run with a
> different CATALINA_BASE).

I'm sure because I've verified it when redeploy is working.


> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Here's the logs from deploying and then undeploying the war. After
this it does not redeploy and there are no message when I try to
redeploy.

18-Aug-2010 14:16:22.796 INFO
org.apache.catalina.startup.HostConfig.deployWAR Deploying web
application archive blview.war

18-Aug-2010 14:16:24.546 WARNING
org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
maxActive, setting maxIdle to: 2

18-Aug-2010 14:16:24.562 WARNING
org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
maxActive, setting maxIdle to: 2

18-Aug-2010 14:16:24.562 WARNING
org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
maxActive, setting maxIdle to: 2

18-Aug-2010 14:16:24.562 WARNING
org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
maxActive, setting maxIdle to: 2

18-Aug-2010 14:16:24.562 WARNING
org.apache.tomcat.jdbc.pool.ConnectionPool.init maxIdle is larger than
maxActive, setting maxIdle to: 2

18-Aug-2010 14:17:06.437 WARNING
com.springsource.tcserver.serviceability.request.ThreadDiagnosticsValve.log
RequestDiagnostics[slow-request]
com.springsource.tcserver.serviceability.request.threaddiagnost...@323274
- Requests Statistics[1]:
    URI:/blview/BLView
        Query String:null
    Start Time:18 Aug 2010 18:16:52 GMT
    Completion Time:18 Aug 2010 18:17:06 GMT
    Duration:14359 ms.
    GC Collections:8 .
    GC Collection Times:24 ms.
        GC Bean:Copy Collections:8 Collection Time:24
        GC Bean:MarkSweepCompact Collections:0 Collection Time:0
    Nr of Connections Acquired(success):0
    Nr of Connections Acquired(failures):0
    Time waiting for a connection:0 ms.
    Queries[0]
    Queries[0 ms.]


18-Aug-2010 14:19:51.671 INFO
org.apache.catalina.startup.HostConfig.checkResources Undeploying
context [/blview]

18-Aug-2010 14:19:51.718 SEVERE
org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
web application appears to have started a thread named
[[Pool-Cleaner]:Tomcat Connection Pool[1-31022504]] but has failed to
stop it. This is very likely to create a memory leak.

18-Aug-2010 14:19:51.718 SEVERE
org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
web application appears to have started a thread named
[[Pool-Cleaner]:Tomcat Connection Pool[2-31022504]] but has failed to
stop it. This is very likely to create a memory leak.

18-Aug-2010 14:19:51.718 SEVERE
org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
web application appears to have started a thread named
[[Pool-Cleaner]:Tomcat Connection Pool[3-31022504]] but has failed to
stop it. This is very likely to create a memory leak.

18-Aug-2010 14:19:51.718 SEVERE
org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
web application appears to have started a thread named
[[Pool-Cleaner]:Tomcat Connection Pool[4-31022504]] but has failed to
stop it. This is very likely to create a memory leak.

18-Aug-2010 14:19:51.718 SEVERE
org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads A
web application appears to have started a thread named
[[Pool-Cleaner]:Tomcat Connection Pool[5-31022504]] but has failed to
stop it. This is very likely to create a memory leak.

18-Aug-2010 14:19:51.718 SEVERE
org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap A web
application created a ThreadLocal with key of type [null] (value
[ch.qos.logback.core.unsynchronizedappenderbas...@1abdac9]) and a
value of type [java.lang.Boolean] (value [false]) but failed to remove
it when the web application was stopped. To prevent a memory leak, the
ThreadLocal has been forcibly removed.

18-Aug-2010 14:19:51.718 SEVERE
org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap A web
application created a ThreadLocal with key of type [null] (value
[ch.qos.logback.core.unsynchronizedappenderbas...@1abdac9]) and a
value of type [java.lang.Boolean] (value [false]) but failed to remove
it when the web application was stopped. To prevent a memory leak, the
ThreadLocal has been forcibly removed.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


      


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to