Replacing a plugin with a new version does not work without restarting Tomcat

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Replacing a plugin with a new version does not work without restarting Tomcat

Ulli Hafner-2
Hi,

We are running Hudson on Tomcat 6.0 on Windows XP. When trying to update a plugin via the upload button in Hudson, then the plugin hpi is correctly deployed to the plugins folder (and a message says that hudson needs to restarted). However, after stopping and re-starting the Hudson service in Tomcat, then the plugin gets not extracted as expected. Seems to be a file lock held by Hudson (or my findbugs plugin?). I get the plugin only deployed if I restart the whole Tomcat service.

Is this a Tomcat Problem? Or a Hudson problem? Or is there a uninstall method that I need to overwrite in my plugin?

Here is the exception log:

21.08.2007 11:22:02 hudson.PluginManager
SCHWERWIEGEND: Failed to load a plug-in C:\Build\Results\plugins\findbugs.hpi
java.io.IOException: Unable to delete C:\Build\Results\plugins\findbugs\WEB-INF\lib\annotations-1.0.0.jar
        at hudson.Util.deleteFile(Util.java:143)
        at hudson.Util.deleteContentsRecursive(Util.java:121)
        at hudson.Util.deleteContentsRecursive(Util.java:120)
        at hudson.Util.deleteContentsRecursive(Util.java:120)
        at hudson.PluginWrapper.explode(PluginWrapper.java:413)
        at hudson.PluginWrapper.(PluginWrapper.java:148)
        at hudson.PluginManager.(PluginManager.java:76)
        at hudson.model.Hudson.(Hudson.java:219)
        at hudson.WebAppMain.contextInitialized(WebAppMain.java:105)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1237)
        at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:588)
        at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:128)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)

--
Avaloq - essential for banking.

Avaloq Evolution AG
Allmendstrasse 140, 8027 Zürich
T +41 44 488 6790, F +41 44 488 6868, http://www.avaloq.com Dr. Ullrich Hafner mailto:[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Replacing a plugin with a new version does not work without restarting Tomcat

Arnaud Héritier
It's a Java/Windows problem.
I'm not sure that hudson can do something on that.
Jars are often locked by the jvm on windows and windows can't delete them.

Arnaud

Hafner Ullrich wrote
Hi,

We are running Hudson on Tomcat 6.0 on Windows XP. When trying to update a plugin via the upload button in Hudson, then the plugin hpi is correctly deployed to the plugins folder (and a message says that hudson needs to restarted). However, after stopping and re-starting the Hudson service in Tomcat, then the plugin gets not extracted as expected. Seems to be a file lock held by Hudson (or my findbugs plugin?). I get the plugin only deployed if I restart the whole Tomcat service.

Is this a Tomcat Problem? Or a Hudson problem? Or is there a uninstall method that I need to overwrite in my plugin?

Here is the exception log:

21.08.2007 11:22:02 hudson.PluginManager
SCHWERWIEGEND: Failed to load a plug-in C:\Build\Results\plugins\findbugs.hpi
java.io.IOException: Unable to delete C:\Build\Results\plugins\findbugs\WEB-INF\lib\annotations-1.0.0.jar
        at hudson.Util.deleteFile(Util.java:143)
        at hudson.Util.deleteContentsRecursive(Util.java:121)
        at hudson.Util.deleteContentsRecursive(Util.java:120)
        at hudson.Util.deleteContentsRecursive(Util.java:120)
        at hudson.PluginWrapper.explode(PluginWrapper.java:413)
        at hudson.PluginWrapper.(PluginWrapper.java:148)
        at hudson.PluginManager.(PluginManager.java:76)
        at hudson.model.Hudson.(Hudson.java:219)
        at hudson.WebAppMain.contextInitialized(WebAppMain.java:105)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1237)
        at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:588)
        at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:128)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)

--
Avaloq - essential for banking.

Avaloq Evolution AG
Allmendstrasse 140, 8027 Zürich
T +41 44 488 6790, F +41 44 488 6868, http://www.avaloq.com Dr. Ullrich Hafner mailto:ullrich.hafner@avaloq.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net
For additional commands, e-mail: users-help@hudson.dev.java.net
Reply | Threaded
Open this post in threaded view
|

Re: Replacing a plugin with a new version does not work without restarting Tomcat

Kohsuke Kawaguchi
Administrator
In reply to this post by Ulli Hafner-2
Yeah, it looks like something is leaking. I the past there's several
classloader leak bugs, so maybe this is another one.

Was there a way to forcibly terminate URLClassLoader? I can try to do
that for all the plugin classloaders before Hudson shuts down.

2007/8/21, Hafner Ullrich <[hidden email]>:

> Hi,
>
> We are running Hudson on Tomcat 6.0 on Windows XP. When trying to update a plugin via the upload button in Hudson, then the plugin hpi is correctly deployed to the plugins folder (and a message says that hudson needs to restarted). However, after stopping and re-starting the Hudson service in Tomcat, then the plugin gets not extracted as expected. Seems to be a file lock held by Hudson (or my findbugs plugin?). I get the plugin only deployed if I restart the whole Tomcat service.
>
> Is this a Tomcat Problem? Or a Hudson problem? Or is there a uninstall method that I need to overwrite in my plugin?
>
> Here is the exception log:
>
> 21.08.2007 11:22:02 hudson.PluginManager
> SCHWERWIEGEND: Failed to load a plug-in C:\Build\Results\plugins\findbugs.hpi
> java.io.IOException: Unable to delete C:\Build\Results\plugins\findbugs\WEB-INF\lib\annotations-1.0.0.jar
>         at hudson.Util.deleteFile(Util.java:143)
>         at hudson.Util.deleteContentsRecursive(Util.java:121)
>         at hudson.Util.deleteContentsRecursive(Util.java:120)
>         at hudson.Util.deleteContentsRecursive(Util.java:120)
>         at hudson.PluginWrapper.explode(PluginWrapper.java:413)
>         at hudson.PluginWrapper.(PluginWrapper.java:148)
>         at hudson.PluginManager.(PluginManager.java:76)
>         at hudson.model.Hudson.(Hudson.java:219)
>         at hudson.WebAppMain.contextInitialized(WebAppMain.java:105)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
>         at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1237)
>         at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:588)
>         at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:128)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Unknown Source)
>
> --
> Avaloq - essential for banking.
>
> Avaloq Evolution AG
> Allmendstrasse 140, 8027 Zürich
> T +41 44 488 6790, F +41 44 488 6868, http://www.avaloq.com Dr. Ullrich Hafner mailto:[hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Replacing a plugin with a new version does not work without restarting Tomcat

Jean-Baptiste Quenot
* Kohsuke Kawaguchi:

> Yeah, it  looks like  something is  leaking. I the  past there's
> several classloader leak bugs, so maybe this is another one.
>
> Was there a way to  forcibly terminate URLClassLoader? I can try
> to do that  for all the plugin classloaders  before Hudson shuts
> down.

I  don't think  so.  URLClassLoader  is a  major PITA  and causing
problems in nearly every framework.   Better never open a JAR file
from the classpath programmatically...
--
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]