Return-Path: Delivered-To: apmail-forrest-dev-archive@www.apache.org Received: (qmail 17977 invoked from network); 23 Nov 2006 01:13:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Nov 2006 01:13:13 -0000 Received: (qmail 70176 invoked by uid 500); 23 Nov 2006 01:13:23 -0000 Delivered-To: apmail-forrest-dev-archive@forrest.apache.org Received: (qmail 70038 invoked by uid 500); 23 Nov 2006 01:13:22 -0000 Mailing-List: contact dev-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@forrest.apache.org List-Id: Delivered-To: mailing list dev@forrest.apache.org Received: (qmail 70027 invoked by uid 99); 23 Nov 2006 01:13:22 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2006 17:13:22 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [212.23.3.140] (HELO pythagoras.zen.co.uk) (212.23.3.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2006 17:13:09 -0800 Received: from [82.69.78.226] (helo=[192.168.0.10]) by pythagoras.zen.co.uk with esmtp (Exim 4.50) id 1Gn38x-0007Y0-Pz for dev@forrest.apache.org; Thu, 23 Nov 2006 01:12:48 +0000 Message-ID: <4564F583.5050803@apache.org> Date: Thu, 23 Nov 2006 01:12:35 +0000 From: Ross Gardler User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: dev@forrest.apache.org Subject: Re: Building Forrest 2 References: <455F8F11.5080607@apache.org> <45638ABA.5020506@apache.org> <20061122034938.GF903@igg.indexgeo.com.au> <4564288E.2030705@apache.org> <20061122222911.GH903@igg.indexgeo.com.au> <4564DB4E.1020609@apache.org> <20061123000739.GJ903@igg.indexgeo.com.au> In-Reply-To: <20061123000739.GJ903@igg.indexgeo.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Originating-Pythagoras-IP: [82.69.78.226] X-Virus-Checked: Checked by ClamAV on apache.org David Crossley wrote: > 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. I really am trying to do too many things tonight (the Ashes have start as well, so that's me out of the real world for 5 days) It's in http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/Controller.java?revision=477949&view=markup The CLI calls the default constructor which calls this("src/locationmap.xml", "src/forrestContext.xml"); The file resolution is in the parameterised constructor and consists of two parts: final File file = new File(contextPath); and this.context = new FileSystemXmlApplicationContext(file .getAbsolutePath()); (contextPath in the first line is the "src/forrestContext.xml") The problem is that getAbsolutePath() should be getPath(). I've made the change, please test. Ross