cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C YF <ral...@yahoo.com>
Subject problem creating new transformer
Date Wed, 22 May 2002 08:18:40 GMT
I am going to create transformers and actions for a
project I am working on. For testing purpose I created
a dummy transformer. 

package org.apache.cocoon.transformation;
import
org.apache.cocoon.transformation.AbstractDOMTransformer;

class TestTransformer extends AbstractDOMTransformer {
    public TestTransformer() {
        super();
    }
    protected org.w3c.dom.Document
transform(org.w3c.dom.Document doc) {
	...
	some dummy code
	...
    	return doc;
    }
}

I compiled the code, zipped the .class file, renamed
the .zip file to .jar and put the .jar it in
cocoon\web-inf\lib folder.

I added the following lines to the sitemap as well:

<map:transformers default="xslt">
	...
	...
	<map:transformer name="test"
src="org.apache.cocoon.transformation.TestTransformer"/>
	...
	...
</map:transformers>
...
...
<map:pipelines>
   <map:pipeline>
		<map:match pattern="test.html">
			<map:generate type="html" src="test.html"/>
			<map:transform type="test"/>
			<map:serialize/>
		</map:match>
  </map:pipeline>
...
...
</map:pipelines>

When I tried to load the page, I get this error from
cocoon:

	UnnamedSelector: ComponentSelector could not find the
component for hint: test

Did I miss something? Any help would be great.
By the way, I am using Cocoon 2.0.2, Windows 2000 and
Tomcat 4.0.1, J2SE SDK 1.3.1.

The complete error message and stack trace:
-------------------------------------------

type fatal
message UnnamedSelector: ComponentSelector could not
find the component for hint: test
description
org.apache.avalon.framework.component.ComponentException:
UnnamedSelector: ComponentSelector could not find the
component for hint: test
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
stack-trace
org.apache.avalon.framework.component.ComponentException:
UnnamedSelector: ComponentSelector could not find the
component for hint: test
	at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:276)
	at
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:101)
	at
org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:104)
	at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.addTransformer(AbstractEventPipeline.java:151)
	at
org.apache.cocoon.components.pipeline.CachingEventPipeline.addTransformer(CachingEventPipeline.java:127)
	at
org.apache.cocoon.www.file_.C_.Tomcat401.webapps.cocoon.sitemap_xmap.matchN1035B(C:\Tomcat401\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www/file_/C_/Tomcat401/webapps/cocoon\sitemap_xmap.java:3957)
	at
org.apache.cocoon.www.file_.C_.Tomcat401.webapps.cocoon.sitemap_xmap.process(C:\Tomcat401\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www/file_/C_/Tomcat401/webapps/cocoon\sitemap_xmap.java:3154)
	at
org.apache.cocoon.www.file_.C_.Tomcat401.webapps.cocoon.sitemap_xmap.process(C:\Tomcat401\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www/file_/C_/Tomcat401/webapps/cocoon\sitemap_xmap.java:3100)
	at
org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
	at
org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
	at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
	at java.lang.Thread.run(Thread.java:484)
request-uri
/cocoon/test.html
path-info
test.html



__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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


Mime
View raw message