7 Replies Latest reply on Apr 21, 2011 11:29 PM by Willem Jiang

    spring.CamelBeanPostProcessor - NPE

    Michal Cabak Newbie

      Hello,

       

      I use camel-spring-2.3.0-fuse-01-00.jar. I have defined camel context in spring:

          

       

      When I start the context I get NPE:

      Caused by: java.lang.NullPointerException

                      at org.apache.camel.spring.CamelBeanPostProcessor.injectFields(CamelBeanPostProcessor.java:229)

                      at org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:97)

       

      When I remove above bean then NPE is gone. Here is the code in Camel:

          protected void injectFields(final Object bean, final String beanName) {

              ReflectionUtils.doWithFields(bean.getClass(), new ReflectionUtils.FieldCallback() {

       

      I suppose that bean argument for factories is always NULL, isn't?. So that means it is a bug inside camel. Please advise.

       

      Thanks,

      Michal