forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Gardler (JIRA)" <>
Subject [jira] Commented: (FOR-993) Plugins not finding the optional plugin specific Locationmap causes Errors instead of warnings.
Date Fri, 20 Nov 2009 00:46:39 GMT


Ross Gardler commented on FOR-993:

See my most recent comment. It ends with:

This issue is about reporting an error that is actually a warning.

There are two ways to avoid this:

1) report as a warning not an error 


2) force all projects to have a default locationmap (that would normally be empty) 


This issue is non-issue in my opinion. If it is an issue it is nothing to do with plugins.
Gavin appears to have spotted this problem whilst working with plugins, but the behaviour
would be the same in any content built with Forrest.

Project can OPTIONALLY provide a locationmap, there is no requirement for that to be present.
The code reports this as an error, but it should be a warning (see 1. above)

If we don't want to see such a warning then we could require projects to have an empty locationmap
as a minimum.

Personally I think reporting it as a warning not an error is just fine.

You could add an optional mount to the locationmap grammar, but why bother? Under what circumstances
would it be required and what would you do if it were? If a required match is not provided
the build will fail anyway and a warning would have been recorded against the missing locationmap.
Adding the extra attribute would just add complexity for the user that brings no value other
than reducing some logging information.

If I were to spend cycles fxing this I would simply change the error log to a warning.

> Plugins not finding the optional plugin specific Locationmap causes Errors instead of
> -----------------------------------------------------------------------------------------------
>                 Key: FOR-993
>                 URL:
>             Project: Forrest
>          Issue Type: Bug
>          Components: Plugins (general issues)
>    Affects Versions: 0.8
>            Reporter: Gavin
>            Priority: Minor
>             Fix For: 0.9-dev
> Whilst checking error logs for another issue, I spotted that the locationmap was not
being found.
> So I tried it in serveral plugins, all with the same result, the locationmap is not being
> The locationmap is normally found in %PROJECT_HOME%/src/documentation/content/ directory
> Our own site docs it can be found in site-author/content.
> However for Plugins all the locationmap.xml files are located in %pluginHome%/ root directory.
> The locationmap.xml file for plugins is not being looked for in root but in the content
> Example :-
> ERROR   (2007-04-16) 19:13.27:578   [core.modules.mapper.lm] (/index.html) PoolThread-4/SelectNode:
Ignoring locationmap config exception: Unable to build LocationMap.
> org.apache.avalon.framework.configuration.ConfigurationException: Unable to build LocationMap.
> 	at org.apache.forrest.locationmap.lm.MountNode.loadConfiguration(
> 	at org.apache.forrest.locationmap.lm.MountNode.getLocationMap(
> 	at org.apache.forrest.locationmap.lm.MountNode.locate(
> 	at org.apache.forrest.locationmap.lm.SelectNode.locate(
> 	at org.apache.forrest.locationmap.lm.LocatorNode.locate(
> 	at org.apache.forrest.locationmap.lm.LocationMap.locate(
> 	at org.apache.forrest.locationmap.LocationMapModule.getAttribute(
> 	at org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.processModule(
> 	at org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.resolve(
> 	at org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
> 	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(
> 	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(
> 	at org.apache.cocoon.Cocoon.process(
> 	at org.apache.cocoon.servlet.CocoonServlet.service(
> 	at javax.servlet.http.HttpServlet.service(
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(
> 	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(
> 	at org.mortbay.http.HttpContext.handle(
> 	at org.mortbay.jetty.servlet.WebApplicationContext.handle(
> 	at org.mortbay.http.HttpContext.handle(
> 	at org.mortbay.http.HttpServer.service(
> 	at org.mortbay.http.HttpConnection.service(
> 	at org.mortbay.http.HttpConnection.handleNext(
> 	at org.mortbay.http.HttpConnection.handle(
> 	at org.mortbay.http.SocketListener.handleConnection(
> 	at org.mortbay.util.ThreadedServer.handle(
> 	at org.mortbay.util.ThreadPool$
> Caused by: org.apache.excalibur.source.SourceNotFoundException: Exception during processing
of cocoon://locationmap-project.xml
> 	at org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(
> 	at org.apache.forrest.locationmap.lm.MountNode.loadConfiguration(
> 	... 32 more
> Caused by: org.apache.cocoon.ResourceNotFoundException: Resource not found.
> 	at <map:serialize type="xml"> - file:/D:/Apache2/apache-forrest-0.8/main/webapp/sitemap.xmap:364:36
> 	at <map:generate> - file:/D:/Apache2/apache-forrest-0.8/main/webapp/sitemap.xmap:363:66
> 	at org.apache.cocoon.components.source.SourceUtil.handle(
> 	at org.apache.cocoon.components.source.SourceUtil.getInputSource(
> 	at org.apache.cocoon.components.source.SourceUtil.parse(
> 	at org.apache.cocoon.generation.FileGenerator.generate(
> 	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(
> 	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(
> 	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(
> 	at org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(
> 	... 33 more
> Caused by: org.apache.excalibur.source.SourceNotFoundException: file:/D:/Apache2/apache-forrest-0.8/build/plugins/org.apache.forrest.plugin.input.glossary/src/documentation/content/locationmap.xml
doesn't exist.
> 	at org.apache.excalibur.source.impl.FileSource.getInputStream(
> 	at org.apache.cocoon.components.source.SourceUtil.getInputSource(
> 	... 39 more
> Caused by: D:\Apache2\apache-forrest-0.8\build\plugins\org.apache.forrest.plugin.input.glossary\src\documentation\content\locationmap.xml
(The system cannot find the file specified)
> 	at Method)
> 	at<init>(
> 	at org.apache.excalibur.source.impl.FileSource.getInputStream(
> 	... 40 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message