#157 trailing spaces in JMX URL not handled correctly

v1.0
open
nobody
5
2008-07-18
2008-07-18
Mikel Ward
No

Hi

I copied and pasted a URL like service:jmx:rmi:///jndi/rmi://host.example.com:port/jmxrmi and somehow it got a trailing space in it.

After clicking on the Find More Objects button, I got an error message

Connection to the application failed Please check the following:
1. Application is running.
2. Application is correctly configured in jManage. Click here to edit configuration.

Firstly, a network trace shows this error message was being returned to the client:
Not bound: "jmxrmi " (only bound name is "jmxrmi")

That should have been displayed to the user somehow.

Secondly, since a space is not valid in a URL, you might consider either re-encoding it as %20 (in conjunction with properly handling the error if that URL is invalid), or trimming trailing spaces from the URL as entered via the jManage web interface.

Discussion