Tag Archives: java.lang.IllegalStateException: Invalid host: lb://msg_provider

[Solved] java.lang.IllegalStateException: Invalid host: lb://msg_provider

Problem: java.lang.illegalstateexception: invalid host: LB:// MSG_ provider

Follow up source code:

It is found that this step resolves to false, resulting in the following error

Resolved to false because the schemepattern does not have a matching URI

Our URI contains underscores, which are not included in the regular here, so it resolves to false

At the same time, uri.gethost is also empty

Solution: remove the underline