8 Replies Latest reply on Feb 4, 2009 11:20 PM by njiang

    NoSuchMethodError when invoking getContext().addInterceptStrategy()

    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 4:23 PM

       

      Edited by: liave on Jan 20, 2009 4:24 PM

       

      Edited by: liave on Jan 20, 2009 4:25 PM

       

      Edited by: liave on Jan 20, 2009 4:25 PM