Hi ! I'm using Camel 2.12.1 and I have an issue using the @PropertyInject annotation like this:
private @PropertyInject(value = "node") String node I'm trying to do the annotation in one of my beans which are registered in the context.xml like this: <bean id="myBean" class="com.mycamel.MyBean"> </bean> And I have a properties bean pointing to my properties file <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent"> <property name="location" value="file:${user.home}/mybean.properties"/> </bean> When I try to get the value "node" from the PropertiesComponent using the annotation I get the following error: Caused by: org.apache.camel.spring.GenericBeansException: Error post processing bean: cassandra; 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:1475) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) ... 56 more Caused by: org.apache.camel.RuntimeCamelException: java.lang.NullPointerException at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1344) at org.apache.camel.impl.CamelPostProcessorHelper.getInjectionPropertyValue(CamelPostProcessorHelper.java:250) at org.apache.camel.impl.DefaultCamelBeanPostProcessor.injectFieldProperty(DefaultCamelBeanPostProcessor.java:195) at org.apache.camel.impl.DefaultCamelBeanPostProcessor$1.doWith(DefaultCamelBeanPostProcessor.java:171) 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:81) at org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:148) ... 59 more Caused by: java.lang.NullPointerException at java.lang.String.contains(String.java:2076) at org.apache.camel.impl.CamelPostProcessorHelper.getInjectionPropertyValue(CamelPostProcessorHelper.java:229) ... 65 more anyone can help me on that issue ? -- View this message in context: http://camel.465427.n5.nabble.com/PropertyInject-throws-exception-tp5758503.html Sent from the Camel - Users mailing list archive at Nabble.com.