cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Williams" <j...@ennui.co.za>
Subject Running the latest CVS snapshot - should it be this hard?
Date Sat, 16 Aug 2003 15:14:13 GMT
In order to test a recent fix I downloaded a CVS snapshot .
My expectation was that once I had done a "build all" and copied all the
necessary jars into WEB-INF I could use the configuration in
cocoon-2.0/src/webapp in the snapshot's tar.gz file and be on my way.

Not so! I had to make the modifications detailed below to the cocoon.xconf
and sitemap simply in order to use the snapshot. The sitemap cannot work as
is as it uses components which are not declared. None of this is mentioned
in what looks like the obvious place
(http://cocoon.apache.org/2.0/installing/updating.html). Do I have the wrong
expectation, ie that any CVS snapshot will be internally consistant and will
thus run? or is it more a case of everyone beavering away separately with
their own configurations (sitemap and xconf) which work for their corner of
the functionality and only putting together something which runs as is at
release time?

John Williams


(I have included enough detail to help others use and find)
Changes to cocoon.xconf
=================

Input and Output modules where not included resulting in an error such as
the follwing for an absent request input-module:
          Invalid pattern '{request:servletPath}' at file:/  and
          org.apache.avalon.framework.component.ComponentException:
          input-modules: ComponentSelector could not find the component for
hint [request]

I added the following from an older xconf - some may not be used:
<input-modules>
    <component-instance
class="org.apache.cocoon.components.modules.input.RequestModule"
logger="core.modules.input" name="request"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.SessionModule"
logger="core.modules.input" name="session"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.RequestParameterModule"
logger="core.modules.input" name="request-param"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.RequestAttributeModule"
logger="core.modules.input" name="request-attr"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.HeaderAttributeModule"
logger="core.modules.input" name="request-header"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.SessionAttributeModule"
logger="core.modules.input" name="session-attr"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.StringConstantModule"
logger="core.modules.input" name="constant"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.RandomNumberModule"
logger="core.modules.input" name="random"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.DigestMetaModule"
logger="core.modules.input" name="digest"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.DateInputModule"
logger="core.modules.input" name="date"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.NullInputModule"
logger="core.modules.input" name="nullinput"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.XMLMetaModule"
logger="core.modules.input" name="xmlmeta"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.MapMetaModule"
logger="core.modules.input" name="mapmeta"/>
    <component-instance
class="org.apache.cocoon.components.modules.input.DefaultsMetaModule"
logger="core.modules.input" name="defaults">
        <values>
            <skin>defaultSkin</skin>
            <base-url>http://localhost:8080/larva</base-url>
        </values>
    </component-instance>
    <component-instance
class="org.apache.cocoon.components.modules.input.ChainMetaModule"
logger="core.modules.input" name="chain">
       <input-module name="request-param"/>
       <input-module name="request-attr"/>
       <input-module name="session-attr"/>
       <input-module name="defaults"/>
    </component-instance>
</input-modules>

 <output-modules>
     <component-instance
class="org.apache.cocoon.components.modules.output.RequestAttributeOutputMod
ule" logger="core.modules.output" name="request-attr"/>
     <component-instance
class="org.apache.cocoon.components.modules.output.SessionAttributeOutputMod
ule" logger="core.modules.output" name="session-attr"/>
</output-modules>

+++++++++++++


A compiler parameter had to be added to the programming-languages
java-language element as follows:

    <parameter name="compiler"
value="org.apache.cocoon.components.language.programming.java.Pizza"/>
    (value could also be "com.sun.tools.javac.Main" for Javac or some other
for Jikes).

Without the compiler parameter I would get a message:
      org.apache.avalon.framework.component.ComponentException:
      UnnamedSelector: ComponentSelector could not find the component for
hint [serverpages]

Not terribly helpful but inspecting the error log exposed the culprit, ie:

      Could not set up Component for hint [ java]
      org.apache.avalon.framework.parameters.ParameterException: The
parameter 'compiler' does not contain a value"



Changes to Sitemap
=============
Changes are needed in order to make the sitemap internally consistant, ie
generators, readers & serializers used in pipelines but not declared:

add the following map:generators:
<map:generator label="content,data" name="script"
src="org.apache.cocoon.generation.ScriptGenerator"/>
<map:generator label="content,data" name="jsp"
src="org.apache.cocoon.generation.JspGenerator"/>
<map:generator label="content,data" name="velocity"
src="org.apache.cocoon.generation.VelocityGenerator"/>
<map:generator label="content,data" name="stream"
src="org.apache.cocoon.generation.StreamGenerator"/>
<map:generator label="content,data" name="html"
src="org.apache.cocoon.generation.HTMLGenerator"/>

add the following map:readers:
<map:reader name="jsp" src="org.apache.cocoon.reading.JSPReader"/>

add the following map:serializers:
<map:serializer mime-type="application/msword" name="fo2rtf"
src="org.apache.cocoon.serialization.RTFSerializer"/>
<map:serializer logger="sitemap.serializer.fo2pdf"
mime-type="application/pdf" name="fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer"/>
<map:serializer logger="sitemap.serializer.fo2ps"
mime-type="application/postscript" name="fo2ps"
src="org.apache.cocoon.serialization.FOPSerializer"/>
<map:serializer logger="sitemap.serializer.fo2pcl" mime-type="vnd.hp-PCL"
name="fo2pcl" src="org.apache.cocoon.serialization.FOPSerializer"/>

Not adding the above gave the errors:
          org.apache.avalon.framework.configuration.ConfigurationException:
          Type 'script' is not defined for 'generate' at
file:/G:/cocoon-2.0_20030812221701/sitemap.xmap:996:65
(or jsp, velocity, stream, html for generate, or jsp for read, or fo2rtf,
fo2pdf, fo2ps, fo2pcl for serialize)



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


Mime
View raw message