Thanks for pointing that out. This is just wrong and that is not the only
place where the handling of URLs is incorrect. The problem starts with the
setup of the installURL in Main:

      String installURL = new File(systemHome).toURL().toString();
      if (!installURL.endsWith(File.separator)) {
         installURL += File.separator;
      }

Which produces this bogus value:
2001-12-29 13:45:15,968 DEBUG [org.jboss.system.GPA]
jboss.system.installationURL:
file:/D:/usr/local/src/cvsroot/Main/jboss-all/build/output/jboss-3.0.0alpha/
\

This should be:
      String installURL = new File(systemHome).toURL().toString();
      if (!installURL.endsWith("/")) {
         installURL += "/";
      }

Since as you say, URLs only use '/' as a path seperator. After correcting
both
of these I am able to run tests that make use of the hsqldb service on
Win2k.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Adrian Brock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 29, 2001 1:00 PM
Subject: [JBoss-dev] Windows and installURL/codebase


> Hi,
>
> There appears to be some funny code in
> the ServiceDeployer and Main that basically does
>
> if (urlString.startsWith("file:") && !urlString.endsWith(File.separator))
> urlString += File.separator;
>
> On windows you end up with
>
> foo/bar/\
>
> which later confuses the service deployer when
> constructing the codebase for a SAR - double /
>
> file:/foo/bar//lib/ext/blah.jar
>
> And then the service deployer deploys it twice
> because they are different URLs.
> Which then leads to an IllegalAccessError.
>
> I've seen this for hsqldb.jar, I think Scott
> reported this last week?
>
> Is this code just wrong or is there some reason?
>
> If its a file: url all separators should be "/".
>
> Regards,
> Adrian



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to