Mailing List Archive

"Could not find component for role" after upgrading to 0.8
Hello,

I wanted to be able to use Forrest 0.8 to successfully build a site
that worked with Forrest 0.7.

I started this project last week, so I may have forgotten some of the
things I did.

I changed $FORREST_HOME to point to Forrest 0.8 instead of 0.7. "type
forrest" in bash confirms that "forrest" runs Forrest 0.8.

I then tried to follow the directions in
http://forrest.apache.org/docs_0_80/upgrading_08.html . I copied
locationmap.xml . I did not know what to do about the "Forrest
configuration simplification" step. I ran "forrest clean-work".

When I run "forrest" I get this line after the Cocoon header block:

X [0] linkmap.html BROKEN: Could
not find component for role:
[org.apache.cocoon.components.modules.input.InputModule/project]
(Key='org.apache.cocoon.components.modules.input.InputModule/project')

The build is aborted after this failure.

What can I do?

Thanks,
Brolin

PS: See my previous posts for my system configuration.
Re: "Could not find component for role" after upgrading to 0.8 [ In reply to ]
Brolin Empey wrote:
> Hello,
>
> I wanted to be able to use Forrest 0.8 to successfully build a site
> that worked with Forrest 0.7.
>
> I started this project last week, so I may have forgotten some of the
> things I did.
>
> I changed $FORREST_HOME to point to Forrest 0.8 instead of 0.7. "type
> forrest" in bash confirms that "forrest" runs Forrest 0.8.
>
> I then tried to follow the directions in
> http://forrest.apache.org/docs_0_80/upgrading_08.html . I copied
> locationmap.xml . I did not know what to do about the "Forrest
> configuration simplification" step. I ran "forrest clean-work".
>
> When I run "forrest" I get this line after the Cocoon header block:
>
> X [0] linkmap.html BROKEN: Could
> not find component for role:
> [org.apache.cocoon.components.modules.input.InputModule/project]
> (Key='org.apache.cocoon.components.modules.input.InputModule/project')
>
> The build is aborted after this failure.
>
> What can I do?

That error sounds like you need to follow the upgrade
instructions and do the bit that you missed.

Do you have a "project sitemap" or your own "plugin"?

If so then follow the "Forrest configuration simplification"
step. See the last item which refers to a properties module
called "project" which is what your error message says.

Is this a skins-based site, or is it using an early
version of the whiteboard Dispatcher in development?

-David
Re: "Could not find component for role" after upgrading to 0.8 [ In reply to ]
I solved the problem.

I did not know what to do for the "Forrest configuration
simplification" step because I could not find any text to replace in
site.xml .

I did a recursive grep in my Forrest "src" directory and found that I
had to edit sitemap.xmap instead of site.xml . Perhaps the upgrade
instructions could be more clear about which files need to be edited?

Brolin
Re: "Could not find component for role" after upgrading to 0.8 [ In reply to ]
Brolin Empey wrote:
> I solved the problem.
>
> I did not know what to do for the "Forrest configuration
> simplification" step because I could not find any text to replace in
> site.xml .

The upgrade instructions do not mention the site.xml

It sounds like you are getting confused:

The "Cocoon Sitemaps" i.e. any file ending with *.xmap
is the system to enable Cocoon to know how to process
different types of input and output.

The site.xml is the menu navigation and linking
configuration file.

> I did a recursive grep in my Forrest "src" directory and found that I
> had to edit sitemap.xmap instead of site.xml . Perhaps the upgrade
> instructions could be more clear about which files need to be edited?

I added another section at the bottom to explain
that you can remove a project sitemap.xmap if you
are not using it.
http://forrest.apache.org/docs_0_80/upgrading_08.html#project-sitemap

I also showed the error message at
http://forrest.apache.org/docs_0_80/upgrading_08.html#modules
which should help with FAQ searching.

Hope that helps others to avoid this mishap.

-David
Re: "Could not find component for role" after upgrading to 0.8 [ In reply to ]
On 08/05/07, David Crossley <crossley@apache.org> wrote:
> Brolin Empey wrote:
> > I solved the problem.
> >
> > I did not know what to do for the "Forrest configuration
> > simplification" step because I could not find any text to replace in
> > site.xml .
>
> The upgrade instructions do not mention the site.xml
>
> It sounds like you are getting confused:
>
> The "Cocoon Sitemaps" i.e. any file ending with *.xmap
> is the system to enable Cocoon to know how to process
> different types of input and output.
>
> The site.xml is the menu navigation and linking
> configuration file.

This is an understandable mistake, in many other environments sitemap
means a map of the site, which is what site.xml can be considered to
be.

We should remember this and try and make the distinction clear in user
level docs.

Ross
Re: "Could not find component for role" after upgrading to 0.8 [ In reply to ]
Thank you for your efforts.

I would like to suggest that a new paragraph similar to the following
be added at the bottom of
http://forrest.apache.org/docs_0_80/upgrading_08.html#modules

"If you are receiving this error message, check that you are editing
the Cocoon Sitemap files (*.xmap) instead of site.xml (the menu
navigation and linking configuration file)."
Re: "Could not find component for role" after upgrading to 0.8 [ In reply to ]
Brolin Empey wrote:
> Thank you for your efforts.
>
> I would like to suggest that a new paragraph similar to the following
> be added at the bottom of
> http://forrest.apache.org/docs_0_80/upgrading_08.html#modules
>
> "If you are receiving this error message, check that you are editing
> the Cocoon Sitemap files (*.xmap) instead of site.xml (the menu
> navigation and linking configuration file)."

Thanks. I took a different approach and added some entries
to the glossary and referred to that.

-David
Re: "Could not find component for role" after upgrading to 0.8 [ In reply to ]
On 5/9/07, David Crossley <crossley@apache.org> wrote:
> Thanks. I took a different approach and added some entries
> to the glossary and referred to that.

That sounds like a better solution than my suggestion, because your
approach minimises duplication of definitions. Now that I think about
it, my suggestion was inviting duplication of definitions.

Thanks,
Brolin