Hi,
It was suggested on the Lenya mailing list that I forward the following to
avalon mailing list.
It about URI resolving and Lenya not running on Windows. Lenya depends on
org.apache.excalibur.source.impl.FileSource to work with uri's for files and
involves the age old <SPACE> issue with Windows file system vs. other OS for
uri's. See below.
----- Original Message -----
From: "Roger I Martin PhD" <[EMAIL PROTECTED]>
To: "Lenya Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2003 11:52 PM
Subject: Re: Windows users/URISyntaxException?
> Hi,
>
> Your right and it seems to be propagated from excalibur source resolver
> (org.apache.excalibur.source.impl.FileSource) and not in Lenya code, at
> least the ones I checked. I recompiled
> org.apache.excalibur.source.impl.FileSource adding
> m_uri = uri.replaceAll(" ", "%20");
> in the place of
> m_uri = uri;
> in method
> private void init(String scheme, File file) throws SourceException
> {
> m_scheme = scheme;
>
> String uri;
> try
> {
> uri = file.toURL().toExternalForm();
> }
> catch (MalformedURLException mue)
> {
> // Can this really happen ?
> throw new SourceException("Failed to get URL for file " +
file,
> mue);
> }
>
> if (!uri.startsWith(scheme))
> {
> // Scheme is not "file:"
> uri = scheme + ':' + uri.substring(uri.indexOf(':') + 1);
> }
>
> m_uri = uri.replaceAll(" ", "%20");
>
> m_file = file;
> }
>
> Then put the class in lenya classes folder as in
> C:\Program
>
Files\jakarta-tomcat-4.0\webapps\lenya\WEB-INF\classes\org\apache\excalibur\
> source\impl
>
> Then restarted tomcat and got further in running Lenya but haven't tested
> everything but no longer get URISyntaxException right away when going to
> Lenya's weblog!
>
> Do avalon people want to modify
org.apache.excalibur.source.impl.FileSource
> this way? I found setting <SPACE> to %20 up stream gets wiped by the
> file.toURL().toExternalForm();
>
> Or perhaps file.toURL().toExternalForm(); could be changed to
> file.toURI().toString(); but I don't know if this would mess up other
> excalibur dependent projects.
>
> Any suggestions?
>
> Roger
>
> ----- Original Message -----
> From: "P�l Brattberg" <[EMAIL PROTECTED]>
> To: "Lenya Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, October 01, 2003 9:28 PM
> Subject: Windows users/URISyntaxException?
>
>
> > Hi!
> >
> > Just wanna drop a note to people installing on Windows.
> >
> > Make sure you install Tomcat in a directory free from spaces! Do _not_
use
> the
> > path recommended by the Tomcat installer, since that path has spaces.
> Instead,
> > install to c:\tomcat or c:\usr\local\tomcat or the like.
> >
> > If you have already installed Tomcat at such a location, just move it,
and
> make
> > sure you update your shortcuts in the start menu.
> >
> > Having the lenya web directory in a structure that contains spaces will
> give an
> > URISyntaxException.
> >
> > This is be a show stopper on Windows. (At least Windows XP)
> >
> > Good luck!
> >
> > / p�l brattberg
> >
> > ---{ shameless plug o' the year }---
> > Break down the barriers to
> > Open Source development.
> > -> http://sourceforge.net <-
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]