Ross Gardler wrote: > David Crossley wrote: > >Ross Gardler wrote: > >>David Crossley wrote: > >>>Ross Gardler wrote: > >>>>There are some example content objects in > >>>>src/examples for you to try out, for example: > >>>> > >>>>ant -Dcontent.object.dir=[FORREST2_HOME]/src/examples/helloWorld > >>>>-Dcontent.object.start.uri=helloWorld.html run > >>>> > >>>>I hope you have more success with this, of course, let me know if you > >>>>don't > >>> > >>>Doesn't work for me: "Mac OS X" Java5: > >>> > >>>svn up > >>>cd /svn/asf/forrest/whiteboard/forrest2/core > >>>ant clean; ant compile-core > >>>ant -Dcontent.object.dir=src/examples/helloWorld > >>>-Dcontent.object.start.uri=helloWorld.html run > >>>... > >>>... > >>> [java] 0 [main] INFO org.apache.forrest.core.Controller (?:?) - > >>> Using Spring Context definition in src/forrestContext.xml > >>> [java] > >>> org.springframework.beans.factory.BeanDefinitionStoreException: > >>> IOException parsing XML document from file > >>> > >>> [/svn/asf/forrest/whiteboard/forrest2/core/src/examples/helloWorld/svn/asf/forrest/whiteboard/forrest2/core/src/examples/helloWorld/src/forrestContext.xml]; > >>> nested exception is java.io.FileNotFoundException: > >>> svn/asf/forrest/whiteboard/forrest2/core/src/examples/helloWorld/src/forrestContext.xml > >>> (No such file or directory) > >>> [java] Caused by: java.io.FileNotFoundException: > >>> > >>> svn/asf/forrest/whiteboard/forrest2/core/src/examples/helloWorld/src/forrestContext.xml > >>> (No such file or directory) > >>> [java] at java.io.FileInputStream.open(Native Method) > >>>... > >>> > >>>--------------- > >>> > >>>Seems to be mangling the pathname somehow. Also tried with > >>>full pathname for content.object.dir with same result. > >> > >>That forrestContext.xml file should exist in the location indicated > >>(assuming svn/asf/forrest/whiteboard/forrest2/core is the path to your > >>forrest2 code). See [1] > >> > >>Can you please verify that is the case. > > > >I checked all that before sending the errors. > > > >As i said, please note the mangled paths and the missing leading slash > >on the Exception messages. > > Sorry for being dense, I only looked at the "Caused by:" part of the > report, not the original IO Exception. Interestingly they give two > different paths.
The first path is mangled, the second path is missing the leading slash. Perhaps as a result of the first mess. > Anyway, I note your ANT command is: > > ant -Dcontent.object.dir=src/examples/helloWorld > -Dcontent.object.start.uri=helloWorld.html run > > This works OK for me (Cygwin on Windows XP), so I guess this is a MacOS > thing. My unsaid question is: Is there specific code anywhere in forrest2 that builds that pathname? It might have some "file:" handling which is a typical thing that causes pathname errors between UNIX/Windows. Would someone else please try it on a UNIX/Linux system, i.e. not Cygwin. > Try using the fullpath to the content object: > > ant > -Dcontent.object.dir=/svn/asf/forrest/whiteboard/forrest2/coresrc/examples/helloWorld > > -Dcontent.object.start.uri=helloWorld.html run Again as i originally said, i tried the full pathname. Same result. > and/or a properly expressed relative path: > > ant -Dcontent.object.dir=./src/examples/helloWorld > -Dcontent.object.start.uri=helloWorld.html run I didn't say, but i had already tried a ./ relative path. Same result. Hmmm, interesting. I added some "echo" into core/build.xml at various targets. It reports the proper pathname with no mangling. So it must be when forrest2 (or is it Spring) composes the pathname for forrestContext.xml -David
