classworlds
  1. classworlds
  2. CLASSWORLDS-21

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

          Jason van Zyl made changes -
          Field Original Value New Value
          Fix Version/s 1.0-beta-1 [ 11875 ]
          Trevor Pounds made changes -
          Link This issue is depended upon by MANTRUN-68 [ MANTRUN-68 ]
          Trevor Pounds made changes -
          Link This issue is depended upon by MANTRUN-68 [ MANTRUN-68 ]
          Trevor Pounds made changes -
          Link This issue relates to MANTRUN-68 [ MANTRUN-68 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-3607 [ MNG-3607 ]
          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.
          Peter Feltham made changes -
          Attachment CLASSWORLDS-21.diff [ 35813 ]
          Benjamin Bentmann made changes -
          Link This issue relates to PLX-220 [ PLX-220 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Julie Cowart
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

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