EMS URL parse exception, Exception in thread "main" javax.jms.JMSRuntimeException: Invalid port number and "Invalid protocol specification".

EMS URL parse exception, Exception in thread "main" javax.jms.JMSRuntimeException: Invalid port number and "Invalid protocol specification".

book

Article ID: KB0094006

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Description:
When specifying a fault tolerant URL, if you type the following URL by mistake, "rcp:/wrongurl:7222,tcp://somerighturl:7222", the following will be reported; javax.jms.JMSRuntimeException: Invalid port number and "Invalid protocol specification".



Symptoms:
N/A

Cause:
The URL has ":/" instead of "://", causing a parse error. "://" is the token, so the port number could not be retrieved correctly. The client will not jump to the second part of the URL when there is a parsing error with the first part of the URL. The EMS client library will throw the JMSException with "Invalid port number" message. If correcting the mistake on the server URL as follows: "rcp://wrongurl:7222,tcp://somerighturl:7222", the application will get the JMSException with "Invalid protocol specification" message. as RCP is a not a protocol.




Issue/Introduction

EMS URL parse exception, Exception in thread "main" javax.jms.JMSRuntimeException: Invalid port number and "Invalid protocol specification".

Resolution

Correct both errors on the EMS server URL.

Additional Information

none