cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kaufman, Noah" <nkauf...@metatomix.com>
Subject More on Debugging Cocoon2 in VAJ
Date Fri, 17 Aug 2001 19:03:15 GMT

	Once again, we've been working on getting Cocoon 2 set up so
that we can debug our own custom generators and transformers in VAJ.
We're working with Cocoon 2-b2 and VAJ v3.5.3.

	The problem we're having is that Cocoon 2 works fine with Tomcat
outside of the debugger, but when we run Cocoon 2 in the debugger it
craps out with the following error:  "The sitemap handler's sitemap is
not available."  which means absolutely nothing to us, since it then
tells you to look in the Cocoon 2 log for more information - of which
there is none.

	Stepping through the code in the debugger, we see the following
progression:

1.)  Manager.invoke() gets called as part of Cocoon's initialization.

2.)  This then executes "Handler sitemapHandler = getHandler()", which
then causes a call to be made to Manager.getHandler().

3.)  Manager.getHandler() then executes
           "Handler sitemapHander = (Handler)sitemaps.get(source)".

4.)  This call returns a null value, which causes a new sitemapHandler
to be created using the following code:

            sitemapHandler = new Handler(source,check_reload);

            where source="sitemap.xmap", and check_reload=true.

5.)  This is then followed by the following sequence of calls:

                sitemapHandler.setLogger(getLogger());
                sitemapHandler.compose(newManager);
                sitemapHandler.contextualize(this.context);
                sitemapHandler.regenerate(environment);
                sitemaps.put(source, sitemapHandler);

      After which the complete sitemap is then returned to the calling
function, but the source property for the sitemap object is not
populated.

	Why is this?

6.)   Then a call to setupProcessing() is made, which does a check via a
call to sitemap.available() to see if the sitemap is there.  Although
there is a sitemap object, the source property is null (because
AbstractSitemap.compose() doesn't seem to fill it in), so Cocoon then
stack dumps with the message "The sitemap handler's sitemap is not
available."


	Being new to Cocoon, it's not clear to me why
sitemap.regenerate() doesn't fill in a value for the source property in
the sitemap object under these circumstances.

	I was hoping that someone on this list could provide some
additional insight as to what's supposed to be happening here.
Additional details are provided by an extract of the cocoon.log file
showing the messages that appear there.  Thank you very much in advance.

Sincerely,

Noah Kaufman
Metatomix, Inc.

-=-=-=-=-=-=-=-=-=-  extract from cocoon.log below
-=-=-=-=-=-=-=-=-=-=-=-

DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): DEBUGGING
INFORMATION:
REQUEST: /cocoon/

CONTEXT PATH: /cocoon
SERVLET PATH: /
PATH INFO: null

REMOTE HOST: 127.0.0.1
REMOTE ADDRESS: 127.0.0.1
REMOTE USER: null
REQUEST SESSION ID: null
REQUEST PREFERRED LOCALE: en_US
SERVER HOST: localhost
SERVER PORT: 8080

METHOD: GET
CONTENT LENGTH: -1
PROTOCOL: HTTP/1.1
SCHEME: http
AUTH TYPE: null

REQUEST PARAMETERS:


SESSION ATTRIBUTES:


DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): ComponentFactory
creating new instance of
org.apache.cocoon.components.source.SourceHandlerImpl.
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Getting the
SourceFactories
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Beginning sitemap
regeneration
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Resolving
'sitemap.xmap'
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
file:C:\Program Files\Jakarta Tomcat 4.0\webapps\cocoon\sitemap.xmap
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
'file:C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/sitemap.xmap'
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Resolving ''
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
'file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/'
DEBUG   99807   [cocoon  ] (Thread-17): Making URL from file:C:\Program
Files\Jakarta Tomcat 4.0\webapps\cocoon\sitemap.xmap
DEBUG   99807   [cocoon  ] (Thread-17): UnnamedSelector:
ComponentSelector could not find the component for hint:
org\apache\cocoon\www\sitemap_xmap
DEBUG   99807   [cocoon  ] (Thread-17): Could not access component for
hint: org\apache\cocoon\www\sitemap_xmap
DEBUG   99807   [cocoon  ] (Thread-17): The instance was not accessible,
creating it now.
DEBUG   99807   [cocoon  ] (Thread-17): ComponentFactory creating new
instance of org.apache.cocoon.www.sitemap_xmap.
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand store,
returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
url-factory, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
source-handler, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
program-generator, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand jsp-engine,
returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
programming-languages, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
classloader, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
markup-languages, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
datasources, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
stream-pipeline, returning
org.apache.cocoon.components.pipeline.StreamPipeline
DEBUG   99807   [cocoon  ] (Thread-17): Adding component
(org.apache.cocoon.components.pipeline.StreamPipeline =
org.apache.cocoon.components.pipeline.CachingStreamPipeline)
DEBUG   99807   [cocoon  ] (Thread-17): Attempting to get Handler for:
org.apache.cocoon.components.pipeline.StreamPipeline
DEBUG   99807   [cocoon  ] (Thread-17): Handler type =
org.apache.avalon.excalibur.component.PoolableComponentHandler
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
stream-cache, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
event-pipeline, returning
org.apache.cocoon.components.pipeline.EventPipeline
DEBUG   99807   [cocoon  ] (Thread-17): Adding component
(org.apache.cocoon.components.pipeline.EventPipeline =
org.apache.cocoon.components.pipeline.CachingEventPipeline)
DEBUG   99807   [cocoon  ] (Thread-17): Attempting to get Handler for:
org.apache.cocoon.components.pipeline.EventPipeline
DEBUG   99807   [cocoon  ] (Thread-17): Handler type =
org.apache.avalon.excalibur.component.PoolableComponentHandler
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand
event-cache, returning null
DEBUG   99807   [cocoon  ] (Thread-17): looking up shorthand sitemap,
returning null
WARN    99807   [cocoon  ] (Thread-17): Looking up component on an
uninitialized ComponentManager:
org.apache.cocoon.generation.GeneratorSelector
DEBUG   99807   [cocoon  ] (Thread-17): Could not find ComponentHandler,
attempting to create one for role:
org.apache.cocoon.generation.GeneratorSelector
ERROR   99807   [cocoon  ] (Thread-17): Error compiling sitemap
java.lang.InternalError: (Ex02) An error has occurred.
	java.lang.Throwable(java.lang.String)
	java.lang.Error(java.lang.String)
	java.lang.VirtualMachineError(java.lang.String)
	java.lang.InternalError(java.lang.String)
	java.lang.Class
java.lang.ClassLoader.findLoadedClass(java.lang.String)
	java.lang.Class
java.lang.ClassLoader.loadClass(java.lang.String, boolean)
	java.lang.Class
java.lang.ClassLoader.loadClass(java.lang.String)
	org.apache.avalon.framework.component.Component
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(j
ava.lang.String)
	org.apache.avalon.framework.component.Component
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(j
ava.lang.String)
	void
org.apache.cocoon.sitemap.AbstractSitemap.compose(org.apache.avalon.fram
ework.component.ComponentManager)
	java.lang.Object
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc
e()
	void
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial
ize()
	void
org.apache.cocoon.components.language.generator.GeneratorSelector.addGen
erator(org.apache.avalon.framework.component.ComponentManager,
java.lang.Object, java.lang.Class)
	void
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.add
CompiledComponent(org.apache.avalon.framework.component.ComponentManager
, java.lang.String, java.lang.Class)
	
org.apache.cocoon.components.language.generator.CompiledComponent
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.loa
d(org.apache.avalon.framework.component.ComponentManager,
java.lang.String, java.lang.String, java.lang.String,
org.apache.cocoon.environment.SourceResolver)
	void org.apache.cocoon.sitemap.Handler.run()
	void java.lang.Thread.run()

DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): Changing Cocoon
context(sitemap.xmap) to prefix()
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): 	from
context(file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/) and
prefix()
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): 	at URI 
DEBUG   99807   [cocoon  ] (HttpProcessor[8080][4]): New context is
file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/
ERROR   99807   [cocoon  ] (HttpProcessor[8080][4]): Problem with
servlet
org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is
not available. Please check C:\Program Files\Jakarta Tomcat
4.0\webapps\cocoon\WEB-INF\logs\cocoon.log for the exact error.
	java.lang.Throwable(java.lang.String)
	java.lang.Exception(java.lang.String)
	org.apache.avalon.framework.CascadingException(java.lang.String,
java.lang.Throwable)
	org.apache.cocoon.ProcessingException(java.lang.String,
java.lang.Throwable)
	void
org.apache.cocoon.sitemap.Manager.setupProcessing(org.apache.cocoon.envi
ronment.Environment, org.apache.cocoon.sitemap.Handler,
java.lang.String, java.lang.String)
	boolean
org.apache.cocoon.sitemap.Manager.invoke(org.apache.avalon.framework.com
ponent.ComponentManager, org.apache.cocoon.environment.Environment,
java.lang.String, java.lang.String, boolean, boolean)
	boolean
org.apache.cocoon.Cocoon.process(org.apache.cocoon.environment.Environme
nt)
	void
org.apache.cocoon.servlet.CocoonServlet.service(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse)
	void
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
	void
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.s
ervlet.ServletRequest, javax.servlet.ServletResponse)
	void
org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.S
ervletRequest, javax.servlet.ServletResponse)
	void
org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina
.Request, org.apache.catalina.Response,
org.apache.catalina.ValveContext)
	void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina
.Request, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Req
uest, org.apache.catalina.Response)
	void
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Reques
t, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina
.Request, org.apache.catalina.Response,
org.apache.catalina.ValveContext)
	void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina
.Request, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Req
uest, org.apache.catalina.Response)
	void
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Reques
t, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Requ
est, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Re
quest, org.apache.catalina.Response, org.apache.catalina.ValveContext)
	void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina
.Request, org.apache.catalina.Response)
	void
org.apache.catalina.valves.AccessLogValve.invoke(org.apache.catalina.Req
uest, org.apache.catalina.Response, org.apache.catalina.ValveContext)
	void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina
.Request, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Req
uest, org.apache.catalina.Response)
	void
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Reques
t, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.
Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
	void
org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina
.Request, org.apache.catalina.Response)
	void
org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Req
uest, org.apache.catalina.Response)
	void
org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Reques
t, org.apache.catalina.Response)
	void
org.apache.catalina.connector.http.HttpProcessor.process(java.net.Socket
)
	void org.apache.catalina.connector.http.HttpProcessor.run()
	void java.lang.Thread.run()

INFO    99807   [cocoon  ] (HttpProcessor[8080][4]): '' Processed by
Apache Cocoon 2.0b2 in 18.407 seconds.


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


Mime
View raw message