2 Replies Latest reply on Oct 19, 2015 9:28 AM by Justin Bertram

    Jboss hornetq remote access  javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://127.0.0.1:4447] at

    Chandra D Newbie

      Hi All ,

      I am new to JMS. I am using jboss eap hornet and its running separately (only use for messaging).

      I have a standalone java application (spring based) which works as a JMS client (producer and consumer). . I want to access this jboss hornetq remotely(currently both server and java app on same machine) and PFA my configuration standalone.xml ,jms-config.xml(spring config).

      On java side while creating context

      ApplicationContext context = new ClassPathXmlApplicationContext("jms-config.xml ");

       

      I am getting below exception Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'destination' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://127.0.0.1:4447] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83) at com.amgreetings.brio.order.OrderTrigger.main(OrderTrigger.java:28) Caused by: javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://127.0.0.1:4447] at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:213)

      Could you please look into this, what I am missing? Also my next step will be , I am going to use this java application as jar for my web  application (separate jboss server )so will this configuration work there?