Plugins are not finding the Locatiomap
--------------------------------------

                 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-dev
            Reporter: Gavin
             Fix For: 0.9


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.