Search
Calendar
June 2025
S M T W T F S
« May    
1234567
891011121314
15161718192021
22232425262728
2930  
Archives

Posts Tagged ‘ConfigurationException’

PostHeaderIcon javax.naming.ConfigurationException / java.net.MalformedURLException

Context

I have to send JMS messages on queues on clustered servers: t3://firstServer:1234 and t3://secondServer:5678.

The destination queues are retrieved in Spring, thanks to a property like:

<property name="providerURL" value="t3://firstServer:1234,t3://secondServer:5678"/>

Error:

I receive the following error:

javax.naming.ConfigurationException [Root exception is java.net.MalformedURLException: port expected: t3://firstServer:1234,t3://secondServer:5678]

Explanation and fix:

When you send messages on many queues, you must not repeat the protocol (here: t3://)! Fixing the issue is very simple: you have to remove the second t3:// in Spring property:

<property name="providerURL" value="t3://firstServer:1234,secondServer:5678"/>