Forrest
  1. Forrest
  2. FOR-1108

Dispatcher, Cocoon 2.1 and Windows

    Details

    • Urgency:
      Blocker

      Description

      Since the update to Cocoon 2.1 Forrest and Dispatcher have broken on windows.
      1. testRunWithDebug.log
        315 kB
        Ross Gardler
      2. test.log
        55 kB
        Ross Gardler
      3. test_dispatcher_site.zip
        216 kB
        Ross Gardler
      4. linux.output.xmap
        2 kB
        Brian M Dube
      5. linux.locationmap.xml
        1 kB
        Brian M Dube
      6. dispatcher.xmap.diff
        3 kB
        Brian M Dube
      7. core.log
        101 kB
        Ross Gardler

        Issue Links

          Activity

          Hide
          Gavin added a comment -
          Remaining work on this is for converting whiteboard plugins to Locationmap - which can be done independant of a main release and should not hold it up. Moving to 0.10
          Show
          Gavin added a comment - Remaining work on this is for converting whiteboard plugins to Locationmap - which can be done independant of a main release and should not hold it up. Moving to 0.10
          Hide
          Gavin added a comment -
          The whiteboard plugins without LocationMaps --

          3 choices:

          1. If we are going to release plugins separate then we can just not release them as part of our main release 0.9 coming up.

          2. If we are bundling all plugins including whiteboard plugins with our next release, then these could be excluded somehow (as not being maintained.)

          3. We go through each one and convert them to use the LocationMap.

          Show
          Gavin added a comment - The whiteboard plugins without LocationMaps -- 3 choices: 1. If we are going to release plugins separate then we can just not release them as part of our main release 0.9 coming up. 2. If we are bundling all plugins including whiteboard plugins with our next release, then these could be excluded somehow (as not being maintained.) 3. We go through each one and convert them to use the LocationMap.
          Hide
          Gavin added a comment -
          All plugins have been updated with the extra location

          All whiteboard plugins have been update with the extra location except for the following :-

          org.apache.forrest.plugin.input.Database
          org.apache.forrest.plugin.input.Blog
          org.apache.forrest.plugin.input.ecs
          org.apache.forrest.plugin.input.Lenya
          org.apache.forrest.plugin.input.logs
          org.apache.forrest.plugin.input.Resume
          org.apache.forrest.plugin.input.serverStatus
          org.apache.forrest.plugin.internal.GoogleSiteMap
          org.apache.forrest.plugin.internal.IMSManifest
          org.apache.forrest.plugin.OpenOffice.org-output
          org.apache.forrest.plugin.output.Chart
          org.apache.forrest.plugin.output.htmlArea
          org.apache.forrest.plugin.output.voice
          rtf-output

          None if the above have LocationMaps and so havent had the LM treatment yet. Except for input.serverStatus which has an empty LocationMap.
          Show
          Gavin added a comment - All plugins have been updated with the extra location All whiteboard plugins have been update with the extra location except for the following :- org.apache.forrest.plugin.input.Database org.apache.forrest.plugin.input.Blog org.apache.forrest.plugin.input.ecs org.apache.forrest.plugin.input.Lenya org.apache.forrest.plugin.input.logs org.apache.forrest.plugin.input.Resume org.apache.forrest.plugin.input.serverStatus org.apache.forrest.plugin.internal.GoogleSiteMap org.apache.forrest.plugin.internal.IMSManifest org.apache.forrest.plugin.OpenOffice.org-output org.apache.forrest.plugin.output.Chart org.apache.forrest.plugin.output.htmlArea org.apache.forrest.plugin.output.voice rtf-output None if the above have LocationMaps and so havent had the LM treatment yet. Except for input.serverStatus which has an empty LocationMap.
          Hide
          Brian M Dube added a comment -
          Attaching linux.locationmap.xml and linux.output.xmap as requested on the dev list. Linux seed-sample files from build/tmp during forrest run.
          Show
          Brian M Dube added a comment - Attaching linux.locationmap.xml and linux.output.xmap as requested on the dev list. Linux seed-sample files from build/tmp during forrest run.
          Hide
          Brian M Dube added a comment -
          It's in dispatcher.xmap.diff attached to this issue.

          I'll have another look for the root cause of the problem.
          Show
          Brian M Dube added a comment - It's in dispatcher.xmap.diff attached to this issue. I'll have another look for the root cause of the problem.
          Hide
          Gavin added a comment -
          Tested on whiteboard plugin OOo and works fine also.

          Brian, can you post what code you changed to get your dispatcher working ?
          Show
          Gavin added a comment - Tested on whiteboard plugin OOo and works fine also. Brian, can you post what code you changed to get your dispatcher working ?
          Hide
          Gavin added a comment -
          Well, I got the .Text and .POD plugins working fine on Windows too, and I expect if I make the same changes throughout the rest will too. I will test on a couple of whiteboard plugins next.

          Previously - with a seed-sample and no dispatcher, only the PDF plugin worked, with the changes below then the above two also work now.

            <locator>
                    <match pattern="text.transform.*.*">
                            <select>
                                    <location src="resources/stylesheets/{1}-to-{2}.xsl" />
                                    <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/resources/stylesheets/{1}-to-{2}.xsl"/>
                            </select>
              </match>
            </locator>
          Show
          Gavin added a comment - Well, I got the .Text and .POD plugins working fine on Windows too, and I expect if I make the same changes throughout the rest will too. I will test on a couple of whiteboard plugins next. Previously - with a seed-sample and no dispatcher, only the PDF plugin worked, with the changes below then the above two also work now.   <locator>           <match pattern="text.transform.*.*">                   <select>                           <location src="resources/stylesheets/{1}-to-{2}.xsl" />                           <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/resources/stylesheets/{1}-to-{2}.xsl"/>                   </select>     </match>   </locator>
          Hide
          Brian M Dube added a comment -
          I made changes similar to Gavin, but added a few more to address the index.navigation.xml and round-corner-hex.svg.xslt issues. This appears to get the dispatcher working on Windows without breaking Linux. I've only tested the seed site so far.

          After reviewing Cyriaque's comment I tested output.Text, and it's still broken. I don't know whether it's a similar fix for the other plugins, or something different entirely.

          Show
          Brian M Dube added a comment - I made changes similar to Gavin, but added a few more to address the index.navigation.xml and round-corner-hex.svg.xslt issues. This appears to get the dispatcher working on Windows without breaking Linux. I've only tested the seed site so far. After reviewing Cyriaque's comment I tested output.Text, and it's still broken. I don't know whether it's a similar fix for the other plugins, or something different entirely.
          Hide
          Cyriaque Dupoirieux added a comment -
          Test with txt output plugin...

          If I access (forrest run) to the index.txt I get :
          Internal Server Error
             Message: null
             Description: No details available.
             Sender: org.apache.cocoon.servlet.CocoonServlet
             Source: Cocoon Servlet
             Request URI
                index.txt
             cause
                 D:\duc\forrest\main\webapp\D:\duc\forrest\plugins\org.apache.forrest.plugin.output.Text\build\tmp\D:\duc\forrest\build\plugins\org.apache.forrest.plugin.output.Text (Syntaxe du nom de fichier, de répertoire ou de volume incorrecte)
              request-uri
                /index.txt
          and if I comment the xsl parameter in the output.xmap :
                <map:match type="regexp" pattern="^(.*?)([^/]*).txt$">
                  <map:aggregate element="site">
                    <map:part src="cocoon://skinconf.xml"/>
                    <map:part src="cocoon://{1}{2}.xml"/>
                  </map:aggregate>
                  <map:transform type="xinclude"/>
                  <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.txt"/>
                  <map:transform src="{lm:transform.html.broken-links}"/>
                  <map:transform src="{lm:text.transform.document.text}"/>
                    <!-- map:parameter name="document-width" value="{properties:text.page.width}"/>
                  </map:transform -->
                  <map:serialize type="text"/>
                </map:match>
          Then it generates something...
          Show
          Cyriaque Dupoirieux added a comment - Test with txt output plugin... If I access (forrest run) to the index.txt I get : Internal Server Error    Message: null    Description: No details available.    Sender: org.apache.cocoon.servlet.CocoonServlet    Source: Cocoon Servlet    Request URI       index.txt    cause        D:\duc\forrest\main\webapp\D:\duc\forrest\plugins\org.apache.forrest.plugin.output.Text\build\tmp\D:\duc\forrest\build\plugins\org.apache.forrest.plugin.output.Text (Syntaxe du nom de fichier, de répertoire ou de volume incorrecte)     request-uri       /index.txt and if I comment the xsl parameter in the output.xmap :       <map:match type="regexp" pattern="^(.*?)([^/]*).txt$">         <map:aggregate element="site">           <map:part src=" cocoon://skinconf.xml "/>           <map:part src="cocoon://{1}{2}.xml"/>         </map:aggregate>         <map:transform type="xinclude"/>         <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.txt"/>         <map:transform src="{lm:transform.html.broken-links}"/>         <map:transform src="{lm:text.transform.document.text}"/>           <!-- map:parameter name="document-width" value="{properties:text.page.width}"/>         </map:transform -->         <map:serialize type="text"/>       </map:match> Then it generates something...
          Hide
          Gavin added a comment -
          I altered those map mounts to read :-

              <map:pipeline>
          <!-- businessHelper -->
          <map:mount uri-prefix="" src="{forrest:forrest.plugins}/org.apache.forrest.plugin.internal.dispatcher/dataModel.xmap" check-reload="yes"
                  pass-through="true" />
              </map:pipeline>
          <!-- linkmap -->
             <map:pipeline>
                     <map:mount uri-prefix="" src="{forrest:forrest.plugins}/org.apache.forrest.plugin.internal.dispatcher/ls.xmap" check-reload="yes"
                  pass-through="true" />
              </map:pipeline>
              <map:pipeline>
                      <map:mount uri-prefix="" src="{forrest:forrest.plugins}/org.apache.forrest.plugin.internal.dispatcher/themes.xmap" check-reload="yes"
                  pass-through="true" />
              </map:pipeline>

          and we now get a different error message :-

          dispatcherError: 500 - Internal server error
          The contract "siteinfo-meta-navigation" has thrown thrown an exception by resolving raw data from "cocoon://index.navigation.xml".

          dispatcherErrorStack:
           org.apache.excalibur.source.SourceNotFoundException: Exception during processing of cocoon://index.navigation.xml
          Show
          Gavin added a comment - I altered those map mounts to read :-     <map:pipeline> <!-- businessHelper --> <map:mount uri-prefix="" src="{forrest:forrest.plugins}/org.apache.forrest.plugin.internal.dispatcher/dataModel.xmap" check-reload="yes"         pass-through="true" />     </map:pipeline> <!-- linkmap -->    <map:pipeline>            <map:mount uri-prefix="" src="{forrest:forrest.plugins}/org.apache.forrest.plugin.internal.dispatcher/ls.xmap" check-reload="yes"         pass-through="true" />     </map:pipeline>     <map:pipeline>             <map:mount uri-prefix="" src="{forrest:forrest.plugins}/org.apache.forrest.plugin.internal.dispatcher/themes.xmap" check-reload="yes"         pass-through="true" />     </map:pipeline> and we now get a different error message :- dispatcherError: 500 - Internal server error The contract "siteinfo-meta-navigation" has thrown thrown an exception by resolving raw data from " cocoon://index.navigation.xml ". dispatcherErrorStack:  org.apache.excalibur.source.SourceNotFoundException: Exception during processing of cocoon://index.navigation.xml
          Hide
          Gavin added a comment -
          That doesn't cure it, I end up with a 500 Internal Server error and a few hundred lines of error output.

          Do you need me to capture that output and attach here ?
          Show
          Gavin added a comment - That doesn't cure it, I end up with a 500 Internal Server error and a few hundred lines of error output. Do you need me to capture that output and attach here ?
          Hide
          Thorsten Scherler added a comment -
          I wonder if:
          <map:mount uri-prefix="" src="{lm:dispatcher.home}/dataModel.xmap" check-reload="yes"
                  pass-through="true" />

          May fix this (it is a shoot in the dark).
          Show
          Thorsten Scherler added a comment - I wonder if: <map:mount uri-prefix="" src="{lm:dispatcher.home}/dataModel.xmap" check-reload="yes"         pass-through="true" /> May fix this (it is a shoot in the dark).
          Hide
          Cyriaque Dupoirieux added a comment -
          Exact,

          The problem, with the dispatcher comes from the line :
                <map:mount uri-prefix="" src="dataModel.xmap" check-reload="yes" pass-through="true" />
          in the internal.xmap.

          If I change the order of the <map> tags, the file not found is the first tag encoutered (ls.xmap in my case...)

          So it is clearly the "mounts" in general. I am sure that the skinned site generation has the same problem.

          No we have to investigate to understand why the src of the file to be mounted is translated to a very strange url :
          X [0] linkmap.html BROKEN: D:\duc\forrest\main\webapp\.\D:\duc\viewSitePerso\build\tmp\D:\d
          \forrest\build\plugins\ls.xmap (Syntaxe du nom de fichier, de rÚpertoire ou de volume incorrecte)
          Total time: 0 minutes 6 seconds, Site size: 0 Site pages: 0

          I have an installation on windows so If someone has an idea, I can test it.
          Show
          Cyriaque Dupoirieux added a comment - Exact, The problem, with the dispatcher comes from the line :       <map:mount uri-prefix="" src="dataModel.xmap" check-reload="yes" pass-through="true" /> in the internal.xmap. If I change the order of the <map> tags, the file not found is the first tag encoutered (ls.xmap in my case...) So it is clearly the "mounts" in general. I am sure that the skinned site generation has the same problem. No we have to investigate to understand why the src of the file to be mounted is translated to a very strange url : X [0] linkmap.html BROKEN: D:\duc\forrest\main\webapp\.\D:\duc\viewSitePerso\build\tmp\D:\d \forrest\build\plugins\ls.xmap (Syntaxe du nom de fichier, de rÚpertoire ou de volume incorrecte) Total time: 0 minutes 6 seconds, Site size: 0 Site pages: 0 I have an installation on windows so If someone has an idea, I can test it.
          Hide
          David Crossley added a comment -
          Thanks. The 'forrest -v' output showed that parameters passed to the java are as expected, e.g. '-Dforrest.plugins-dir=C:\projects\forrest\build\plugins'

          The problem occurs during the generation of the "structurer" for the index page, i.e. the first step. In the Dispatcher internal.xmap the first thing that it "mounts" is the dataModel.xmap file with a relative reference. However you get that mangled path.

          Too hard for me to help further, not being on Windows.
          Show
          David Crossley added a comment - Thanks. The 'forrest -v' output showed that parameters passed to the java are as expected, e.g. '-Dforrest.plugins-dir=C:\projects\forrest\build\plugins' The problem occurs during the generation of the "structurer" for the index page, i.e. the first step. In the Dispatcher internal.xmap the first thing that it "mounts" is the dataModel.xmap file with a relative reference. However you get that mangled path. Too hard for me to help further, not being on Windows.
          Hide
          Ross Gardler added a comment -
          Log level upped to Debug

          forrest run -v > testRunWithDebug.log

          http://localhost:8888/index.html

          Attached testRunWithDebug.log and core.log

          Main problem:

          Caused by: java.io.FileNotFoundException: C:\projects\forrest\main\webapp\C:\tmp
          \forretTest\build\tmp\C:\projects\forrest\build\plugins\dataModel.xmap (The file
          name, directory name, or volume label syntax is incorrect)

          Not attempted to debug - time presses.
          Show
          Ross Gardler added a comment - Log level upped to Debug forrest run -v > testRunWithDebug.log http://localhost:8888/index.html Attached testRunWithDebug.log and core.log Main problem: Caused by: java.io.FileNotFoundException: C:\projects\forrest\main\webapp\C:\tmp \forretTest\build\tmp\C:\projects\forrest\build\plugins\dataModel.xmap (The file name, directory name, or volume label syntax is incorrect) Not attempted to debug - time presses.
          Hide
          David Crossley added a comment -
          I fine-tuned the logkit.xconf in FOR-1107, so those instructions above are not right now.

          Try just setting the "core" and "startup" categories to DEBUG.
          Show
          David Crossley added a comment - I fine-tuned the logkit.xconf in FOR-1107 , so those instructions above are not right now. Try just setting the "core" and "startup" categories to DEBUG.
          Hide
          David Crossley added a comment -
          Another useful debug method is to do 'forrest -v run'. It may report something leading up to the startup of Cocoon.
          Show
          David Crossley added a comment - Another useful debug method is to do 'forrest -v run'. It may report something leading up to the startup of Cocoon.
          Hide
          David Crossley added a comment -
          That "huge debug.log" issue is FOR-1107. Probably doesn't have effect because Cocoon crashes on startup.
          Show
          David Crossley added a comment - That "huge debug.log" issue is FOR-1107 . Probably doesn't have effect because Cocoon crashes on startup.
          Hide
          David Crossley added a comment -
          Of course, make those changes in your own logkit.xconf file at main/webapp/WEB-INF/logkit.xconf as described in the faq.
          Show
          David Crossley added a comment - Of course, make those changes in your own logkit.xconf file at main/webapp/WEB-INF/logkit.xconf as described in the faq.
          Hide
          David Crossley added a comment -
          I had a quick look and couldn't see anything helpful. There are no errors logged, leading up to the crash.

          If Ross (or any other on windows) could increase the debug level, that might help to see at what stage it crashed.

          Follow:
          http://forrest.apache.org/docs/dev/faq.html#logs

          Here is what i do to enable debugging:
          -------------
          [WEB-INF]$ diff logkit.xconf logkit.xconf.debug
          144c144
          < <category name="core" log-level="WARN">
          ---
          > <category name="core" log-level="DEBUG">
          194c194
          < <category name="modules.mapper.link" log-level="INFO">
          ---
          > <category name="modules.mapper.link" log-level="DEBUG">
          201c201
          < <category name="modules.mapper.lm" log-level="INFO">
          ---
          > <category name="modules.mapper.lm" log-level="DEBUG">
          206a207
          > <log-target id-ref="linkrewriter"/>
          215c216
          < <category name="sitemap" log-level="WARN">
          ---
          > <category name="sitemap" log-level="DEBUG">
          -------------

          ]$ cd my-test-dir
          ]$ forrest seed-sample
          Enable the dispatcher-based site, follow the instructions
          in ./forrest.properties.dispatcher.properties to declare
          the dispatcher plugins.
          ]$ forrest run
          ]$ localhost:8888/index.html
          ... if that is okay, then try
          ]$ localhost:8888/linkmap.html
          ... now quit with Ctrl-C

          logs are in build/webapp/WEB-INF/logs/

          Note: When packing logfiles, beware of the new huge "debug.log". I don't yet know if it contains anything useful, nor how to reduce it. Leave it out if it has grown too big by this stage of Cocoon operation.
          Show
          David Crossley added a comment - I had a quick look and couldn't see anything helpful. There are no errors logged, leading up to the crash. If Ross (or any other on windows) could increase the debug level, that might help to see at what stage it crashed. Follow: http://forrest.apache.org/docs/dev/faq.html#logs Here is what i do to enable debugging: ------------- [WEB-INF]$ diff logkit.xconf logkit.xconf.debug 144c144 < <category name="core" log-level="WARN"> --- > <category name="core" log-level="DEBUG"> 194c194 < <category name="modules.mapper.link" log-level="INFO"> --- > <category name="modules.mapper.link" log-level="DEBUG"> 201c201 < <category name="modules.mapper.lm" log-level="INFO"> --- > <category name="modules.mapper.lm" log-level="DEBUG"> 206a207 > <log-target id-ref="linkrewriter"/> 215c216 < <category name="sitemap" log-level="WARN"> --- > <category name="sitemap" log-level="DEBUG"> ------------- ]$ cd my-test-dir ]$ forrest seed-sample Enable the dispatcher-based site, follow the instructions in ./forrest.properties.dispatcher.properties to declare the dispatcher plugins. ]$ forrest run ]$ localhost:8888/index.html ... if that is okay, then try ]$ localhost:8888/linkmap.html ... now quit with Ctrl-C logs are in build/webapp/WEB-INF/logs/ Note: When packing logfiles, beware of the new huge "debug.log". I don't yet know if it contains anything useful, nor how to reduce it. Leave it out if it has grown too big by this stage of Cocoon operation.
          Hide
          Ross Gardler added a comment -
          Results of running on windows + cygwin (but using forrest.bat, rather than forrest.sh)

          test.log is the console output for build.bat test

          test_dispatcher_site.zip is a zip of build/test_dispatcher_site

          I've not had the time to look at these and am unlikely to do so for at least a week as I'm travelleing a great deal next week.

          However, I shuld be able to rerun tests and the like, just ask.
          Show
          Ross Gardler added a comment - Results of running on windows + cygwin (but using forrest.bat, rather than forrest.sh) test.log is the console output for build.bat test test_dispatcher_site.zip is a zip of build/test_dispatcher_site I've not had the time to look at these and am unlikely to do so for at least a week as I'm travelleing a great deal next week. However, I shuld be able to rerun tests and the like, just ask.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ross Gardler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development