camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Pocock <dan...@pocock.pro>
Subject Re: @PropertyInject throws exception
Date Fri, 05 Dec 2014 12:48:03 GMT

I created JIRA issues for this too

https://issues.apache.org/jira/browse/CAMEL-8125
  - for the exception setting a field value

https://issues.apache.org/jira/browse/CAMEL-8126
  - for the setter method on RouteBuilder not setting the value




On 05/12/14 13:35, Daniel Pocock wrote:
> On 05/12/14 13:24, Claus Ibsen wrote:
>> Hi
>>
>> How are you guys running Camel? standalone, WAR in Tomcat, OSGi or
>> something else?
>>
>> And if you have a new stacktrace on Camel 2.14 or even 2.15-SNAPSHOT
>> then that is lovely as that's faster to find the code lines that has
>> the NPE
> Mine is standalone Camel/Spring on JDK 1.7
>
> My stack is below
>
>
>
> Exception in thread "main" org.apache.camel.RuntimeCamelException:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.example.RouteBuilder': Initialization of bean
> failed; nested exception is
> org.apache.camel.spring.GenericBeansException: Error post processing
> bean: org.example.RouteBuilder; nested exception is
> org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
>     at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1364)
>     at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:323)
>     at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
>     at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
>     at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)
>     at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
>     at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>     at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>     at
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:217)
>     at org.apache.camel.spring.Main.doStart(Main.java:157)
>     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
>     at org.apache.camel.main.MainSupport.run(MainSupport.java:149)
>     at org.apache.camel.main.MainSupport.run(MainSupport.java:353)
>     at org.apache.camel.spring.Main.main(Main.java:90)
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'org.example.RouteBuilder': Initialization
> of bean failed; nested exception is
> org.apache.camel.spring.GenericBeansException: Error post processing
> bean: org.example.RouteBuilder; nested exception is
> org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:336)
>     at
> org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:39)
>     at
> org.apache.camel.spring.PackageScanRouteBuilderFinder.instantiateBuilder(PackageScanRouteBuilderFinder.java:113)
>     at
> org.apache.camel.spring.PackageScanRouteBuilderFinder.appendBuilders(PackageScanRouteBuilderFinder.java:76)
>     at
> org.apache.camel.spring.CamelContextFactoryBean.findRouteBuildersByPackageScan(CamelContextFactoryBean.java:224)
>     at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.findRouteBuilders(AbstractCamelContextFactoryBean.java:847)
>     at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:329)
>     at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:321)
>     ... 12 more
> Caused by: org.apache.camel.spring.GenericBeansException: Error post
> processing bean: org.example.RouteBuilder; nested exception is
> org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
>     at
> org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:154)
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:396)
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1507)
>     at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
>     ... 21 more
> Caused by: org.apache.camel.RuntimeCamelException:
> java.lang.NullPointerException
>     at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1364)
>     at
> org.apache.camel.impl.CamelPostProcessorHelper.getInjectionPropertyValue(CamelPostProcessorHelper.java:253)
>     at
> org.apache.camel.impl.DefaultCamelBeanPostProcessor.injectFieldProperty(DefaultCamelBeanPostProcessor.java:206)
>     at
> org.apache.camel.impl.DefaultCamelBeanPostProcessor$1.doWith(DefaultCamelBeanPostProcessor.java:172)
>     at
> org.apache.camel.util.ReflectionHelper.doWithFields(ReflectionHelper.java:73)
>     at
> org.apache.camel.impl.DefaultCamelBeanPostProcessor.injectFields(DefaultCamelBeanPostProcessor.java:168)
>     at
> org.apache.camel.impl.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:82)
>     at
> org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:148)
>     ... 24 more
> Caused by: java.lang.NullPointerException
>     at java.lang.String.contains(String.java:2076)
>     at
> org.apache.camel.impl.CamelPostProcessorHelper.getInjectionPropertyValue(CamelPostProcessorHelper.java:232)
>     ... 30 more
> 12:38:25.268 [Thread-1] INFO 
> org.apache.camel.main.MainSupport$HangupInterceptor - Received hang up -
> stopping the main instance.
>


Mime
View raw message