classworlds

Realms created by the Configurator have URLs with spaces in them

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 1.0-beta-1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

The configurator calls java.io.File.toURL() to convert the file references to URLs. This method doesn't convert spaces and other illegal characters properly so a malformed url is generated if these characters are in the path for this file. This is known problem in java and file.toURI().toURL() is the suggested workaround.

This caused a problem for me because rmi treats UrlClassLoaders specially and turns the URLs into a space separated list for the codebase to load classes from but since the urls have spaces in them already it caused rmi to fail.

The easy work around is to not have spaces (or any other illegal character) on you file path but using the java recomended workaround would be better.

Issue Links

Activity

Hide
Peter Feltham added a comment -

I was also affected by this bug and am currently using a locally patched version of the Classworlds HEAD which I've labelled 1.2-SNAPSHOT. I've attached a patch that uses the toURI().toURL() pattern which resolved the issue for me.

Show
Peter Feltham added a comment - I was also affected by this bug and am currently using a locally patched version of the Classworlds HEAD which I've labelled 1.2-SNAPSHOT. I've attached a patch that uses the toURI().toURL() pattern which resolved the issue for me.

People

Vote (2)
Watch (4)

Dates

  • Created:
    Updated:

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
1h
Remaining Estimate - 1 hour
Logged:
Not Specified
Time Spent - Not Specified