When creating a JMS bridge on EAP7 that tries to connect to another EAP7 instance, get invalid URL scheme name "null" on server start-up.

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.1

Issue

The following WARN message gets thrown from a JBoss EAP 7.1 bridge that attempts to connect to a remote JBoss EAP 7.1 server instance.

WARN  [org.apache.activemq.artemis.jms.bridge] (ServerService Thread Pool -- 73) AMQ342010: Failed to connect JMS Bridge N/A: javax.naming.InvalidNameException: WFNAM00007: Invalid URL scheme name "null"
	at org.wildfly.naming.client.WildFlyRootContext.getProviderContext(WildFlyRootContext.java:808)
	at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:140)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at org.apache.activemq.artemis.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:46)
	at org.apache.activemq.artemis.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:32)
	at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1072)
	at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:398)
	at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService.startBridge(JMSBridgeService.java:114)
	at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:84)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	at org.jboss.threads.JBossThread.run(JBossThread.java:320)

Resolution

  • The problem is in the bridge configuration as the configuration missing the "module" element. The module element is needed for the bridge service if the bridge is connecting to a remote server instance. Please add the following module configuration to the JMS bridge to resolve this issue :

Syntax:

module="org.apache.activemq.artemis"

Example:

<jms-bridge name="myBridge" module="org.apache.activemq.artemis" quality-of-service="AT_MOST_ONCE" failure-retry-interval="1000" max-retries="-1" max-batch-size="10" max-batch-time="100" add-messageID-in-header="true">
....
....
</jms-bridge>

Related Solutions

Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.