2 Replies Latest reply on Oct 22, 2009 2:39 AM by Claus Ibsen

    Unable to instantiate URI "activemq:queue:test.queue"

    Ramakrishnan Somasundaram Newbie

      Environment:

        Mediation Router: 1.5.x

        JDK: 1.6.x

        Windows XP

       

      I am attempting to create a simple router from a JMS queue consumer to a file producer as follows.

       

      The instantiation of endpoint "activemq:queue:test.queue" fails with a message

      as shown below.

       

      Any help is greatly appreciated!

       

      Thanx,

       

      R

       

      ----


          public void afterPropertiesSet() throws Exception {                    ;

                sourceUri = "activemq:queue:test.queue";

                targetUri = "file://SilkSmitha.txt";

                spray();

           }

       

           public void destroy() throws Exception {

           }

            

           public void spray() {

                 ProducerTemplate pt = getContext().createProducerTemplate();

                  for (int i = 0; i < 10; i++) {

                   pt.sendBody(sourceUri, "Test Message " + i);

                  }

           }

      ----


          

        C:\> mvn clean install camel:run

        

                 ... 29 more

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creati

      ng bean with name 'rkRouter' defined in class path resource [META-INF/spring/bun

      dle-context.xml]: Invocation of init method failed; nested exception is org.apac

      he.camel.NoSuchEndpointException: No endpoint could be found for: activemq:queue

      :test.queue, please check your classpath contains the needed camel component jar

      .

              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

      Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

      Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

      Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)

              at java.security.AccessController.doPrivileged(Native Method)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

      Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)

       

      Edited by: rks on Oct 21, 2009 10:29 PM