From ese at acefael.es Sat Jun 9 03:44:05 2018 From: ese at acefael.es (acefael) Date: Sat, 9 Jun 2018 09:44:05 +0200 Subject: [jboss-user] JMS Bridge - JBoss 7.2 (HornetQ 2.3.0.RC1) + Artemis 2.4.0 Message-ID: <20180609074405.z6pvqyzg22ecffko@dev.amigos> hi I am trying to setup a JMS Bridge between JBoss 7.2 and Artemis 2.4. There is an error instantiating org.apache.activemq.artemis.jndi.ActiveMQInitialConnectionFactory, but there is not much detail. Probably I am doing something wrong. Does anyone know how to get more error detail out of JBoss ? This bridge uses a module I built myself from artemis jars. When I add the jetty-all jar from Artemis to the module, the error changes. Then it seems to try to use the InitialContext from Jetty, because jetty-jndi has JNDI 'stuff' in it as well. I am guessing I should make my module use 'JBoss Naming', but how? thanks 22:17:12 WARN (ServerService Thread Pool -- 50) org.hornetq.jms.server HQ122012: Failed to connect JMS Bridge: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.apache.activemq.artemis.jndi.ActiveMQInitialConnectionFactory from classloader ModuleClassLoader for Module "org.activemq.artemis:main" from local module loader @74960bfa (finder: local module finder @42721fe (roots: C:\me\p\jboss-as-7.2.0.Final\modules,C:\me\p\jboss-as-7.2.0.Final\modules\system\layers\base)) at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64) [jboss-as-naming-7.2.0.Final.jar:7.2.0.Final] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.8.0_162] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) [rt.jar:1.8.0_162] at javax.naming.InitialContext.init(InitialContext.java:244) [rt.jar:1.8.0_162] at javax.naming.InitialContext.(InitialContext.java:216) [rt.jar:1.8.0_162] at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:55) [hornetq-jms-server-2.3.0.CR1.jar:] at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:40) [hornetq-jms-server-2.3.0.CR1.jar:] at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1144) [hornetq-jms-server-2.3.0.CR1.jar:] at org.hornetq.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:353) [hornetq-jms-server-2.3.0.CR1.jar:] at org.jboss.as.messaging.jms.bridge.JMSBridgeService.startBridge(JMSBridgeService.java:99) [jboss-as-messaging-7.2.0.Final.jar:7.2.0.Final] at org.jboss.as.messaging.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:78) [jboss-as-messaging-7.2.0.Final.jar:7.2.0.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_162] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_162] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_162] at org.jboss.threads.JBossThread.run(JBossThread.java:122) From ese at acefael.es Sat Jun 9 16:38:04 2018 From: ese at acefael.es (acefael) Date: Sat, 9 Jun 2018 22:38:04 +0200 Subject: [jboss-user] JMS Bridge - JBoss 7.2 (HornetQ 2.3.0.RC1) + Artemis 2.4.0 In-Reply-To: <20180609074405.z6pvqyzg22ecffko@dev.amigos> References: <20180609074405.z6pvqyzg22ecffko@dev.amigos> Message-ID: <20180609203803.wnbihnh2rd4jynr6@dev.amigos> hi It's working now. I had the InitialContext factory class name wrong. since the internet does not seem to be helpful with complete examples on subjects like this, I would like to give one here. Forwarding from JBoss 7.2 to Artemis 2.4.0 via JMS Bridge: - Setup JBoss Messaging as they say in the manual. The manual is actually rather good here, so who am I to deprive you of the pleasure. - Setup Artemis. As before, the manual is extensive on the matter. - Make an Artemis module for JBoss. The module.xml file looks like that: The file goes as module.xml in jboss/modules/org/activemq/artemis/main. There you also copy artemis-jms-client-all...jar. There may be more JBoss module dependencies than actually needed, but I could not find documentation on which modules are there and what they provide. - configure the JMS Bridge in standalone.xml: ... your config here username password AT_MOST_ONCE 500 1 500 500 true The Parameters of the ActiveMQInitialContextFactory are well described in the Artemis docs. There may be a little redundancy with the repeatet tcp:// thingy. And this is it. Thanks acefael On Sat, Jun 09, 2018 at 09:44:05AM +0200, acefael wrote: > hi > > I am trying to setup a JMS Bridge between JBoss 7.2 and Artemis 2.4. There is an error instantiating org.apache.activemq.artemis.jndi.ActiveMQInitialConnectionFactory, but there is not much detail. Probably I am doing something wrong. Does anyone know how to get more error detail out of JBoss ? > > This bridge uses a module I built myself from artemis jars. When I add the jetty-all jar from Artemis to the module, the error changes. Then it seems to try to use the InitialContext from Jetty, because jetty-jndi has JNDI 'stuff' in it as well. I am guessing I should make my module use 'JBoss Naming', but how? > > thanks > > 22:17:12 WARN (ServerService Thread Pool -- 50) org.hornetq.jms.server HQ122012: Failed to connect JMS Bridge: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.apache.activemq.artemis.jndi.ActiveMQInitialConnectionFactory from classloader ModuleClassLoader for Module "org.activemq.artemis:main" from local module loader @74960bfa (finder: local module finder @42721fe (roots: C:\me\p\jboss-as-7.2.0.Final\modules,C:\me\p\jboss-as-7.2.0.Final\modules\system\layers\base)) > at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64) [jboss-as-naming-7.2.0.Final.jar:7.2.0.Final] > at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.8.0_162] > at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) [rt.jar:1.8.0_162] > at javax.naming.InitialContext.init(InitialContext.java:244) [rt.jar:1.8.0_162] > at javax.naming.InitialContext.(InitialContext.java:216) [rt.jar:1.8.0_162] > at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:55) [hornetq-jms-server-2.3.0.CR1.jar:] > at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:40) [hornetq-jms-server-2.3.0.CR1.jar:] > at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1144) [hornetq-jms-server-2.3.0.CR1.jar:] > at org.hornetq.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:353) [hornetq-jms-server-2.3.0.CR1.jar:] > at org.jboss.as.messaging.jms.bridge.JMSBridgeService.startBridge(JMSBridgeService.java:99) [jboss-as-messaging-7.2.0.Final.jar:7.2.0.Final] > at org.jboss.as.messaging.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:78) [jboss-as-messaging-7.2.0.Final.jar:7.2.0.Final] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_162] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_162] > at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_162] > at org.jboss.threads.JBossThread.run(JBossThread.java:122) > _______________________________________________ > jboss-user mailing list > jboss-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/jboss-user