[ https://issues.apache.org/jira/browse/FOR-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780350#action_12780350 ]
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 or 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 warnings. > ----------------------------------------------------------------------------------------------- > > Key: FOR-993 > URL: https://issues.apache.org/jira/browse/FOR-993 > 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 found. > 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 directory. > 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(MountNode.java:129) > at > org.apache.forrest.locationmap.lm.MountNode.getLocationMap(MountNode.java:87) > at > org.apache.forrest.locationmap.lm.MountNode.locate(MountNode.java:157) > at > org.apache.forrest.locationmap.lm.SelectNode.locate(SelectNode.java:110) > at > org.apache.forrest.locationmap.lm.LocatorNode.locate(LocatorNode.java:122) > at > org.apache.forrest.locationmap.lm.LocationMap.locate(LocationMap.java:276) > at > org.apache.forrest.locationmap.LocationMapModule.getAttribute(LocationMapModule.java:203) > at > org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.processModule(PreparedVariableResolver.java:246) > at > org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.resolve(PreparedVariableResolver.java:197) > at > org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:77) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77) > at > org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:155) > at > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77) > at > org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:95) > at > org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:292) > at > org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:223) > at > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:289) > at org.apache.cocoon.Cocoon.process(Cocoon.java:557) > at > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:364) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354) > at > org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1808) > at > org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1758) > at org.mortbay.http.HttpServer.service(HttpServer.java:879) > at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) > at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952) > at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) > at > org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197) > at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) > at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501) > Caused by: org.apache.excalibur.source.SourceNotFoundException: Exception > during processing of cocoon://locationmap-project.xml > at > org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(SitemapSource.java:207) > at > org.apache.forrest.locationmap.lm.MountNode.loadConfiguration(MountNode.java:125) > ... 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(SourceUtil.java:377) > at > org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:450) > at > org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:281) > at > org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:118) > at > org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:537) > at > org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:174) > at > org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:437) > at > org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(SitemapSource.java:199) > ... 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(FileSource.java:150) > at > org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:445) > ... 39 more > Caused by: java.io.FileNotFoundException: > 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 java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.<init>(FileInputStream.java:106) > at > org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146) > ... 40 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.