You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Christoph P.U. Kukulies" <ku...@kukulies.org> on 2016/11/07 17:11:37 UTC

war file incompletely deployed

I started developing a webapp (Windows 7, tomcat 7/x64). I generate a  
WAR file using eclipse/maven. Once built I copy over the war file
to a network share on the tomcat server. The share is the tomcat webapps 
directory.

Once done tomcat autodeploys the .war file into the webapps subdirectory 
with the name of the war file (without extension).

The first time it worked, the war file was named 
designerdemo-1.0-SNAPSHOT.war. Consequently the directory it was 
expanded into
was named designerdemo-1.0.SNAPSHOT with its subdirectories

META-FIN
VAADIN
WEB-INF


Next time after some  name change in the project - actually didn't know 
why the SNAPSHOT part of the name went away -
the directory was named designerdemo and the funny thing - and that's my 
question - is, that it only contains

WEB-INF

The other two directories are missing although they are present in the 
.war file.


Now, when I delete the old designerdemo-1.0.SNAPSHOT directory and .war 
file, next time I start tomcat, the subdirectories are also available
in the new directory designerdemo.

Any clues?


--

Christoph





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


Re: war file incompletely deployed

Posted by "Christoph P.U. Kukulies" <ku...@kukulies.org>.
Am 08.11.2016 um 10:01 schrieb Andr Warnier (tomcat):
> On 08.11.2016 09:47, Christoph P.U. Kukulies wrote:
>> Am 07.11.2016 um 19:09 schrieb Caldarale, Charles R:
>>>> From: Christoph P.U. Kukulies [mailto:kuku@kukulies.org]
>>>> Subject: Re: war file incompletely deployed
>>>> This makes sense somehow, but wouldn't a local move or copy from 
>>>> within
>>>> the server's filesystem have the same complications?
>>> No, a local mv or rename in a modern file system simply changes the 
>>> directory structure;
>>> no copy is performed.  A copy does stand a chance of being caught in 
>>> the middle, but the
>>> timing window is much, much smaller.  Best to use mv/rename whenever 
>>> possible.
>>>
>>>   - Chuck
>> So 'touch' a .LCK file in a  place outside webapps, copy over the 
>> file, when copy done
>> remove the .LCK file.
>>   On the server a background process is running watching for the .LCK 
>> file. when it's
>> gone, it does the 'mv'.
>> (a mv can imply a copy though when it goes across filesystems on 
>> different drives).
>>
>
> Would it not be simpler to just rename the .war file, to .war.lck, 
> then copy it to the destination, then rename it (in place) to .war 
> when the copy is finished ?
> Tomcat should not even consider .war.lck files, right ?
>
>
Ah, yes, forgot about that, that Tomcat wouldn't eat anything that's 
being thrown at it :)

--
Christoph



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


Re: war file incompletely deployed

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 08.11.2016 09:47, Christoph P.U. Kukulies wrote:
> Am 07.11.2016 um 19:09 schrieb Caldarale, Charles R:
>>> From: Christoph P.U. Kukulies [mailto:kuku@kukulies.org]
>>> Subject: Re: war file incompletely deployed
>>> This makes sense somehow, but wouldn't a local move or copy from within
>>> the server's filesystem have the same complications?
>> No, a local mv or rename in a modern file system simply changes the directory structure;
>> no copy is performed.  A copy does stand a chance of being caught in the middle, but the
>> timing window is much, much smaller.  Best to use mv/rename whenever possible.
>>
>>   - Chuck
> So 'touch' a .LCK file in a  place outside webapps, copy over the file, when copy done
> remove the .LCK file.
>   On the server a background process is running watching for the .LCK file. when it's
> gone, it does the 'mv'.
> (a mv can imply a copy though when it goes across filesystems on different drives).
>

Would it not be simpler to just rename the .war file, to .war.lck, then copy it to the 
destination, then rename it (in place) to .war when the copy is finished ?
Tomcat should not even consider .war.lck files, right ?



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


Re: war file incompletely deployed

Posted by "Christoph P.U. Kukulies" <ku...@kukulies.org>.
Am 07.11.2016 um 19:09 schrieb Caldarale, Charles R:
>> From: Christoph P.U. Kukulies [mailto:kuku@kukulies.org]
>> Subject: Re: war file incompletely deployed
>> This makes sense somehow, but wouldn't a local move or copy from within
>> the server's filesystem have the same complications?
> No, a local mv or rename in a modern file system simply changes the directory structure; no copy is performed.  A copy does stand a chance of being caught in the middle, but the timing window is much, much smaller.  Best to use mv/rename whenever possible.
>
>   - Chuck
So 'touch' a .LCK file in a  place outside webapps, copy over the file, 
when copy done remove the .LCK file.
  On the server a background process is running watching for the .LCK 
file. when it's gone, it does the 'mv'.
(a mv can imply a copy though when it goes across filesystems on 
different drives).

--
Christoph


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


RE: war file incompletely deployed

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christoph P.U. Kukulies [mailto:kuku@kukulies.org] 
> Subject: Re: war file incompletely deployed

> This makes sense somehow, but wouldn't a local move or copy from within 
> the server's filesystem have the same complications?

No, a local mv or rename in a modern file system simply changes the directory structure; no copy is performed.  A copy does stand a chance of being caught in the middle, but the timing window is much, much smaller.  Best to use mv/rename whenever possible.

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


Re: war file incompletely deployed

Posted by "Christoph P.U. Kukulies" <ku...@kukulies.org>.
This makes sense somehow, but wouldn't a local move or copy from within 
the server's filesystem
have the same complications? In other words: would a tomcat stop/start 
be required in any situation to be on the safe side?

--
Christoph


Am 07.11.2016 um 18:31 schrieb Caldarale, Charles R:
>> From: Christoph P.U. Kukulies [mailto:kuku@kukulies.org]
>> Subject: war file incompletely deployed
>> I started developing a webapp (Windows 7, tomcat 7/x64). I generate a
>> WAR file using eclipse/maven. Once built I copy over the war file
>> to a network share on the tomcat server. The share is the tomcat webapps
>> directory.
>> Once done tomcat autodeploys the .war file into the webapps subdirectory
>> with the name of the war file (without extension).
> Copying over a network link to the final deployment location can be problematic.  Tomcat's auto-deployment may see a partially written file and initiate deployment prematurely.  Best if you can copy the file to a temporary location on the target server and then mv or rename it to the desired spot.
>
>   - Chuck
>


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


RE: war file incompletely deployed

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christoph P.U. Kukulies [mailto:kuku@kukulies.org] 
> Subject: war file incompletely deployed

> I started developing a webapp (Windows 7, tomcat 7/x64). I generate a  
> WAR file using eclipse/maven. Once built I copy over the war file
> to a network share on the tomcat server. The share is the tomcat webapps 
> directory.

> Once done tomcat autodeploys the .war file into the webapps subdirectory 
> with the name of the war file (without extension).

Copying over a network link to the final deployment location can be problematic.  Tomcat's auto-deployment may see a partially written file and initiate deployment prematurely.  Best if you can copy the file to a temporary location on the target server and then mv or rename it to the desired spot.

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