Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 71245 invoked from network); 24 Jan 2009 11:37:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2009 11:37:47 -0000 Received: (qmail 91395 invoked by uid 500); 24 Jan 2009 11:37:47 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 91250 invoked by uid 500); 24 Jan 2009 11:37:46 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 91239 invoked by uid 99); 24 Jan 2009 11:37:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jan 2009 03:37:46 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.198.240 as permitted sender) Received: from [209.85.198.240] (HELO rv-out-0708.google.com) (209.85.198.240) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jan 2009 11:37:35 +0000 Received: by rv-out-0708.google.com with SMTP id c5so5628160rvf.56 for ; Sat, 24 Jan 2009 03:37:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=ML0n5r4Yc3DW2nUjORt3XfKBChxL4Fbgd9BYGkCry5A=; b=dzV2SbVMgZ822N37bqZOvtOc5mOLvrTB7JPSVezr01Zhp/55hEka99TnMkk42jsmUX 7VPReCJUADAkQUyy+RZx6ToN+DG4W93v4baa/DBvN7VfVmSNcGEQIwWInnT3HqeCq7Ku h4UEjrDUSP54J2nqmXGsVMBXBwlT0je7z2GAo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=F3IrEvjoJPeNssU3dHxR4uBWjaoNSTcLbxQSY3X0a46WS887KYwXcmOp/qeOkN6Sqr /rLm8k/5iR9jgP+VGOKhhZN5SLttyggtN4xBG7oMWDmOdt9K7AxchDlBvWy6wV0zImhv +htrjnBLlIYTh6ocGb5aprPZmwSTjKhGx3a2E= Received: by 10.141.19.16 with SMTP id w16mr1064883rvi.1.1232797033236; Sat, 24 Jan 2009 03:37:13 -0800 (PST) Received: from ?192.168.0.131? ([222.131.244.83]) by mx.google.com with ESMTPS id k37sm6141351rvb.1.2009.01.24.03.37.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 Jan 2009 03:37:12 -0800 (PST) Message-ID: <497AFD5F.6080204@gmail.com> Date: Sat, 24 Jan 2009 19:37:03 +0800 From: Willem Jiang User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: users@camel.apache.org CC: camel-user@activemq.apache.org Subject: Re: Why getContext().addInterceptStrategy is throwing an exception? References: <21551665.post@talk.nabble.com> <21561853.post@talk.nabble.com> <21565641.post@talk.nabble.com> <21577945.post@talk.nabble.com> <21578333.post@talk.nabble.com> <21610967.post@talk.nabble.com> <21639522.post@talk.nabble.com> In-Reply-To: <21639522.post@talk.nabble.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi , Can you run the test in Eclipse or you got the exception in both in eclipse and in ServiceMix ? I think you need remove servicemix-camel-3.3.1.3-fuse-installer.zip Since the service-camel's class loader will hold the camel-core and camel-spring jars, and your SU will inherit the service-camel's class loader. Willem Liav Ezer wrote: > Hi Ashwin, > > Thanks for your reply. > > This seems to be persistent - I get the same error. > > Regarding the camel-fuse jar's version - i changed it (look below the > pom.xml) > I also verfied that the .classpath point to it & that it exists in the > repository. > > Regarding the servicemix-camel-3.3.1.5-fuse-installer.zip - there is a > different version in the hot deploy dir' -> > servicemix-camel-3.3.1.3-fuse-installer.zip . Does it matter? > > One more thing -> do i need to change the .classpath entry of the > servicemix-camel jar? > Currently it's set to: servicemix-camel-3.3.1.5-fuse.jar > > Here are my files again: > > pom.xml: > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > 4.0.0 > > com.liav.esb > oxpRouterBuilder > 1.1 > > com.liav.esb.poc > oxpRouterBuilder-camel-su > jbi-service-unit > 1.1 > ServiceMix :: Camel :: OxpRouterBuilder :: SU > > > org.apache.servicemix > servicemix-camel > ${servicemix-version} > provided > > > org.apache.servicemix > servicemix-core > ${servicemix-version} > provided > > > org.apache.camel > camel-core > 1.4.4.0-fuse > test-jar > test > > > org.apache.camel > camel-core > 1.4.4.0-fuse > > > > install > > > org.apache.maven.plugins > maven-compiler-plugin > > 1.5 > 1.5 > > > > > org.apache.servicemix.tooling > jbi-maven-plugin > true > > > > > servicemix-camel > 3.3.1.5-fuse > > > > camel-context.xml > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > http://activemq.apache.org/camel/schema/spring > http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> > xmlns="http://activemq.apache.org/camel/schema/spring"> > > com.liav.oxp.esb.poc > > > > RouterBuilder.java > package com.liav.oxp.esb.poc; > import org.apache.camel.builder.RouteBuilder; > public class OxpRouteBuilder extends RouteBuilder { > public void configure() throws Exception { > getContext().start(); > getContext().addInterceptStrategy(new MyFromEndpointInterceptor()); > > from("jbi:service:http://oxp/oXpInternalService") > .process(new OXpServicesAuthenticationProcessor()); > } > } > > .classpath file: > > > > > path="src/main/resources"/> > > path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/> > path="M2_REPO/org/apache/activemq/activeio-core/3.1.0.0-fuse/activeio-core-3.1.0.0-fuse.jar"/> > path="M2_REPO/org/apache/activemq/activemq-core/5.0.0.18-fuse/activemq-core-5.0.0.18-fuse.jar"/> > path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/> > path="M2_REPO/org/apache/axis/axis-ant/1.4/axis-ant-1.4.jar"/> > path="M2_REPO/bouncycastle/bcprov-jdk14/136/bcprov-jdk14-136.jar"/> > path="M2_REPO/bouncycastle/bcprov-jdk15/132/bcprov-jdk15-132.jar"/> > path="M2_REPO/org/apache/camel/camel-spring/1.4.1.0-fuse/camel-spring-1.4.1.0-fuse.jar"/> > path="M2_REPO/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar"/> > path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> > path="M2_REPO/commons-dbcp/commons-dbcp/1.2/commons-dbcp-1.2.jar"/> > path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> > path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar"/> > path="M2_REPO/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/> > path="M2_REPO/commons-pool/commons-pool/1.2/commons-pool-1.2.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-activation_1.0.2_spec-1.2.jar"/> > path="M2_REPO/org/apache/geronimo/components/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/> > path="M2_REPO/org/apache/geronimo/modules/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1/geronimo-j2ee-connector_1.5_spec-1.1.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-jacc_1.0_spec/1.1/geronimo-j2ee-jacc_1.0_spec-1.1.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.1/geronimo-j2ee-management_1.0_spec-1.1.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1/geronimo-jms_1.1_spec-1.1.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.1/geronimo-jta_1.0.1B_spec-1.1.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar"/> > path="M2_REPO/org/apache/geronimo/specs/geronimo-qname_1.1_spec/1.1/geronimo-qname_1.1_spec-1.1.jar"/> > path="M2_REPO/org/apache/geronimo/components/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/> > path="M2_REPO/org/apache/geronimo/modules/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/> > path="M2_REPO/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.jar"/> > path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/> > path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar"/> > path="M2_REPO/jaxen/jaxen/1.1-beta-9/jaxen-1.1-beta-9.jar"/> > path="M2_REPO/org/jencks/jencks/2.1/jencks-2.1.jar"/> > path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> > path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/> > > path="M2_REPO/mx4j/mx4j-remote/3.0.1/mx4j-remote-3.0.1.jar"/> > path="M2_REPO/opensaml/opensaml/1.1/opensaml-1.1.jar"/> > path="M2_REPO/org/opensaml/opensaml/1.1/opensaml-1.1.jar"/> > path="M2_REPO/regexp/regexp/1.3/regexp-1.3.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-camel/3.3.1.5-fuse/servicemix-camel-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-common/3.3.1.5-fuse/servicemix-common-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-core/3.3.1.5-fuse/servicemix-core-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-jbi/3.3.1.5-fuse/servicemix-jbi-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-services/3.3.1.5-fuse/servicemix-services-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-shared/3.3.1.5-fuse/servicemix-shared-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-soap/3.3.1.5-fuse/servicemix-soap-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/apache/servicemix/servicemix-soap2/3.3.1.5-fuse/servicemix-soap2-3.3.1.5-fuse.jar"/> > path="M2_REPO/org/springframework/spring-aop/2.5.5/spring-aop-2.5.5.jar"/> > path="M2_REPO/org/springframework/spring-beans/2.0.6/spring-beans-2.0.6.jar"/> > path="M2_REPO/org/springframework/spring-context/2.0.6/spring-context-2.0.6.jar"/> > path="M2_REPO/org/springframework/spring-core/2.5.5/spring-core-2.5.5.jar"/> > path="M2_REPO/org/springframework/spring-dao/2.0.6/spring-dao-2.0.6.jar"/> > path="M2_REPO/org/springframework/spring-jms/2.0.6/spring-jms-2.0.6.jar"/> > path="M2_REPO/org/springframework/spring-jmx/2.0.6/spring-jmx-2.0.6.jar"/> > path="M2_REPO/org/springframework/spring-remoting/2.0.6/spring-remoting-2.0.6.jar"/> > path="M2_REPO/org/springframework/spring-support/2.0.6/spring-support-2.0.6.jar"/> > path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/> > path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/> > path="M2_REPO/org/apache/woden/woden/1.0.0M6/woden-1.0.0M6.jar"/> > path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/> > path="M2_REPO/org/apache/ws/security/wss4j/1.5.4/wss4j-1.5.4.jar"/> > path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.2/wstx-asl-3.2.2.jar"/> > path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/> > path="M2_REPO/org/apache/xbean/xbean-classloader/3.1.0.2-fuse/xbean-classloader-3.1.0.2-fuse.jar"/> > path="M2_REPO/org/apache/xbean/xbean-kernel/3.1.0.2-fuse/xbean-kernel-3.1.0.2-fuse.jar"/> > path="M2_REPO/org/apache/xbean/xbean-server/3.1.0.2-fuse/xbean-server-3.1.0.2-fuse.jar"/> > path="M2_REPO/org/apache/xbean/xbean-spring/3.1.0.2-fuse/xbean-spring-3.1.0.2-fuse.jar"/> > path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar"/> > path="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"/> > path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.3.2/XmlSchema-1.3.2.jar"/> > path="M2_REPO/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.jar"/> > path="M2_REPO/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.jar"/> > path="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar"/> > path="M2_REPO/com/thoughtworks/xstream/xstream/1.3/xstream-1.3.jar"/> > path="M2_REPO/org/apache/camel/camel-core/1.4.4.0-fuse/camel-core-1.4.4.0-fuse.jar"/> > path="M2_REPO/org/apache/camel/camel-core/1.4.4.0-fuse/camel-core-1.4.4.0-fuse-tests.jar"/> > > > > Exception Thrown: > > 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;) > > Thanks again. > Liav. > > > Ashwin Karpe wrote: >> Hi Liav, >> >> Hmm. I cannot see anything wrong in the classpath. The POM dependencies >> should really be set as 1.4.1.0-fuse instead of 1.4.0 but the classpath >> entries seem to suggest that they are by having entries for camel-core jar >> version set for 1.4.1.0-fuse anyway. >> >> I verified that in Camel version 1.4.4.0-fuse the addInterceptStrategy >> method is present in the Camel-core and in the interface >> org.apache.camel.CamelContext.java. >> >> I wonder whether this was available in 1.4.1.0-fuse...? To prevent the >> outside chance that this is not the case, could you try changing the >> in the POM to 1.4.4.0-fuse and check if this error happens. Also >> have you checked your repository to check that the camel-core jar for that >> version actually exists....? >> >> Also, just so we have not missed anything, does >> servicemix-camel-3.3.1.5-fuse-installer.zip exist in the hotdeploy >> directory of SMX 3.3.1.3. >> >> This is rather wierd since the problem should not be this hard to >> resolve... :( >> >> Cheers, >> >> Ashwin... >> >> >> Liav Ezer wrote: >>> Hi Ashwin, >>> >>> Well i added the start as follows: >>> >>> public void configure() throws Exception { >>> getContext().start(); >>> >>> getContext().addInterceptStrategy(new MyFromEndpointInterceptor()); >>> from("jbi:service:http://oxp/oXpInternalService") >>> .process(new OXpServicesAuthenticationProcessor()); >>> } >>> >>> & i validated that i added the camel-core jar (1.4.0-fuse) to my >>> classpath. >>> >>> Here is the dependency section in the pom.xml: >>> >>> >>> >>> org.apache.servicemix >>> servicemix-camel >>> ${servicemix-version} >>> provided >>> >>> >>> org.apache.servicemix >>> servicemix-core >>> ${servicemix-version} >>> provided >>> >>> >>> org.apache.camel >>> camel-spring >>> 1.4.0 >>> >>> >>> org.apache.camel >>> camel-core >>> 1.4.0 >>> test-jar >>> test >>> >>> >>> org.apache.camel >>> camel-core >>> 1.4.0 >>> >>> >>> >>> & still i get the same exception. I googled it & found something related: >>> maybe you can check: >>> https://issues.apache.org/activemq/browse/SM-1327 >>> >>> Here is my classpath - Maybe you can spot somehing: >>> >>> >>> >>> >> excluding="**/*.java"/> >>> >>> >> path="org.eclipse.jdt.launching.JRE_CONTAINER"/> >>> >> path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/> >>> >> path="M2_REPO/org/apache/activemq/activeio-core/3.1.0.0-fuse/activeio-core-3.1.0.0-fuse.jar"/> >>> >> path="M2_REPO/org/apache/activemq/activemq-core/5.0.0.18-fuse/activemq-core-5.0.0.18-fuse.jar"/> >>> >> path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/> >>> >> path="M2_REPO/org/apache/axis/axis-ant/1.4/axis-ant-1.4.jar"/> >>> >> path="M2_REPO/bouncycastle/bcprov-jdk14/136/bcprov-jdk14-136.jar"/> >>> >> path="M2_REPO/bouncycastle/bcprov-jdk15/132/bcprov-jdk15-132.jar"/> >>> >> path="M2_REPO/org/apache/camel/camel-core/1.4.1.0-fuse/camel-core-1.4.1.0-fuse.jar"/> >>> >> path="M2_REPO/org/apache/camel/camel-spring/1.4.1.0-fuse/camel-spring-1.4.1.0-fuse.jar"/> >>> >> path="M2_REPO/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar"/> >>> >> path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/> >>> >> path="M2_REPO/commons-dbcp/commons-dbcp/1.2/commons-dbcp-1.2.jar"/> >>> >> path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/> >>> >> path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar"/> >>> >> path="M2_REPO/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/> >>> >> path="M2_REPO/commons-pool/commons-pool/1.2/commons-pool-1.2.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-activation_1.0.2_spec-1.2.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/components/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/modules/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1/geronimo-j2ee-connector_1.5_spec-1.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-jacc_1.0_spec/1.1/geronimo-j2ee-jacc_1.0_spec-1.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.1/geronimo-j2ee-management_1.0_spec-1.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1/geronimo-jms_1.1_spec-1.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.1/geronimo-jta_1.0.1B_spec-1.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/specs/geronimo-qname_1.1_spec/1.1/geronimo-qname_1.1_spec-1.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/components/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/> >>> >> path="M2_REPO/org/apache/geronimo/modules/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/> >>> >> path="M2_REPO/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.jar"/> >>> >> path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/> >>> >> path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar"/> >>> >> path="M2_REPO/jaxen/jaxen/1.1-beta-9/jaxen-1.1-beta-9.jar"/> >>> >> path="M2_REPO/org/jencks/jencks/2.1/jencks-2.1.jar"/> >>> >> path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> >>> >> path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/> >>> >> path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/> >>> >> path="M2_REPO/mx4j/mx4j-remote/3.0.1/mx4j-remote-3.0.1.jar"/> >>> >> path="M2_REPO/opensaml/opensaml/1.1/opensaml-1.1.jar"/> >>> >> path="M2_REPO/org/opensaml/opensaml/1.1/opensaml-1.1.jar"/> >>> >> path="M2_REPO/regexp/regexp/1.3/regexp-1.3.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-camel/3.3.1.5-fuse/servicemix-camel-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-common/3.3.1.5-fuse/servicemix-common-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-core/3.3.1.5-fuse/servicemix-core-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-jbi/3.3.1.5-fuse/servicemix-jbi-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-services/3.3.1.5-fuse/servicemix-services-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-shared/3.3.1.5-fuse/servicemix-shared-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-soap/3.3.1.5-fuse/servicemix-soap-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/apache/servicemix/servicemix-soap2/3.3.1.5-fuse/servicemix-soap2-3.3.1.5-fuse.jar"/> >>> >> path="M2_REPO/org/springframework/spring-aop/2.5.5/spring-aop-2.5.5.jar"/> >>> >> path="M2_REPO/org/springframework/spring-beans/2.0.6/spring-beans-2.0.6.jar"/> >>> >> path="M2_REPO/org/springframework/spring-context/2.0.6/spring-context-2.0.6.jar"/> >>> >> path="M2_REPO/org/springframework/spring-core/2.5.5/spring-core-2.5.5.jar"/> >>> >> path="M2_REPO/org/springframework/spring-dao/2.0.6/spring-dao-2.0.6.jar"/> >>> >> path="M2_REPO/org/springframework/spring-jms/2.0.6/spring-jms-2.0.6.jar"/> >>> >> path="M2_REPO/org/springframework/spring-jmx/2.0.6/spring-jmx-2.0.6.jar"/> >>> >> path="M2_REPO/org/springframework/spring-remoting/2.0.6/spring-remoting-2.0.6.jar"/> >>> >> path="M2_REPO/org/springframework/spring-support/2.0.6/spring-support-2.0.6.jar"/> >>> >> path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/> >>> >> path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/> >>> >> path="M2_REPO/org/apache/woden/woden/1.0.0M6/woden-1.0.0M6.jar"/> >>> >> path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/> >>> >> path="M2_REPO/org/apache/ws/security/wss4j/1.5.4/wss4j-1.5.4.jar"/> >>> >> path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.2/wstx-asl-3.2.2.jar"/> >>> >> path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/> >>> >> path="M2_REPO/org/apache/xbean/xbean-classloader/3.1.0.2-fuse/xbean-classloader-3.1.0.2-fuse.jar"/> >>> >> path="M2_REPO/org/apache/xbean/xbean-kernel/3.1.0.2-fuse/xbean-kernel-3.1.0.2-fuse.jar"/> >>> >> path="M2_REPO/org/apache/xbean/xbean-server/3.1.0.2-fuse/xbean-server-3.1.0.2-fuse.jar"/> >>> >> path="M2_REPO/org/apache/xbean/xbean-spring/3.1.0.2-fuse/xbean-spring-3.1.0.2-fuse.jar"/> >>> >> path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar"/> >>> >> path="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"/> >>> >> path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.3.2/XmlSchema-1.3.2.jar"/> >>> >> path="M2_REPO/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.jar"/> >>> >> path="M2_REPO/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.jar"/> >>> >> path="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar"/> >>> >> path="M2_REPO/com/thoughtworks/xstream/xstream/1.3/xstream-1.3.jar"/> >>> >>> >>> Thanks in advance: >>> >>> >>> Ashwin Karpe wrote: >>>> Hi Liav, >>>> >>>> Have you add the code in the configure() method. The reason for this >>>> issue can be one of two things >>>> - The Camel listener has not been setup. This means the code is >>>> called before context.start() >>>> - The dependencies cannot be resolved (i.e the jar containing >>>> org/apache/camel/spi/InterceptStrategy) is not on your build path. >>>> >>>> FUSE 3.3 has the same codebase as Servicemix and if you maven build the >>>> camel-core and link it in your POM, it should work. >>>> >>>> Cheers, >>>> >>>> Ashwin... >>>> >>>> Liav Ezer wrote: >>>>> Hi Ashwin, >>>>> >>>>> My processor works great - if i remove the >>>>> getContext().addInterceptStrategy(new MyFromEndpointInterceptor()); >>>>> line everything is smooth. >>>>> >>>>> Can you think of a reason why i get this exception? >>>>> >>>>> framework.beans.factory.BeanCreationException: Error creating bean with >>>>> name 'camelContext': Invocation of init method failed; >>>>> apache.camel.CamelContext.addInterceptStrategy(Lorg/apache/camel/spi/InterceptStrategy;) >>>>> >>>>> Every other Camel component (such as processor or producerTemplate) was >>>>> fine untill i added the addInterceptStrategy API. >>>>> (By the way, getContext() alone isn't crushing..) >>>>> >>>>> Maybe it's related to the fact i use esb-fuse-3.3.1.3 & not pure >>>>> servicemix? (in regards to camel-core jar?!) >>>>> >>>>> This is my camel-context file: >>>>> >>>>> >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>> xsi:schemaLocation="http://www.springframework.org/schema/beans >>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd >>>>> http://activemq.apache.org/camel/schema/spring >>>>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> >>>>> >>>> xmlns="http://activemq.apache.org/camel/schema/spring"> >>>>> com.liav.oxp.esb.poc >>>>> >>>>> >>>>> >>>>> Thanks. >>>>> >>>>> Ashwin Karpe wrote: >>>>>> Hi Liav, >>>>>> >>>>>> Have you checked the packages in the camel context block of the >>>>>> camel-context.xml in the resources directory to see if the Camel >>>>>> processor have been correctly defined. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Ashwin... >>>>>> >>>>>> >>>>>> Liav Ezer wrote: >>>>>>> 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 an >>>>>>> NoSuchMethodError. >>>>>>> >>>>>>> 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;) >>>>>>> >>>>>>> Thanks in advance, >>>>>>> Liav. >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >