You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2001/06/08 16:53:23 UTC

Exception in Avalon ComponentManager when disposing Cocoon

I added a call to cocoon.dispose() in CocoonServlet.destroy(). The main
purpose was to gracefully close all Jdbc connections held by the
connection pool (otherwise Hsql keeps the database locked), but this
produces the following exceptions in the log :

DEBUG   60137   [cocoon  ] (Thread-21): Error trying to release
component.
java.lang.IllegalStateException: You cannot put a component in a
disposed holder
	at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.put(ThreadSafeComponentHandler.java:124)
	at
org.apache.avalon.excalibur.component.DefaultComponentManager.release(DefaultComponentManager.java:292)
	at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.dispose(ProgramGeneratorImpl.java:273)
	at
org.apache.avalon.excalibur.component.DefaultComponentFactory.decommission(DefaultComponentFactory.java:144)
	at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.dispose(ThreadSafeComponentHandler.java:138)
	at
org.apache.avalon.excalibur.component.DefaultComponentManager.dispose(DefaultComponentManager.java:95)
	at org.apache.cocoon.Cocoon.dispose(Cocoon.java:284)
	at
org.apache.cocoon.servlet.CocoonServlet.destroy(CocoonServlet.java:160)
	at
org.apache.tomcat.core.ServletWrapper.doDestroy(ServletWrapper.java:241)
	at org.apache.tomcat.core.Handler.destroy(Handler.java:186)
	at
org.apache.tomcat.core.ContextManager.shutdownContext(ContextManager.java:509)
	...

This happens when components release other components in their dispose()
method.

Berin, could you check this ?

Thanks.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Exception in Avalon ComponentManager when disposing Cocoon

Posted by Berin Loritsch <bl...@apache.org>.
Berin Loritsch wrote:
> 
> Sylvain Wallez wrote:
> >
> > I added a call to cocoon.dispose() in CocoonServlet.destroy(). The main
> > purpose was to gracefully close all Jdbc connections held by the
> > connection pool (otherwise Hsql keeps the database locked), but this
> > produces the following exceptions in the log :
> >
> > DEBUG   60137   [cocoon  ] (Thread-21): Error trying to release
> > component.
> > java.lang.IllegalStateException: You cannot put a component in a
> >
> > This happens when components release other components in their dispose()
> > method.
> >
> > Berin, could you check this ?
> 
> I'll look into it.  Basically, what is happening is that Components are
> being released after the CM is disposed.

Basically, the issue was in the ComponentHandlers.  I fixed the issue in CVS.
I will make another release soon, but I want to get more docs in Avalon
first.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Exception in Avalon ComponentManager when disposing Cocoon

Posted by Berin Loritsch <bl...@apache.org>.
Sylvain Wallez wrote:
> 
> I added a call to cocoon.dispose() in CocoonServlet.destroy(). The main
> purpose was to gracefully close all Jdbc connections held by the
> connection pool (otherwise Hsql keeps the database locked), but this
> produces the following exceptions in the log :
> 
> DEBUG   60137   [cocoon  ] (Thread-21): Error trying to release
> component.
> java.lang.IllegalStateException: You cannot put a component in a
>
> This happens when components release other components in their dispose()
> method.
> 
> Berin, could you check this ?

I'll look into it.  Basically, what is happening is that Components are
being released after the CM is disposed.

> 
> Thanks.
> --
> Sylvain Wallez
> Anyware Technologies - http://www.anyware-tech.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org