Re: war not redeploying

2010-08-22 Thread Mark Thomas
On 20/08/2010 15:02, Sean McEligot wrote:
 I'm trying to figure out the logic behind redeploying a war. From
 examining HostConfig.java, it looks like:
 
 1. remembered date of the war file is compared to the current date of
 the war file and the application is redeployed if the current date is
 newer.
 2. The remembered date of the expanded war is compared to the current
 date of that directory and the application is reloaded if the current
 directory date is newer.
 
 So if I deploy while the server is down, it never will be noticed by
 tomcat? This is not what I would have expected.
 
 What I would expect to happen is tomcat to compare the war file date
 to the expanded directory date and redeploy if the war file is newer.

I have some recollection of trying to avoid a situation where the WAR
file ended up having a newer time-stamp than the expanded directory that
resulted in constant redeployment.

Assuming that:
a) the above scenario was an error condition (e.g. WAR with future
date-stamp)
b) the expanded directory always gets the current time-stamp

then Tomcat 7 could certainly be changed to have the behaviour you expect.

For b), need to check:
1. How the expansion currently occurs?
2. Is there any opportunity for an older time-stamp being used?

Mark



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



Re: war not redeploying

2010-08-20 Thread Sean McEligot
On Thu, Aug 19, 2010 at 3:09 PM, Sean McEligot seanmc...@gmail.com wrote:
 I now have one war that redeploys correctly (Cavs.war) and one that
 does not redeploy (blview.war)


 $ ls -l work/Catalina/localhost/
 total 0
 drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-19 14:35 Cavs
 drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-19 14:01 blview (todays date)

 $ ls -l webapps/
 total 19088
 drwxrwx---+ 1 Administrators SYSTEM        0 2010-08-19 14:34 Cavs
 -rwxr-x---+ 1 Sean McEligot  None   17543690 2010-08-19 14:34 Cavs.war
 drwxrwx---+ 1 Administrators SYSTEM        0 2010-08-18 15:36 blview
 (yesterdays date)
 -rwxr-x---+ 1 Sean McEligot  None    1995771 2010-08-19 13:21 blview.war

  ls -ltr webapps/blview/WEB-INF/classes/blview/servlets/
 otal 8
 rwxrwx---+ 1 Administrators SYSTEM 5557 2010-08-18 14:50 BLView.class
 (yesterdays date)

 $ unzip -l webapps/blview.war | grep servlets
     5558  08-19-2010 08:10
 WEB-INF/classes/blview/servlets/BLView.class (today's date)


 It reaches the checkResourcs code that checks the timestamps

 19-Aug-2010 14:04:16.78 FINE
 org.apache.catalina.startup.HostConfig.checkResources Checking
 context[/blview] redeploy resource
 C:\gfm\springsource-tc\misc\webapps\blview.war

 19-Aug-2010 14:04:16.78 FINE
 org.apache.catalina.startup.HostConfig.checkResources Checking
 context[/blview] redeploy resource
 C:\gfm\springsource-tc\misc\webapps\blview

 19-Aug-2010 14:04:16.78 FINE
 org.apache.catalina.startup.HostConfig.checkResources Checking
 context[/blview] reload resource
 c:\gfm\springsource-tc\misc\conf\web.xml

 19-Aug-2010 14:04:16.78 FINE
 org.apache.catalina.startup.HostConfig.checkResources Checking
 context[/blview] reload resource
 c:\gfm\springsource-tc\misc\conf\context.xml


 
  HostConfig.java : checkResources
 
            File resource = new File(resources[i]);
            if (log.isDebugEnabled())
                log.debug(Checking context[ + app.name + ] redeploy
 resource  + resource);
 
 Checking context[/blview] redeploy resource
 C:\gfm\springsource-tc\misc\webapps\blview.war
 
            if (resource.exists()) {
                long lastModified = ((Long)
 app.redeployResources.get(resources[i])).longValue();
                if ((!resource.isDirectory()) 
 resource.lastModified()  lastModified) {
                    // Undeploy application
                    if (log.isInfoEnabled())
 
 Never gets here
 -
                        log.info(sm.getString(hostConfig.undeploy, app.


I'm trying to figure out the logic behind redeploying a war. From
examining HostConfig.java, it looks like:

1. remembered date of the war file is compared to the current date of
the war file and the application is redeployed if the current date is
newer.
2. The remembered date of the expanded war is compared to the current
date of that directory and the application is reloaded if the current
directory date is newer.

So if I deploy while the server is down, it never will be noticed by
tomcat? This is not what I would have expected.

What I would expect to happen is tomcat to compare the war file date
to the expanded directory date and redeploy if the war file is newer.

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



Re: war not redeploying

2010-08-19 Thread Pid
On 18/08/2010 20:04, Sean McEligot wrote:
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.
 

How are you configuring access logging in conf/context.xml?

And why?


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: war not redeploying

2010-08-19 Thread Sean McEligot
On Wed, Aug 18, 2010 at 3:57 PM, Mark Eggers its_toas...@yahoo.com wrote:
 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.

I'll give it a try, thought I can't imaging how cygwin would have
locks unless you cd'd into your expanded war or opened files there.

 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.

I removed both ROOT and manager webapps. Only my webapp remains.

 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

I would like it if it worked without the manager webapp, but I'm think
it doesn't.

 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.

I might try Eclipse, but we have 20 webapps running on 11 tomcat
servers, and one login server must always be running, so it becomes
complicated.


 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.

removed.

 2. There appear to be some issues with with your Resource element describing
 your JDBC connection.

Yes, maxIdle, maxActive. It looked harmless so I never go around to
fixing it, but I'll do that.

 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.

oracle-9.0.2.0.0.jar over oracle.  There is a home grown connection
pool in front of the tomcat pool. It's been used for 11 years to
prevent connection leaks. I can look at that.


 . . . . 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.

    WatchedResourcebuild.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

Re: war not redeploying

2010-08-19 Thread Sean McEligot
On Thu, Aug 19, 2010 at 3:41 AM, Pid p...@pidster.com wrote:
 On 18/08/2010 20:04, Sean McEligot wrote:
    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.


 How are you configuring access logging in conf/context.xml?

Context
  Valve className=org.apache.catalina.valves.AccessLogValve
 prefix=access suffix=.log
 pattern=common/


 And why?

I probably just saw another Valve commented out there (comet) and
added this one in the same place. Where should it go?

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



RE: war not redeploying

2010-08-19 Thread Caldarale, Charles R
 From: Sean McEligot [mailto:seanmc...@gmail.com]
 Subject: Re: war not redeploying
 
 I probably just saw another Valve commented out there (comet) and
 added this one in the same place. Where should it go?

Normally, one just uncomments the existing AccessLogValve in conf/server.xml.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: war not redeploying

2010-08-19 Thread Sean McEligot
On Thu, Aug 19, 2010 at 9:11 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Sean McEligot [mailto:seanmc...@gmail.com]
 Subject: Re: war not redeploying

 I probably just saw another Valve commented out there (comet) and
 added this one in the same place. Where should it go?

 Normally, one just uncomments the existing AccessLogValve in conf/server.xml.

I didn't see that. I only RTFM. I fixed it now. Thanks.


  - 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 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



Re: war not redeploying

2010-08-19 Thread Sean McEligot
I now have one war that redeploys correctly (Cavs.war) and one that
does not redeploy (blview.war)


$ ls -l work/Catalina/localhost/
total 0
drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-19 14:35 Cavs
drwxrwx---+ 1 Administrators SYSTEM 0 2010-08-19 14:01 blview (todays date)

$ ls -l webapps/
total 19088
drwxrwx---+ 1 Administrators SYSTEM0 2010-08-19 14:34 Cavs
-rwxr-x---+ 1 Sean McEligot  None   17543690 2010-08-19 14:34 Cavs.war
drwxrwx---+ 1 Administrators SYSTEM0 2010-08-18 15:36 blview
(yesterdays date)
-rwxr-x---+ 1 Sean McEligot  None1995771 2010-08-19 13:21 blview.war

 ls -ltr webapps/blview/WEB-INF/classes/blview/servlets/
otal 8
rwxrwx---+ 1 Administrators SYSTEM 5557 2010-08-18 14:50 BLView.class
(yesterdays date)

$ unzip -l webapps/blview.war | grep servlets
 5558  08-19-2010 08:10
WEB-INF/classes/blview/servlets/BLView.class (today's date)


It reaches the checkResourcs code that checks the timestamps

19-Aug-2010 14:04:16.78 FINE
org.apache.catalina.startup.HostConfig.checkResources Checking
context[/blview] redeploy resource
C:\gfm\springsource-tc\misc\webapps\blview.war

19-Aug-2010 14:04:16.78 FINE
org.apache.catalina.startup.HostConfig.checkResources Checking
context[/blview] redeploy resource
C:\gfm\springsource-tc\misc\webapps\blview

19-Aug-2010 14:04:16.78 FINE
org.apache.catalina.startup.HostConfig.checkResources Checking
context[/blview] reload resource
c:\gfm\springsource-tc\misc\conf\web.xml

19-Aug-2010 14:04:16.78 FINE
org.apache.catalina.startup.HostConfig.checkResources Checking
context[/blview] reload resource
c:\gfm\springsource-tc\misc\conf\context.xml



 HostConfig.java : checkResources

File resource = new File(resources[i]);
if (log.isDebugEnabled())
log.debug(Checking context[ + app.name + ] redeploy
resource  + resource);

Checking context[/blview] redeploy resource
C:\gfm\springsource-tc\misc\webapps\blview.war

if (resource.exists()) {
long lastModified = ((Long)
app.redeployResources.get(resources[i])).longValue();
if ((!resource.isDirectory()) 
resource.lastModified()  lastModified) {
// Undeploy application
if (log.isInfoEnabled())

Never gets here
-
log.info(sm.getString(hostConfig.undeploy, app.name));

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



war not redeploying

2010-08-18 Thread Sean McEligot
My goal is that when I put an updated war file in webapps, it is
deployed either immediately or on the next startup. I prefer startup,
but I'd  be happy with either. What happens now is sometimes even
after restarting the expanded war is older than the war in webapps.
Nothing seems to get tomcat to notice the new war except: shutdown; rm
-rf webapps/appname work/* temp/*; startup.

My platorm is Windows, but this will be deployed in Solaris. I don't
know if this is a configuration problem or something in my code could
be preventing redeployment. At least knowing where to look would be
helpful.

Here's my current configuration, though I've tried many variations
including context xml fragements and unexpanded wars.

--- server.xml
  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true deployOnStartup=true
deployXML=true
xmlValidation=false xmlNamespaceAware=false
  /Host
---
 context.xml
Context debug=1 privileged=false unpackWAR=true
antiJARLocking=true antiResourceLocking=true unloadDelay=18

!-- Default set of monitored resources --
WatchedResourcebuild.txt/WatchedResource

build.txt is in the root of the war. it is updated each build using
ant's buildnumber task.

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



Re: war not redeploying

2010-08-18 Thread Pid
On 18/08/2010 15:57, Sean McEligot wrote:
 My goal is that when I put an updated war file in webapps, it is
 deployed either immediately or on the next startup. I prefer startup,
 but I'd  be happy with either. What happens now is sometimes even
 after restarting the expanded war is older than the war in webapps.
 Nothing seems to get tomcat to notice the new war except: shutdown; rm
 -rf webapps/appname work/* temp/*; startup.
 
 My platorm is Windows, but this will be deployed in Solaris. I don't
 know if this is a configuration problem or something in my code could
 be preventing redeployment. At least knowing where to look would be
 helpful.
 
 Here's my current configuration, though I've tried many variations
 including context xml fragements and unexpanded wars.
 
 --- server.xml
   Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=true deployOnStartup=true
 deployXML=true
 xmlValidation=false xmlNamespaceAware=false
   /Host
 ---
  context.xml
 Context debug=1 privileged=false unpackWAR=true
 antiJARLocking=true antiResourceLocking=true unloadDelay=18
 
 !-- Default set of monitored resources --
 WatchedResourcebuild.txt/WatchedResource
 
 build.txt is in the root of the war. it is updated each build using
 ant's buildnumber task.

Exact Tomcat version?


p

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



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: war not redeploying

2010-08-18 Thread Sean McEligot
On Wed, Aug 18, 2010 at 11:30 AM, Pid p...@pidster.com wrote:
 On 18/08/2010 15:57, Sean McEligot wrote:
 My goal is that when I put an updated war file in webapps, it is
 deployed either immediately or on the next startup. I prefer startup,
 but I'd  be happy with either. What happens now is sometimes even
 after restarting the expanded war is older than the war in webapps.
 Nothing seems to get tomcat to notice the new war except: shutdown; rm
 -rf webapps/appname work/* temp/*; startup.

 My platorm is Windows, but this will be deployed in Solaris. I don't
 know if this is a configuration problem or something in my code could
 be preventing redeployment. At least knowing where to look would be
 helpful.

 Here's my current configuration, though I've tried many variations
 including context xml fragements and unexpanded wars.

 --- server.xml
       Host name=localhost  appBase=webapps
             unpackWARs=true autoDeploy=true deployOnStartup=true
 deployXML=true
             xmlValidation=false xmlNamespaceAware=false
       /Host
 ---
  context.xml
 Context debug=1 privileged=false unpackWAR=true
 antiJARLocking=true antiResourceLocking=true unloadDelay=18

     !-- Default set of monitored resources --
     WatchedResourcebuild.txt/WatchedResource
 
 build.txt is in the root of the war. it is updated each build using
 ant's buildnumber task.

 Exact Tomcat version?

6.0.25

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



Re: war not redeploying

2010-08-18 Thread Konstantin Kolinko
 6.0.25

An odd version...

 shutdown; rm
-rf webapps/appname work/* temp/*; startup.

Do you run rm -rf on Windows?

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?

 antiJARLocking=true antiResourceLocking=true

It would be better to test on some Linux machine. You won't be using
the above options on Solaris.

Also different end-of-line handling, '/' vs '\', file names, filename
case sensitivity may catch you.

    WatchedResourcebuild.txt/WatchedResource

WatchedResource is used to reload a webapp (e.g. when editing
web.xml), not to redeploy it.  By the way, please create or edit your
webapp's META-INF/context.xml,  not the default one.


Are there any messages in the logs?

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


Best regards,
Konstantin Kolinko

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



Re: war not redeploying

2010-08-18 Thread Sean McEligot
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.

    WatchedResourcebuild.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 

Re: war not redeploying

2010-08-18 Thread Mark Eggers
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.

WatchedResourcebuild.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