camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11214) FluentProducerTemplate - Should allow non default uri
Date Tue, 27 Jun 2017 08:53:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16064490#comment-16064490
] 

Claus Ibsen commented on CAMEL-11214:
-------------------------------------

Hi Moumita

How does it go with the github PR, do you have any luck with that?

> FluentProducerTemplate - Should allow non default uri
> -----------------------------------------------------
>
>                 Key: CAMEL-11214
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11214
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.19.0
>            Reporter: Claus Ibsen
>             Fix For: 2.20.0
>
>         Attachments: 0001-Fix-CAMEL-11214-FluentProducerTemplate-Should-allow-.patch
>
>
> You get
> Caused by: org.apache.camel.spring.GenericBeansException: Error post processing bean:
geoRestController; nested exception is java.lang.NullPointerException
> 	at org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:159)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
> 	... 21 more
> Caused by: java.lang.NullPointerException
> 	at java.util.Objects.requireNonNull(Objects.java:203)
> 	at java.util.Optional.<init>(Optional.java:96)
> 	at java.util.Optional.of(Optional.java:108)
> 	at org.apache.camel.builder.DefaultFluentProducerTemplate.setDefaultEndpoint(DefaultFluentProducerTemplate.java:103)
> 	at org.apache.camel.impl.CamelPostProcessorHelper.createInjectionFluentProducerTemplate(CamelPostProcessorHelper.java:333)
> 	at org.apache.camel.impl.CamelPostProcessorHelper.getInjectionValue(CamelPostProcessorHelper.java:224)
> 	at org.apache.camel.impl.DefaultCamelBeanPostProcessor.injectField(DefaultCamelBeanPostProcessor.java:200)
> 	at org.apache.camel.impl.DefaultCamelBeanPostProcessor.injectField(DefaultCamelBeanPostProcessor.java:194)
> 	at org.apache.camel.impl.DefaultCamelBeanPostProcessor$1.doWith(DefaultCamelBeanPostProcessor.java:181)
> 	at org.apache.camel.util.ReflectionHelper.doWithFields(ReflectionHelper.java:73)
> 	at org.apache.camel.impl.DefaultCamelBeanPostProcessor.injectFields(DefaultCamelBeanPostProcessor.java:167)
> 	at org.apache.camel.impl.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:82)
> 	at org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:153)
> 	... 24 more
> If you just have
>     @EndpointInject
>     private FluentProducerTemplate template;
> So you need to set some dummy uri
>     @EndpointInject(uri = "log:foo")
>     private FluentProducerTemplate template;



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message