You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Nicolas Maisonneuve <n....@HotPOP.com> on 2003/08/30 03:24:57 UTC
error context when i launch cocoon
hy , i use a avalon component with contextualizable and ThreadSafe interface.
In the context method , i call context.get(Constants.DEFAULT_CONTEXT_DIR);
to have the directory of the site
when i launch cocoon with tomcat , there is this error
ERROR (2003-08-30) 03:13.15:035 [core.manager] (Unknown-URI) Unknown-thread/ExcaliburComponentManager: Caught an exception trying to initialize the component handler.
org.apache.avalon.framework.context.ContextException: Unable to resolve context key: ./webapp
at org.apache.avalon.framework.context.DefaultContext.get(DefaultContext.java:157)
at org.apache.avalon.framework.context.DefaultContext.get(DefaultContext.java:160)
at org.apache.cocoon.components.ComponentContext.get(ComponentContext.java:135)
at org.paris5.component.index.analysis.AnalyzerManagerImpl.contextualize(AnalyzerManagerImpl.java:77)
at org.apache.avalon.framework.container.ContainerUtil.contextualize(ContainerUtil.java:154)
note :
i use the context tomcat in the system.xml (<Context path="/cocoon" docBase="D:\DEV\cocoon\cocoon-2.1\build\webapp" debug="0" reloadable="true" crossContext="true"/>)
windows XP
cocoon 2.1 CVS
so the bug is in cocoon (or tomcat) or in my brain .. ?
Re: error context when i launch cocoon
Posted by Nicolas Maisonneuve <n....@HotPOP.com>.
i find a solution
change Constants.DEFAULT_CONTEXT_DIR to Constants.CONTEXT_ENVIRONMENT_CONTEXT to use the geRealPath() method that give me the webapp dir
env_context=
(org.apache.cocoon.environment.Context)context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
and so i can use the getRealPath that give me the webapp site
but i dont know why there was a error "unable to resolve context key : ./webapp"
thanks to me .. :-)
----- Original Message -----
From: Nicolas Maisonneuve
To: cocoon dev ; cocoon user
Sent: Saturday, August 30, 2003 3:24 AM
Subject: error context when i launch cocoon
hy , i use a avalon component with contextualizable and ThreadSafe interface.
In the context method , i call context.get(Constants.DEFAULT_CONTEXT_DIR);
to have the directory of the site
when i launch cocoon with tomcat , there is this error
ERROR (2003-08-30) 03:13.15:035 [core.manager] (Unknown-URI) Unknown-thread/ExcaliburComponentManager: Caught an exception trying to initialize the component handler.
org.apache.avalon.framework.context.ContextException: Unable to resolve context key: ./webapp
at org.apache.avalon.framework.context.DefaultContext.get(DefaultContext.java:157)
at org.apache.avalon.framework.context.DefaultContext.get(DefaultContext.java:160)
at org.apache.cocoon.components.ComponentContext.get(ComponentContext.java:135)
at org.paris5.component.index.analysis.AnalyzerManagerImpl.contextualize(AnalyzerManagerImpl.java:77)
at org.apache.avalon.framework.container.ContainerUtil.contextualize(ContainerUtil.java:154)
note :
i use the context tomcat in the system.xml (<Context path="/cocoon" docBase="D:\DEV\cocoon\cocoon-2.1\build\webapp" debug="0" reloadable="true" crossContext="true"/>)
windows XP
cocoon 2.1 CVS
so the bug is in cocoon (or tomcat) or in my brain .. ?