You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dave Xiao <re...@hushmail.com> on 2004/05/13 15:28:10 UTC

UnnamedSelector: ComponentSelector Attempted to retrieve component with null hint

Hi all,
 
I'm new to cocoon. When I composed my first cocoon example, I met with
a problem. Below is the details.
 
I've successfully installed cocoon 2.1.4 on my machine (win2000 professional)
with jdk 1.4.2_03. Note this version doesn't interact with tomcat as
previous ones. Instead, it uses jetty as http server. Anyway, the installation
is ok. I can access cocoon page at http://localhost:8888.
 
Then I go to C:\cocoon-2.1.4\build\webapp (here is where the cocoon application
lies, I assume) and replace the default sitemap.xmap with the below one(In
fact, this is from a tutorial, but it's for cocoon 2.0).
 
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 <map:components>
    <map:generators default="file">
   <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
  </map:generators>
  <map:transformers default="xslt">
   <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/>
  </map:transformers>
  <map:readers default="resource">
   <map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
  </map:readers>
  <map:serializers default="html">
   <map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
   <map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/>
   <map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer"
mime-type="image/jpeg"/>
   <map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer"
mime-type="application/pdf"/>
  </map:serializers>
  <map:matchers default="wildcard">
   <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
  </map:matchers>
 </map:components>
 <map:pipelines>
  <map:pipeline>
   <map:match pattern="index.html">
    <map:read src="index.html" mime-type="text/html"/>
   </map:match>
  </map:pipeline>
 </map:pipelines>
</map:sitemap>

After that, I copy a html file named index.html to the same folder as
sitemap.xmap. Then I started cocoon type http://localhost:8888. Unfortunately
an error showed up as below.
 
Internal Server Error
Message: UnnamedSelector: ComponentSelector Attempted to retrieve component
with null hint.

Description: org.apache.avalon.framework.component.ComponentException:
UnnamedSelector: ComponentSelector Attempted to retrieve component with
null hint.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

index.html

cause

org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
ComponentSelector Attempted to retrieve component with null hint.

request-uri

/index.html

stacktrace

org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
ComponentSelector Attempted to retrieve component with null hint.
	at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:227)
	at org.apache.cocoon.components.ExtendedComponentSelector.select(ExtendedComponentSelector.java:296)
	at org.apache.cocoon.components.treeprocessor.InvokeContext.getProcessingPipeline(InvokeContext.java:191)
	at org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke(ReadNode.java:103)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1776)
	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1726)
	at org.mortbay.http.HttpServer.service(HttpServer.java:879)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:196)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:487)


Apache Cocoon 2.1.4

 

I don't know where the mistake is. Can anybody help?

 

Thanks,

Dave


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


Re: UnnamedSelector: ComponentSelector Attempted to retrieve component with null hint

Posted by Joerg Heinicke <jo...@gmx.de>.
<map:pipes> section seems to be missing. This has been added in 2.1 (or 
better said moved from cocoon.xconf in 2.0 to sitemap.xmap in 2.1).
http://cocoon.apache.org/2.1/installing/updating.html#Pipelines+configuration+in+the+sitemap

Using 2.1.5 that will be released tomorrow you will get a better error 
message.

Joerg

On 13.05.2004 15:28, Dave Xiao wrote:

> Hi all,
>  
> I'm new to cocoon. When I composed my first cocoon example, I met with
> a problem. Below is the details.
>  
> I've successfully installed cocoon 2.1.4 on my machine (win2000 professional)
> with jdk 1.4.2_03. Note this version doesn't interact with tomcat as
> previous ones. Instead, it uses jetty as http server. Anyway, the installation
> is ok. I can access cocoon page at http://localhost:8888.
>  
> Then I go to C:\cocoon-2.1.4\build\webapp (here is where the cocoon application
> lies, I assume) and replace the default sitemap.xmap with the below one(In
> fact, this is from a tutorial, but it's for cocoon 2.0).
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>  <map:components>
>     <map:generators default="file">
>    <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
>   </map:generators>
>   <map:transformers default="xslt">
>    <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/>
>   </map:transformers>
>   <map:readers default="resource">
>    <map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
>   </map:readers>
>   <map:serializers default="html">
>    <map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
>    <map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/>
>    <map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer"
> mime-type="image/jpeg"/>
>    <map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer"
> mime-type="application/pdf"/>
>   </map:serializers>
>   <map:matchers default="wildcard">
>    <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
>   </map:matchers>
>  </map:components>
>  <map:pipelines>
>   <map:pipeline>
>    <map:match pattern="index.html">
>     <map:read src="index.html" mime-type="text/html"/>
>    </map:match>
>   </map:pipeline>
>  </map:pipelines>
> </map:sitemap>
> 
> After that, I copy a html file named index.html to the same folder as
> sitemap.xmap. Then I started cocoon type http://localhost:8888. Unfortunately
> an error showed up as below.
>  
> Internal Server Error
> Message: UnnamedSelector: ComponentSelector Attempted to retrieve component
> with null hint.
> 
> Description: org.apache.avalon.framework.component.ComponentException:
> UnnamedSelector: ComponentSelector Attempted to retrieve component with
> null hint.
> 
> Sender: org.apache.cocoon.servlet.CocoonServlet
> 
> Source: Cocoon Servlet
> 
> Request URI
> 
> index.html
> 
> cause
> 
> org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
> ComponentSelector Attempted to retrieve component with null hint.
> 
> request-uri
> 
> /index.html
> 
> stacktrace
> 
> org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
> ComponentSelector Attempted to retrieve component with null hint.
> 	at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:227)
> 	at org.apache.cocoon.components.ExtendedComponentSelector.select(ExtendedComponentSelector.java:296)
> 	at org.apache.cocoon.components.treeprocessor.InvokeContext.getProcessingPipeline(InvokeContext.java:191)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke(ReadNode.java:103)
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371)
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
> 	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
> 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1776)
> 	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
> 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1726)
> 	at org.mortbay.http.HttpServer.service(HttpServer.java:879)
> 	at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
> 	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
> 	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
> 	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:196)
> 	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
> 	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:487)
> 
> 
> Apache Cocoon 2.1.4
> 
>  
> 
> I don't know where the mistake is. Can anybody help?
> 
>  
> 
> Thanks,
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

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