cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <robby.pelss...@ciber.com>
Subject problem with zip serializer Cocoon 2.2: Component with role 'org.apache.cocoon.serialization.Serializer/' and key 'map' is not defined in this service selector
Date Fri, 04 Dec 2009 15:06:56 GMT
Hi guys,

 

I defined a custom serializer to add a specific doctype declaration:

 

      <map:serializer 

        logger="sitemap.serializer.xml" mime-type="text/xml" name="map"

        src="org.apache.cocoon.serialization.XMLSerializer">

        <doctype-system>http://nww.qa.spider.nxp.com:8310/xmetal/schemas/map.dtd</doctype-system>

      </map:serializer>

 

 

I dynamically generate the zip archive using inline xml content.

 

Ziparchive xml snippet (1)

<?xml version="1.0" encoding="UTF-8"?>

<zip:archive xmlns:zip="http://apache.org/cocoon/zip-archive/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">

            <zip:entry name="PH3330L.xml" serializer="map">

                        <map id="emptymap" rev="000.000" title="PH3330L">

                                    <topicmeta>

                                                <critdates>

                                                            <revised modified="20091204"/>

                                                </critdates>

                                                <releasestate content="released"/>

                                                <owner content="NXP"/>

                                    </topicmeta>

                                    <topicgroup>

                                                <topichead navtitle="PH3330L"/>

                                                <topicref href="product_profile" navtitle="product_profile"/>

                                                <topicref href="pinning_information" navtitle="pinning_information"/>

                                                <topicref href="ordering_information" navtitle="ordering_information"/>

                                                <topicref href="marking" navtitle="marking"/>

                                    </topicgroup>

                        </map>

            </zip:entry>

</zip:archive>

 

 

My sitemap snippet looks like this:

 

      <map:match pattern="zip">

        <map:generate src="cocoon:/datasheet_mockup"/>

        <map:transform src="xslt/datasheet2zip.xslt" type="saxon" label="zip"/>  àresults
in (1) 

        <map:serialize type="zip"/>

      </map:match>

 

I can process this pipeline up until transformation.  But the zip serializer gives me following
exception:

 

Caused by: org.apache.avalon.framework.service.ServiceException: Component with role 'org.apache.cocoon.serialization.Serializer/'
and key 'map' is not defined in this service selector. (Key='AvalonServiceSelector')

      at org.apache.cocoon.serialization.ZipArchiveSerializer.addEntry(ZipArchiveSerializer.java:333)

      at org.apache.cocoon.serialization.ZipArchiveSerializer.startElement(ZipArchiveSerializer.java:211)

      at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)

      at $Proxy12.startElement(Unknown Source)

      at net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:253)

 

 

I would expect that the name of the serializer is used as key... or is my assumption wrong
and do I need to add some extra configuration to the custom serializer?

 

May thx in advance,

Robby Pelssers


Mime
View raw message