camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendy Irawan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-8270) camel-rabbitmq: exchangeName in URI should be optional, i.e. default exchange/amq.direct
Date Fri, 23 Jan 2015 10:52:34 GMT
Hendy Irawan created CAMEL-8270:
-----------------------------------

             Summary: camel-rabbitmq: exchangeName in URI should be optional, i.e. default
exchange/amq.direct
                 Key: CAMEL-8270
                 URL: https://issues.apache.org/jira/browse/CAMEL-8270
             Project: Camel
          Issue Type: Bug
          Components: camel-rabbitmq
    Affects Versions: 2.14.1
            Reporter: Hendy Irawan
            Priority: Trivial


Leaving out the exchangeName i.e. {{rabbitmq://localhost/}} throws exception below.

However RabbitMQ supports the default exchange "" so it's not required to specify {{amq.direct}}
explicitly.

{code}
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'camelContext' defined in class path resource [id/ac/itb/lumen/persistence/LumenCamelConfiguration.class]:
Invocation of init method failed; nested exception is org.apache.camel.FailedToCreateRouteException:
Failed to create route route1 at: >>> To[rabbitmq://localhost/?connectionFactory=#amqpConnFactory]
<<< in route: Route(route1)[[From[rabbitmq://localhost/amq.topic?connectio... because
of Failed to resolve endpoint: rabbitmq://localhost/?connectionFactory=%23amqpConnFactory
due to: No URI path as the exchangeName for the RabbitMQEndpoint, the URI is rabbitmq://localhost/?connectionFactory=%23amqpConnFactory
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
	at org.springframework.boot.SpringApplication$run.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
	at id.ac.itb.lumen.persistence.LumenPersistenceApplication.main(LumenPersistenceApplication.groovy:38)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at:
>>> To[rabbitmq://localhost/?connectionFactory=#amqpConnFactory] <<< in
route: Route(route1)[[From[rabbitmq://localhost/amq.topic?connectio... because of Failed to
resolve endpoint: rabbitmq://localhost/?connectionFactory=%23amqpConnFactory due to: No URI
path as the exchangeName for the RabbitMQEndpoint, the URI is rabbitmq://localhost/?connectionFactory=%23amqpConnFactory
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:945)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:187)
	at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:805)
	at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2174)
	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1906)
	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735)
	at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
	at org.apache.camel.spring.SpringCamelContext.afterPropertiesSet(SpringCamelContext.java:106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
	... 23 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: rabbitmq://localhost/?connectionFactory=%23amqpConnFactory
due to: No URI path as the exchangeName for the RabbitMQEndpoint, the URI is rabbitmq://localhost/?connectionFactory=%23amqpConnFactory
	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:547)
	at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:72)
	at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:202)
	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
	at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
	at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
	at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500)
	at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:942)
	... 34 more
Caused by: java.lang.IllegalArgumentException: No URI path as the exchangeName for the RabbitMQEndpoint,
the URI is rabbitmq://localhost/?connectionFactory=%23amqpConnFactory
	at org.apache.camel.component.rabbitmq.RabbitMQComponent.createEndpoint(RabbitMQComponent.java:50)
	at org.apache.camel.component.rabbitmq.RabbitMQComponent.createEndpoint(RabbitMQComponent.java:31)
	at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:122)
	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:527)
	... 43 more
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message