From: Krystian S. <Kry...@in...> - 2008-02-22 12:18:58
|
I've tried your way. I've downloaded the jetty, created work directory, deleted the contents of webapps and context, put there test.war and test.xml, commented out the web deployer and I still get the same result :/. My test.xml file: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <Set name="contextPath">/test</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/test.war</Set> <Set name="extractWAR">true</Set> <Set name="copyWebDir">false</Set> <Set name="tempDirectory"><SystemProperty name="jetty.home" default="."/>/work</Set> </Configure> I have also tried without the test.xml file and with webapp deployer uncommented in jetty.xml, but got the same result. You have mentioned that there might be something wrong with my web app. What could possibly cause jetty to delete everything on exit? Best regards, Krystian -----Original Message----- From: jet...@li... [mailto:jet...@li...] On Behalf Of Krystian Szczesny Sent: 22 February 2008 11:31 To: Jetty usage, help & informal support Subject: Re: [Jetty-support] Jetty deletesALMOSTwhole workdir whenshuttingdown Ok, I will try that, although my 'embedded' jetty is different then yours in only one way: I have packaged all the jetty jars into one and class which starts it is just: public class Main { public static void main(String[] args) throws Exception { System.setProperty("DEBUG", "true"); Server server = new Server(); XmlConfiguration configuration = new XmlConfiguration(new FileInputStream(args[0])); configuration.configure(server); server.start(); } } And I have tried running my app with jetty standalone, but got the same errors, that is why I suppose it's something with the configuration. But I will try to do it the way you described. Best regards, Krystian -----Original Message----- From: jet...@li... [mailto:jet...@li...] On Behalf Of David Yu Sent: 22 February 2008 11:11 To: Jetty usage, help & informal support Subject: Re: [Jetty-support] Jetty deletes ALMOSTwhole workdir whenshuttingdown Correction: - Put that test.war in $jetty.home/webapps and *delete* everything else in that dir David Yu wrote: > Ok. Since you're embedding jetty( as you said), its pretty hard to > reproduce what you have.( I dunno how you are embedding jetty) > > If you want to validate if its really a jetty bug and not a > misconfiguration(or something in your app), then: > - Try downloading a fresh jetty-6.1.7 . > - Make a "work" dir on $jetty.home. > - Package $jetty.home/webapps/test into a war ( cd > $jetty.home/webapps/test then jar cvf test.war *.* ) > - Put that test.war in $jetty.home/webapps and everything else in that > dir > - Comment out the context deployer in $jetty.home/etc/jetty.xml > - Start jetty(java -jar start.jar) > - Stop jetty( ctrl+c when the server startup finished) > - Check if the contents of the "work" dir gets deleted as you say. > > Cheers > > Krystian Szczesny wrote: >> I'm so sorry. >> Yes, I did comment out the webdeployer in jetty.xml file. >> Here are the logs. >> >> Thank you, >> Best regards, >> Krystian >> >> >> -----Original Message----- >> From: jet...@li... >> [mailto:jet...@li...] On Behalf Of David >> Yu >> Sent: 22 February 2008 10:02 >> To: Jetty usage, help & informal support Subject: Re: [Jetty-support] >> Jetty deletes ALMOST whole workdir >> whenshuttingdown >> >> Krystian, >> >> Did you uncomment the WebappDeployer in your jetty.xml? >> And yea, kindly attach the debug logs of your last configuraiton. >> >> P.S On my end, jetty does not delete the contents of the temp dir. >> >> Cheers >> >> >> Krystian Szczesny wrote: >> >>> Hi, >>> >>> I have moved the war file to contexts directory, so now my test.xml >>> >> file >> >>> in contexts dir looks like: >>> >>> <?xml version="1.0" encoding="ISO-8859-1"?> >>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" >>> "http://jetty.mortbay.org/configure.dtd"> >>> >>> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> >>> >>> <Set name="contextPath">/test</Set> >>> <Set name="war"><SystemProperty name="jetty.home" >>> default="."/>/contexts/test.war</Set> >>> >>> <Set name="extractWAR">true</Set> >>> <Set name="copyWebDir">false</Set> >>> <Set name="tempDirectory"><SystemProperty name="jetty.home" >>> default="."/>/deployment</Set> >>> >>> </Configure> >>> >>> Now right deployer is used. >>> >>> Unfortunately, same thing as before - the directory gets deleted, but >>> WEB-INF/lib stays. >>> I have tried different paths as a tempDirectory and encountered same >>> error. >>> The ones I've tried: >>> Jetty.home/deployment/work >>> Jetty.home/deployment >>> Jetty.home/work >>> >>> Same error all the time. Each time the dirs were there. Each time >>> >> jetty >> >>> extracted the archive there and tried to delete the files when >>> >> shutting >> >>> down. >>> >>> My directory structure right now looks like: >>> >>> ./webapps >>> ./logs >>> ./logs/2008_02_22.request.log >>> ./logs/jetty.log >>> ./work >>> ./deployment >>> ./deployment/webapp >>> ./deployment/webapp/WEB-INF >>> ./deployment/webapp/WEB-INF/lib >>> ./contexts >>> ./contexts/test.xml >>> ./contexts/test.war >>> >>> >>> About the jetty version: I am using 6.1.7 and I did not change the >>> >> line >> >>> in log files (I did change the paths though to make it more readable >>> instead of /usr/home/bla/bla/bla/bla/ ). I guess that maybe jetty puts >>> 6.1.x when embedded. >>> >>> >>> Best regards, >>> Krystian >>> >>> -----Original Message----- >>> From: jet...@li... >>> [mailto:jet...@li...] On Behalf Of >>> >> David >> >>> Yu >>> Sent: 22 February 2008 05:51 >>> To: Jetty usage, help & informal support Subject: Re: >>> [Jetty-support] Jetty deletes ALMOST whole workdir >>> whenshutting down >>> >>> Hi, >>> >>> Second and third scenario: >>> The webapp configured on your test.xml was not deployed at all. >>> >>> To test, try commenting out the webapp deployer and see if your app >>> >> gets >> >>> deployed(try changing the contextPath in the context.xml) >>> Also, about the temp dir you configured on test.xml(since you're using >>> >> >> >>> webapp deployer),... it is not advisable to >>> set it on /webapps since it will get deployed by the webapp deployer >>> once you restart the server. >>> >>> The configured temp directory in context.xml must be an existing dir >>> >> so >>> that jetty will not delete it on exit. >>> >>> PS What jetty are you using in this test? I'm seeing an info of [INFO] >>> >> >> >>> jetty-6.1.x (Jetty outputs the specific version without x's :-) ) >>> Use jetty-6.1.7 so we're on the same environment. >>> >>> Cheers >>> >>> >>> Krystian Szczesny wrote: >>> >>>> Hi, >>>> Thank you for interest in my issue. >>>> >>>> I'm working on HP-UX B.11.23, my java version is "1.5.0.03". >>>> >>>> I do have a $jetty.home/work directory. When jetty uses it, it tries >>>> >>> to >>> >>>> delete it when shutting down. >>>> >>>> I will attach 3 packs of config files, for each scenario I have >>>> >> tried. >> >>>> The first one: >>>> - no jetty-web.xml file >>>> - no context files >>>> - configuration only in jetty.xml file, shared by every application >>>> - war archive put into $jetty.home/webapps which in jetty.xml file is >>>> set to be webapps dir >>>> - web.xml file in war archive contains only configuration for axis2 >>>> >> so >> >>>> >>> I >>> >>>> will skip it. >>>> >>>> The second scenario: >>>> - no jetty-web.xml file >>>> - context file test.xml with tempDirectory set to >>>> $jetty.home/webapps/test >>>> - same configuration of jetty.xml file as in first scenario >>>> - war archive put into $jetty.home/webapps >>>> - web.xml same as in scen.1 >>>> >>>> The third scenario: >>>> - same as scen. 2 but tempDirectory in context xml file is set to >>>> $jetty.home/work >>>> >>>> Please find attached log files and conf files. The first run logs >>>> >> have >> >>>> some class loading lines cut out [the file was 12MB ;) ], but the >>>> >>> second >>> >>>> run is whole. >>>> >>>> Because there are plenty of files, I've made one gzip archive, hope >>>> >>> you >>> >>>> don't mind. >>>> >>>> Big thanks, >>>> Best regards, >>>> Krystian >>>> >>>> >>>> >>>> -----Original Message----- >>>> From: jet...@li... >>>> [mailto:jet...@li...] On Behalf Of >>>> >>> David >>> >>>> Yu >>>> Sent: 21 February 2008 08:13 >>>> To: Jetty usage, help & informal support Cc: >>>> jet...@li... >>>> Subject: Re: [Jetty-support] Jetty deletes ALMOST whole work dir >>>> whenshutting down >>>> >>>> Hi, >>>> >>>> What java version are you using? OS? >>>> I just tested with jetty-6.1.7,jdk1.5.0_11 and windows XP.... >>>> >>> everything >>> >>>> on my temp directory remains. >>>> Simply putting a $jetty.home/work directory will tell jetty to not >>>> delete them on exit. >>>> >>>> On WebAppContext.setTempDirectory: >>>> The web.xml configuration will resolve the temp directory before >>>> the jetty-web.xml gets parsed.(for the jsps) >>>> So it would be advisable to use context.xml to configure your temp >>>> directory.(if you have a jetty-web.xml and a tempDirectory setter in >>>> >>> it, >>> >>>> remove it) >>>> Also, kindly attach your debug logs(java -DDEBUG -jar start.jar) >>>> and your config files. >>>> >>>> Cheers >>>> >>>> >>>> >>>> >>>> Krystian Szczesny wrote: >>>> >>>>> Hi, >>>>> >>>>> I've got an issue with jetty [6.1.5 - 6.1.7] with workdir. >>>>> It doesn't matter what I do and what I specify in configuration >>>>> >>> files, >>> >>>>> the work dir is being deleted when shutting down jetty, but not >>>>> completely. >>>>> There's always WEB-INF/lib directory left, which is empty. >>>>> First of all I don't want the work dir to be deleted. I've tried >>>>> >>>> several >>>> >>>>> approaches to preserve it: >>>>> 1. I do have a work directory in Jetty home dir. Jetty uses it, >>>>> >>>> creates >>>> >>>>> there separate dirs for each webapp and then, when shutting down - >>>>> deletes them [almost entirely - the lib dir stays]. >>>>> 2. I've tried using xml file in contexts directory like: >>>>> >>>>> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> >>>>> <Set name="contextPath">/test</Set> >>>>> <Set name="war"><SystemProperty name="jetty.home" >>>>> default="."/>/webapps/test.war</Set> >>>>> >>>>> <Set name="extractWAR">true</Set> >>>>> <Set name="copyWebDir">true</Set> >>>>> <Set name="tempDirectory"><SystemProperty name="jetty.home" >>>>> default="."/>/webapps/test/work</Set> >>>>> </Configure> >>>>> >>>>> Yup... it doesn't work. The dirs are not even created unless I do >>>>> >> so. >> >>>>> And if I do so, it is still removed [almost entirely] when exiting >>>>> jetty. >>>>> >>>>> 3. I've tried using jetty-web.xml file in WEB-INF dir of my webbapp, >>>>> contents similar to the above - same thing. >>>>> >>>>> The only way, everything works fine is when I extract the war >>>>> >> archive >> >>>>> >>>> to >>>> >>>>> a directory, and specify it as a resourceBase - but that is out of >>>>> >>> the >>> >>>>> question for me. >>>>> I have tried every situation from above with a 'work' directory >>>>> >> under >> >>>>> WEB-INF - still no go. >>>>> >>>>> Right now, after each jetty restart I have to manually delete the >>>>> >>> work >>> >>>>> directory, because when jetty sees the old dir, it doesn't even >>>>> >> check >> >>>>> what's inside and sets resourceBase to the directory with >>>>> >> WEB-IND/lib >> >>>>> dir only. >>>>> >>>>> If you have any idea about what mistake do I make, please respond. >>>>> >>>> >> ------------------------------------------------------------------------ >> >>> >>>> - >>>> This SF.net email is sponsored by: Microsoft >>>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>>> _______________________________________________ >>>> Jetty-support mailing list >>>> Jet...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>>> This e-mail and any attachments are confidential and may also be >>>> >>> legally >>>> privileged and/or copyright material of Intec Telecom Systems PLC (or >>>> >>> its >>>> affiliated companies). If you are not an intended or authorised >>>> >>> recipient >>>> of this e-mail or have received it in error, please delete it >>>> >>> immediately >>>> and notify the sender by e-mail. In such a case, reading, >>>> >> reproducing, >> >>>> >>> >>>> printing or further dissemination of this e-mail or its contents is >>>> >>> strictly >>>> prohibited and may be unlawful. Intec Telecom Systems PLC does not >>>> represent or warrant that an >>>> >>> attachment >>>> hereto is free from computer viruses or other defects. The opinions >>>> expressed in this e-mail and any attachments may be those of the >>>> >>> author and >>>> are not necessarily those of Intec Telecom Systems PLC. >>>> >>>> >> ------------------------------------------------------------------------ >> >>> >>>> >> ------------------------------------------------------------------------ >> >>> - >>> >>>> This SF.net email is sponsored by: Microsoft >>>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>>> >>>> >> ------------------------------------------------------------------------ >> >>> >>>> _______________________________________________ >>>> Jetty-support mailing list >>>> Jet...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>>> >>> >>> >> ------------------------------------------------------------------------ >> >>> - >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Jetty-support mailing list >>> Jet...@li... >>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>> >>> >>> >> ------------------------------------------------------------------------ >> - >> >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Jetty-support mailing list >>> Jet...@li... >>> https://lists.sourceforge.net/lists/listinfo/jetty-support >>> >>> >> >> >> ------------------------------------------------------------------------ >> - >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Jetty-support mailing list >> Jet...@li... >> https://lists.sourceforge.net/lists/listinfo/jetty-support >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------ - >> >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Jetty-support mailing list >> Jet...@li... >> https://lists.sourceforge.net/lists/listinfo/jetty-support >> > > ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jetty-support mailing list Jet...@li... https://lists.sourceforge.net/lists/listinfo/jetty-support This e-mail and any attachments are confidential and may also be legally privileged and/or copyright material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an intended or authorised recipient of this e-mail or have received it in error, please delete it immediately and notify the sender by e-mail. In such a case, reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Intec Telecom Systems PLC does not represent or warrant that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this e-mail and any attachments may be those of the author and are not necessarily those of Intec Telecom Systems PLC. ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jetty-support mailing list Jet...@li... https://lists.sourceforge.net/lists/listinfo/jetty-support |