cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Howard" <coc...@leverageweb.com>
Subject error on cocoon-reload - related to environment/sitemap configurable?
Date Sat, 12 Apr 2003 16:36:23 GMT
I've started digging back into why cocoon is failing to reload in 2.1.

I've found that this method below is getting an empty environment stack
and returning the rootManager, which is disposed.  So, is the environment
supposed to be empty at this stage of a reload, or is the problem that
rootManager is not being correctly reset during getCocoon()?

CocoonComponentManager.java [235-251]:  (see also stack trace below)

    /**
     * Get the current sitemap component manager.
     * This method return the current sitemap component manager. This
     * is the manager that holds all the components of the currently
     * processed (sub)sitemap.
     */
    static public ComponentManager getSitemapComponentManager() {
		final EnvironmentStack stack = (EnvironmentStack)environmentStack.get();

		if ( null != stack && !stack.empty()) {
			Object[] o = (Object[])stack.peek();
			return (ComponentManager)o[2];
		}

        // if we don't have an environment yet, just return the root manager
        return rootManager; //<-- this is returned.  is there supposed to be
an environment?
    }

You can see in the stack trace below that the error occurs at
AbstractEnvironment.java:560
but it's the line right before that is returning the disposed
ComponentManager:

AbstractEnvironment.java[559-560]:
	this.manager = CocoonComponentManager.getSitemapComponentManager();
	// this.manager.disposed==true
	this.xmlizer = (XMLizer)this.manager.lookup(XMLizer.ROLE);

There's been some refactoring in the environment, sitemap configurable, and
a recent switch to the excalibur-component-1.1 that could possibly be
involved.
I had been thinking the latter, but am not so sure now that I'm taking a
closer look.
Unfortunately, I'm not clear enough on what is supposed to be going on in
the environment
to really know.

[OT] my first forray into using the Eclipse debugger is leaving a smile on
my face.
Still can't believe this thing is free.

Geoff


ERROR   (2003-04-12) 11:17.42:996   [access] (/) PoolThread-3/CocoonServlet:
Internal Cocoon Problem
java.lang.IllegalStateException: You cannot lookup components on a disposed
ComponentLocator
	at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Excal
iburComponentManager.java:199)
	at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentMa
nager.java:294)
	at
org.apache.cocoon.environment.AbstractEnvironment.startingProcessing(Abstrac
tEnvironment.java:560)
	at
org.apache.cocoon.components.CocoonComponentManager.startProcessing(CocoonCo
mponentManager.java:181)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:630)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1104)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
	at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:280)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
	at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:549)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
	at org.mortbay.http.HttpServer.service(HttpServer.java:863)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:773)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:937)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:790)
	at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)


Mime
View raw message