Re: WebappClassLoader.getURLs Bug!
- Original Message - From: "Remy Maucherat" <[EMAIL PROTECTED]> To: "Tomcat Developers List" <[EMAIL PROTECTED]> Sent: Tuesday, July 20, 2004 8:28 AM Subject: Re: WebappClassLoader.getURLs Bug! >Shapira, Yoav wrote: >> Hi, >> >>>Unfortunately, now that I've moved to Tomcat 5, I discover that the bug >>>is still quite present. There is now a nice getURI() method along with >>>the previous getURL() method. Unfortunately, getURLs() does not use >>>getURI( file ).toURL() or any such as it would need to for the RMI >>>runtime's sake (as it calls getURLs()). >> >> The getURI method returns a URL object, not a URI object, as the latter >> is JDK 1.4-only and we still officially support building and running on >> JDK 1.3. > >I agree: you really should be complaining about Sun (who wrote the bad >URL handling in the first place). > I agree that Sun's implementation is brain-dead (who thought that space-separated list of URLs was A Good Idea? :). I looked at WACL the last time I got bit by this, but then decided that it was easier to move the app to a directory w/o spaces than to encode the URLs (e.g. s/ /%20/). >Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebappClassLoader.getURLs Bug!
Okay, I'll just change getURL() to be identical to getURI() and all should be well for me. Shapira, Yoav wrote: Hi, And wait for a 5.1 release, which may not be long in the making. Yoav Shapira Millennium Research Informatics -Original Message- From: Jess Holle [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 12:40 PM To: Tomcat Developers List Subject: Re: WebappClassLoader.getURLs Bug! Remy Maucherat wrote: Jess Holle wrote: Agreed -- but that won't fix the issue. So can we fix it in 5.0.x or not? Possibly, but it's risky. So you'd recommend that I just patch my own distribution, then? [Changing getURL() to convert to a URI first worked fine in 4.1.24...] -- Jess Holle - 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]
RE: WebappClassLoader.getURLs Bug!
Hi, And wait for a 5.1 release, which may not be long in the making. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Jess Holle [mailto:[EMAIL PROTECTED] >Sent: Tuesday, July 20, 2004 12:40 PM >To: Tomcat Developers List >Subject: Re: WebappClassLoader.getURLs Bug! > >Remy Maucherat wrote: > >> Jess Holle wrote: >> >>> Agreed -- but that won't fix the issue. >>> >>> So can we fix it in 5.0.x or not? >> >> Possibly, but it's risky. > >So you'd recommend that I just patch my own distribution, then? > >[Changing getURL() to convert to a URI first worked fine in 4.1.24...] > >-- >Jess Holle > > >- >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]
Re: WebappClassLoader.getURLs Bug!
Remy Maucherat wrote: Jess Holle wrote: Agreed -- but that won't fix the issue. So can we fix it in 5.0.x or not? Possibly, but it's risky. So you'd recommend that I just patch my own distribution, then? [Changing getURL() to convert to a URI first worked fine in 4.1.24...] -- Jess Holle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebappClassLoader.getURLs Bug!
Jess Holle wrote: Agreed -- but that won't fix the issue. So can we fix it in 5.0.x or not? Possibly, but it's risky. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebappClassLoader.getURLs Bug!
Remy Maucherat wrote: Shapira, Yoav wrote: Hi, Unfortunately, now that I've moved to Tomcat 5, I discover that the bug is still quite present. There is now a nice getURI() method along with the previous getURL() method. Unfortunately, getURLs() does not use getURI( file ).toURL() or any such as it would need to for the RMI runtime's sake (as it calls getURLs()). The getURI method returns a URL object, not a URI object, as the latter is JDK 1.4-only and we still officially support building and running on JDK 1.3. I agree: you really should be complaining about Sun (who wrote the bad URL handling in the first place). Agreed -- but that won't fix the issue. So can we fix it in 5.0.x or not? -- Jess Holle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebappClassLoader.getURLs Bug!
Shapira, Yoav wrote: Hi, Unfortunately, now that I've moved to Tomcat 5, I discover that the bug is still quite present. There is now a nice getURI() method along with the previous getURL() method. Unfortunately, getURLs() does not use getURI( file ).toURL() or any such as it would need to for the RMI runtime's sake (as it calls getURLs()). The getURI method returns a URL object, not a URI object, as the latter is JDK 1.4-only and we still officially support building and running on JDK 1.3. So getURI is essentially doing a file.toURI().toURL() anyway? If so, can we just switch getURLs() to call getURI() rather than getURL()? Or should we switch getURL() to call getURI after attempting to get the canonical file object (which is all it does apart from toURL(), whose results are broken as far as the RMI runtime is concerned)? If need be, I can keep either of these patches in my own distribution, but I always like to see a single, consistent fix for everyone. -- Jess Holle
Re: WebappClassLoader.getURLs Bug!
Shapira, Yoav wrote: Hi, Unfortunately, now that I've moved to Tomcat 5, I discover that the bug is still quite present. There is now a nice getURI() method along with the previous getURL() method. Unfortunately, getURLs() does not use getURI( file ).toURL() or any such as it would need to for the RMI runtime's sake (as it calls getURLs()). The getURI method returns a URL object, not a URI object, as the latter is JDK 1.4-only and we still officially support building and running on JDK 1.3. I agree: you really should be complaining about Sun (who wrote the bad URL handling in the first place). Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WebappClassLoader.getURLs Bug!
Hi, >Unfortunately, now that I've moved to Tomcat 5, I discover that the bug >is still quite present. There is now a nice getURI() method along with >the previous getURL() method. Unfortunately, getURLs() does not use >getURI( file ).toURL() or any such as it would need to for the RMI >runtime's sake (as it calls getURLs()). The getURI method returns a URL object, not a URI object, as the latter is JDK 1.4-only and we still officially support building and running on JDK 1.3. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WebappClassLoader.getURLs Bug!
In Tomcat 4.1.x, I discovered that RMI calls from Tomcat failed when the any of the full file paths of the web app jars contained a space (' ') character. At the time, I was told this would be fixed in Tomcat 5 and to work around it in Tomcat 4.1.x, which I did. Unfortunately, now that I've moved to Tomcat 5, I discover that the bug is still quite present. There is now a nice getURI() method along with the previous getURL() method. Unfortunately, getURLs() does not use getURI( file ).toURL() or any such as it would need to for the RMI runtime's sake (as it calls getURLs()). I can clearly patch WebappClassLoader.getURLs() to make such calls myself, but: 1. I'm left wondering about the broader implications of doing just this. * In Tomcat 4.1.x, I changed getURL() to do canonicalFile.toURI().toURL() under Java 1.4 and a hand coded equivalent in previous JVMs. * This works quite robustly in my experience, but I'm left wondering what the overall best, safest, and most performant fix is. 2. I don't want to keep having to maintain my own fix. An overall optimal fix should be integrated into Tomcat 5 so that this issue ceases to be an issue for everyone using Tomcat. -- Jess Holle