1 Reply Latest reply on Jan 25, 2009 1:38 PM by davestanley

    'camelContext' property isn't define when using addInterceptStrtegy method

    liave

      Hi,

       

      I use servicemix-fuse 3.3.1.3 with Camel 1.4.

      In my Camel Builder i try to add interceptor & it's causing me a NoSuchMethodError exception.

       

      My configure method is:

       

      public void configure() throws Exception {

            getContext().addInterceptStrategy(new MyFromEndpointInterceptor());      

       

            from("jbi:service:http://oxp/oXpInternalService")

                   .process(new OXpServicesAuthenticationProcessor());

      }

       

      This is the context i use (i println it)

      org.apache.camel.spring.SpringCamelContext

       

      My exception is at deploy time:

       

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel:beanPostProcessor': Cannot resolve reference to bean 'camel' while setting bean property 'camelContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ' camel': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.apache.camel.CamelContext.addInterceptStrategy(Lorg/apache/camel/spi/InterceptStrategy;)

       

      This is my camel-context (i validate that my processor package is accurate)

       

       

       

      Removing the addInterceptStrategy() method makes everything flow smoothly.

       

      Thanks in advance,

      Liav.

       

      Edited by: liave on Jan 20, 2009 10:59 AM