Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Reloading on Windows fails to delete tmp dir #11

Open
inversewd opened this issue Oct 7, 2014 · 2 comments
Open

Reloading on Windows fails to delete tmp dir #11

inversewd opened this issue Oct 7, 2014 · 2 comments

Comments

@inversewd
Copy link

You might need to add a sleep between stopping jetty and redeploying. It looks like jetty can't delete and recreate the temp explode directory. I'd guess it's possibly because the stopping server still has a lock on it.

File watcher detected changes of the war file. Reloading webapp automatically as configured.
Reloading webapp ...
Stopping webapp ...
Stopped c.s.g.p.j.JettyEclipsePluginWebAppContext@162708e8{/,null,UNAVAILABLE}{C:\workspace\Prototype\build\tmp\jettyEclipse\war\Prototype.war}
Reconfiguring webapp ...
Restarting webapp ...
Failed startup of context c.s.g.p.j.JettyEclipsePluginWebAppContext@162708e8{/,null,UNAVAILABLE}{C:\workspace\Prototype\build\tmp\jettyEclipse\war\Prototype.war}
java.lang.IllegalStateException: Failed to delete temp dir C:\workspace\Prototype\build\tmp\jettyEclipseRun
at org.eclipse.jetty.webapp.WebInfConfiguration.configureTempDirectory(WebInfConfiguration.java:372)
at org.eclipse.jetty.webapp.WebInfConfiguration.resolveTempDirectory(WebInfConfiguration.java:260)
at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:69)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:460)
at com.sahlbach.gradle.plugins.jettyEclipse.JettyEclipsePluginWebAppContext.super$10$preConfigure(JettyEclipsePluginWebAppContext.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
at com.sahlbach.gradle.plugins.jettyEclipse.JettyEclipsePluginWebAppContext.preConfigure(JettyEclipsePluginWebAppContext.groovy:77)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:496)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.LifeCycle$start$0.call(Unknown Source)
at com.sahlbach.gradle.plugins.jettyEclipse.JettyEclipseRun.reloadWebApp(JettyEclipseRun.groovy:519)

@akurdyukov
Copy link

Yes, that's file lock. I managed to get rid on the error setting

    <Set name="persistTempDirectory">true</Set>

@SchwingSK
Copy link

Thanks a lot akurdyukov!
For those (like me) not fluent in Jetty-lore: you have to create a file jetty-web.xml inside your WEB-INF dir, with the following contents:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
    <Set name="persistTempDirectory">true</Set>
</Configure>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants