You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aaron Axelsen <li...@frozenpc.net> on 2008/08/27 20:49:10 UTC

antioJarLocking not working

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Is there a trick to get antiJarLocking and antiResourceLocking to work 
with tomcat 6?  I have the following in the config:

<Host name="nix-tester.mcs.uww.edu" appBase="D:/path/to/webroots/docs"
~    unpackWARs="true" autoDeploy="true">
~    <Context path="" docBase="." debug="5" antiJARLocking="true" 
antiResourceLocking="true" />
~    <Valve className="org.apache.catalina.valves.AccessLogValve"
~    directory="logs"  prefix="localhost_access_log." suffix=".txt"
~    pattern="common" resolveHosts="false"/>

~        <Logger className="org.apache.catalina.logger.FileLogger"
~            directory="logs"  prefix="mcs." suffix=".txt"
~        timestamp="true"/>

</Host>

There do not appear to be any error logs on anything, but the jar's are 
still locked preventing redeploy.

- --
Aaron Axelsen
lists@frozenpc.net

Great hosting, low prices.  Modevia Web Services LLC -- 
http://www.modevia.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFItaGluucONIvD0AMRAlldAJ0RQtTCLuHH5/SHv0fFxl0oPHwP2QCfdmHs
aBo76+ehIZ+MpTczLkMZNQQ=
=HsM9
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "Aaron Axelsen" <li...@frozenpc.net>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Sunday, August 31, 2008 9:39 PM
Subject: Re: antioJarLocking not working


>I tried sticking the jars there - but it did not seem to make any
> difference.
>
> Let me recap on what we are trying to accomplish.
>
> The instructor for the course is using the NetBeans 6.5 IDE for ruby
> development.  The students would then create a war file for deployment
> on tomcat 6.  The students will upload the war folder to a deploy
> folder, from which a scheduled script will copy the war files into the
> tomcat document root for deployment.

tomcat document root?
Does that mean webapps folder? As a war or unpacked?

Would love to know what the actual error message is when its just a standard 
TC setup... its a big clue ;)
The thing that made you want to do antilocking in the first place?

Aaron, I think your best bet is to get into the ruby mailing list, which 
could well be the netbeans mailing list now, because I think ruby is now 
Suns baby.
I think Ruby is broken...
You see, I think that antiFile locking when tomcat is using a class, and 
some other app has to come in an say read an icon from a package is one 
thing...
but I think if a class loader is just not letting go... thats a bug.

So say ruby has some native code... and say that is started as a static 
variable... often is in a kind of singleton...
Now that thing is sitting inside tomcat, and tomcat just cant let it go... 
it wants to but ruby is running and so tomcat politely waits for it... 
forever.
Windows says get lost, something is busy with this folder... which you would 
see if you just tried to delete that folder, after its run...
So if windows cant even delete it... no chance that TC can change it...
So I'm not sure at all if antiLocking means... I can fix a screwed webapp... 
thats whats bugging me.

Would not be surprized at all that ruby has a few things set if targeting a 
webapp... as opposed to running as a machine scripting tool.
Possibly theres a lib that nust not be included... or something.

Unfortunately I dont know ruby and actually hardly see it mentioned in TC's 
mailing list.

Good luck...

ps what I would try do is from /manager/html
Try undeploy the old one and deploy the war from the web page...
If that works... TC does have ant script that does the same thing...
ie maybe undeploying an existing app is enough to get TC to kill the thing.
Sorry cant help more ;(

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--------------------------------------------------------------------------- 


---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Aaron Axelsen <li...@frozenpc.net>.
I tried sticking the jars there - but it did not seem to make any
difference.

Let me recap on what we are trying to accomplish.

The instructor for the course is using the NetBeans 6.5 IDE for ruby
development.  The students would then create a war file for deployment
on tomcat 6.  The students will upload the war folder to a deploy
folder, from which a scheduled script will copy the war files into the
tomcat document root for deployment.

With just antijarlocking set, the jruby and complete jars are still
locked my tomcat, and re-deployment of the jar fails until a complete
server restart.

Antiresource locking does solve the issue of the jar's being locked,
however when set to true, whenever the application is loaded, tomcat
looks in %CATALINA_HOME%\temp-appname for the files, which does not
exist.  If I manually copy files into that folder from the temp folder,
things work as expected.  If we can just figure out how to get that
folder correctly populated (or get tomcat looking in the right place)
everything would be working correctly.

If anyone has any thoughts or ideas, please share!


Mark Thomas wrote:
> Johnny Kewl wrote:
>   
>> ----- Original Message ----- From: "Aaron Axelsen" <li...@frozenpc.net>
>> To: "Tomcat Users List" <us...@tomcat.apache.org>
>> Sent: Thursday, August 28, 2008 10:19 PM
>> Subject: Re: antioJarLocking not working
>>
>>
>>     
>>> The jar's its probably having issues with are jruby-complete-1.1.3.jar
>>> and jruby-rack-0.9.1.jar since those are the ones that were getting
>>> locked.  Any suggestions on anything else I can try to attempt to
>>> resolve it?
>>>       
>
> I wouldn't normally recommend it but what happens if you just stick
> those jars in %CATALINA_HOME%\lib so they are available to every web app
> and never get reloaded?
>
> 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
>
>
>   

-- 
Aaron Axelsen
lists@frozenpc.net

Great hosting, low prices.  Modevia Web Services LLC -- http://www.modevia.com


---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Mark Thomas <ma...@apache.org>.
Johnny Kewl wrote:
> 
> ----- Original Message ----- From: "Aaron Axelsen" <li...@frozenpc.net>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Thursday, August 28, 2008 10:19 PM
> Subject: Re: antioJarLocking not working
> 
> 
>> The jar's its probably having issues with are jruby-complete-1.1.3.jar
>> and jruby-rack-0.9.1.jar since those are the ones that were getting
>> locked.  Any suggestions on anything else I can try to attempt to
>> resolve it?

I wouldn't normally recommend it but what happens if you just stick
those jars in %CATALINA_HOME%\lib so they are available to every web app
and never get reloaded?

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: antioJarLocking not working

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "Aaron Axelsen" <li...@frozenpc.net>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, August 28, 2008 10:19 PM
Subject: Re: antioJarLocking not working


> The jar's its probably having issues with are jruby-complete-1.1.3.jar
> and jruby-rack-0.9.1.jar since those are the ones that were getting
> locked.  Any suggestions on anything else I can try to attempt to
> resolve it?
>
> -- Aaron

Hi... I have no idea, we actually run mostly on XP and I've never had a 
locking issue yet... thank goodness, probably because the dev env is windows 
so it wont get past go to begin with....
But maybe a good clue would be to explain what actuall happens when you dont 
use antiJarLocking... ie what happens and what is the actual error when you 
just run it on a stock standard TC... may wake up a few brilliant minds in 
the group ;)
Thanks...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--------------------------------------------------------------------------- 


---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Aaron Axelsen <li...@frozenpc.net>.
The jar's its probably having issues with are jruby-complete-1.1.3.jar
and jruby-rack-0.9.1.jar since those are the ones that were getting
locked.  Any suggestions on anything else I can try to attempt to
resolve it?

-- Aaron

Mark Thomas wrote:
> Aaron Axelsen wrote:
>   
>> I set the workdir on the global context - I can see that files are being
>> created there, however that same error still exists.  For some reason it
>> insists on looking in Tomcat 6\temp-Foo5
>>
>> Any suggestions?
>>     
>
> It looks like a bug in the jar. It might be using a non-portable way to
> find the file.
>
> Mark
>
>
>
>   
>> Mark Thomas wrote:
>> | Aaron Axelsen wrote:
>> |> I understand how it works - the problem is that the folder is not
>> |> actually getting created.  I double checked permissions - and the apache
>> |> user does have full permissions to that tomcat 6 folder.  Any thoughts?
>> |>
>> |> The name of the war is temp Foo5.war.  I can see folders getting created
>> |> inside of the temp folder, but the temp-Foo5 folder inside of the tomcat
>> |> 6 directory is not getting created.
>> |
>> | It looks like the lib is looking in the wrong place. If you haven't
>> set an
>> | explicit workDir then underneath %CATALINA_BASE%\work is where I would
>> | expect the war to be unpacked and from what you say, that is what is
>> happening.
>> |
>> | 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
>> |
>> |
>>     
>
> ---------------------------------------------------------------------
> 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
>
>
>   

-- 
Aaron Axelsen
lists@frozenpc.net

Great hosting, low prices.  Modevia Web Services LLC -- http://www.modevia.com


---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Mark Thomas <ma...@apache.org>.
Aaron Axelsen wrote:
> I set the workdir on the global context - I can see that files are being
> created there, however that same error still exists.  For some reason it
> insists on looking in Tomcat 6\temp-Foo5
> 
> Any suggestions?

It looks like a bug in the jar. It might be using a non-portable way to
find the file.

Mark



> 
> Mark Thomas wrote:
> | Aaron Axelsen wrote:
> |> I understand how it works - the problem is that the folder is not
> |> actually getting created.  I double checked permissions - and the apache
> |> user does have full permissions to that tomcat 6 folder.  Any thoughts?
> |>
> |> The name of the war is temp Foo5.war.  I can see folders getting created
> |> inside of the temp folder, but the temp-Foo5 folder inside of the tomcat
> |> 6 directory is not getting created.
> |
> | It looks like the lib is looking in the wrong place. If you haven't
> set an
> | explicit workDir then underneath %CATALINA_BASE%\work is where I would
> | expect the war to be unpacked and from what you say, that is what is
> happening.
> |
> | 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
> |
> |

---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Aaron Axelsen <li...@frozenpc.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
I set the workdir on the global context - I can see that files are being 
created there, however that same error still exists.  For some reason it 
insists on looking in Tomcat 6\temp-Foo5

Any suggestions?

Mark Thomas wrote:
| Aaron Axelsen wrote:
|> I understand how it works - the problem is that the folder is not
|> actually getting created.  I double checked permissions - and the apache
|> user does have full permissions to that tomcat 6 folder.  Any thoughts?
|>
|> The name of the war is temp Foo5.war.  I can see folders getting created
|> inside of the temp folder, but the temp-Foo5 folder inside of the tomcat
|> 6 directory is not getting created.
|
| It looks like the lib is looking in the wrong place. If you haven't set an
| explicit workDir then underneath %CATALINA_BASE%\work is where I would
| expect the war to be unpacked and from what you say, that is what is 
happening.
|
| 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
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFItdB9uucONIvD0AMRAhSvAJoDOyxwS62gizF2dIMJG2PQD5nzEQCg5FR0
OGFDPhGFarQifvNNXlSHU/U=
=5jVu
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Mark Thomas <ma...@apache.org>.
Aaron Axelsen wrote:
> I understand how it works - the problem is that the folder is not
> actually getting created.  I double checked permissions - and the apache
> user does have full permissions to that tomcat 6 folder.  Any thoughts?
> 
> The name of the war is temp Foo5.war.  I can see folders getting created
> inside of the temp folder, but the temp-Foo5 folder inside of the tomcat
> 6 directory is not getting created.

It looks like the lib is looking in the wrong place. If you haven't set an
explicit workDir then underneath %CATALINA_BASE%\work is where I would
expect the war to be unpacked and from what you say, that is what is happening.

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: antioJarLocking not working

Posted by Aaron Axelsen <li...@frozenpc.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I understand how it works - the problem is that the folder is not
actually getting created.  I double checked permissions - and the apache
user does have full permissions to that tomcat 6 folder.  Any thoughts?

The name of the war is temp Foo5.war.  I can see folders getting created
inside of the temp folder, but the temp-Foo5 folder inside of the tomcat
6 directory is not getting created.

- -- Aaron

Mark Thomas wrote:
| Aaron Axelsen wrote:
|> Is there any reason its going to look in temp-Foo5?
| That is how the antiresource locking works. It copies the entire war to a
| temp location with a unique name and runs it from there. If you reload it
| would probably use temp-Foo6 etc.
|
| 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
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItcN+uucONIvD0AMRAgRmAJ9lOJUT13o48mZIPvO4lt5bT+KAVQCfYZfC
cZmy4vdh7ABORBc/gkpFtaI=
=hQhb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Mark Thomas <ma...@apache.org>.
Aaron Axelsen wrote:
> Is there any reason its going to look in temp-Foo5?
That is how the antiresource locking works. It copies the entire war to a
temp location with a unique name and runs it from there. If you reload it
would probably use temp-Foo6 etc.

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: antioJarLocking not working

Posted by Aaron Axelsen <li...@frozenpc.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
The reason we have docbase == appbase is because students will upload 
war files to the doc base for deployment within a given subdomain.  
However, that said, there is no reason why we need to set the context 
path at all, since the war files all deploy to their own folder.

With antiResourceLocking turned on at the global level, I get the 
following errors - Caused by: org.jruby.exceptions.RaiseException: No 
such file to load -- C:\Program Files\Apache Software Foundation\Tomcat 
6.0\temp-Foo5\WEB-INF/config/environment.rb

Is there any reason its going to look in temp-Foo5?  If I copy files 
there out of the temp folder, things work correctly, but it's unclear to 
me why its looking there.  Did I miss a step?

<Host name="nix-tester.mcs.uww.edu" appBase="D:/path/to/webroots/docs"
~    unpackWARs="true" autoDeploy="true">

~    <Valve className="org.apache.catalina.valves.AccessLogValve"
~    directory="logs"  prefix="localhost_access_log." suffix=".txt"
~    pattern="common" resolveHosts="false"/>

~        <Logger className="org.apache.catalina.logger.FileLogger"
~            directory="logs"  prefix="mcs." suffix=".txt"
~        timestamp="true"/>

</Host>

global context.xml

<Context antiJARLocking="true" antiResourceLocking="true">

~    <!-- Default set of monitored resources -->
~    <WatchedResource>WEB-INF/web.xml</WatchedResource>

~    <!-- Uncomment this to disable session persistence across Tomcat 
restarts -->
~    <!--
~    <Manager pathname="" />
~    -->

~    <!-- Uncomment this to enable Comet connection tacking (provides events
~         on session expiration as well as webapp lifecycle) -->
~    <!--
~    <Valve 
className="org.apache.catalina.valves.CometConnectionManagerValve" />
~    -->

</Context>


Mark Thomas wrote:
| Aaron Axelsen wrote:
|> Is there a trick to get antiJarLocking and antiResourceLocking to work
|> with tomcat 6?  I have the following in the config:
|>
|> <Host name="nix-tester.mcs.uww.edu" appBase="D:/path/to/webroots/docs"
|> ~    unpackWARs="true" autoDeploy="true">
|> ~    <Context path="" docBase="." debug="5" antiJARLocking="true"
|> antiResourceLocking="true" />
|
| Setting docBase==appBase is going to get you a world of pain.
|
| I suspect you want to set this for all contexts. A read of
| http://tomcat.apache.org/tomcat-6.0-doc/config/context.html, particularly
| the first section, should help.
|
| 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
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFItb6RuucONIvD0AMRAk3jAJ96i34G9WEso67GEL3K6yuoulPsewCggXf7
QfRX4H4eWXb5IHO1RU7YET4=
=10Gh
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
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: antioJarLocking not working

Posted by Mark Thomas <ma...@apache.org>.
Aaron Axelsen wrote:
> Is there a trick to get antiJarLocking and antiResourceLocking to work
> with tomcat 6?  I have the following in the config:
> 
> <Host name="nix-tester.mcs.uww.edu" appBase="D:/path/to/webroots/docs"
> ~    unpackWARs="true" autoDeploy="true">
> ~    <Context path="" docBase="." debug="5" antiJARLocking="true"
> antiResourceLocking="true" />

Setting docBase==appBase is going to get you a world of pain.

I suspect you want to set this for all contexts. A read of
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html, particularly
the first section, should help.

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: antioJarLocking not working

Posted by Vikas Sharma <sh...@rediffmail.com>.
Hi,

I am also using antiResourceLocking flag in context.xml.  Once the flag is
set to true, Tomcat starts exploding web application in temp directory. It
works well for me in Linux and Windows environment, but in AIX, I cannot
even start tomcat with antiResourceLocking flag set to true.

When I saw my application folder in temp (AIX box), I noticed that all files
were of zero bytes. And in the catalina logs I see lots of SAX parse
exception. Well since all files including web.xml is of 0 bytes, it starts
throwing XML parse exception.

Does anyone have work around for this problem? I am using tomcat 6.018.

Vikas
-- 
View this message in context: http://www.nabble.com/antioJarLocking-not-working-tp19187318p19565053.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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