camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Why getContext().addInterceptStrategy is throwing an exception?
Date Sat, 24 Jan 2009 11:37:03 GMT
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:
> <?xml version="1.0" encoding="UTF-8"?>
> 	<!--
>      Represent the oxpRouterBuilder camel SU
> -->
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> 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">
> 	<modelVersion>4.0.0</modelVersion>
> 	<parent>
> 		<groupId>com.liav.esb</groupId>
> 		<artifactId>oxpRouterBuilder</artifactId>
> 		 <version>1.1</version>
> 	</parent>
> 	<groupId>com.liav.esb.poc</groupId>
> 	<artifactId>oxpRouterBuilder-camel-su</artifactId>
> 	<packaging>jbi-service-unit</packaging>
>     <version>1.1</version>
> 	<name>ServiceMix :: Camel :: OxpRouterBuilder :: SU</name>
>   <dependencies>
> 		<dependency>
> 			<groupId>org.apache.servicemix</groupId>
> 			<artifactId>servicemix-camel</artifactId>
> 			<version>${servicemix-version}</version>
> 			<scope>provided</scope>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.servicemix</groupId>
> 			<artifactId>servicemix-core</artifactId>
> 			<version>${servicemix-version}</version>
> 			<scope>provided</scope>
> 		</dependency>
> 		<dependency>
>            <groupId>org.apache.camel</groupId>
>            <artifactId>camel-core</artifactId>
>            <version>1.4.4.0-fuse</version>
>            <type>test-jar</type>
>            <scope>test</scope>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.camel</groupId>
>            <artifactId>camel-core</artifactId>
>            <version>1.4.4.0-fuse</version>
>        </dependency>
> 	</dependencies>
> 	<build>
> 		<defaultGoal>install</defaultGoal>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-compiler-plugin</artifactId>
> 				<configuration>
> 					<source>1.5</source>
> 					<target>1.5</target>
> 				</configuration>
> 			</plugin>
> 			<!-- creates the JBI deployment unit -->
> 			<plugin>
> 				<groupId>org.apache.servicemix.tooling</groupId>
> 				<artifactId>jbi-maven-plugin</artifactId>
> 				<extensions>true</extensions>
> 			</plugin>
> 		</plugins>
> 	</build>
> 	<properties>
> 	   <componentName>servicemix-camel</componentName>
> 		<servicemix-version>3.3.1.5-fuse</servicemix-version>
> 	</properties>
> </project>
> 
>  camel-context.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        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">
> 	  <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
> 	    <!-- Define the location of our router builder class -->
> 	    <package>com.liav.oxp.esb.poc</package>
> 	  </camelContext>
> </beans>
> 
> 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:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> 	<classpathentry kind="src" path="src/main/java"/>
> 	<classpathentry excluding="**/*.java" kind="src"
> path="src/main/resources"/>
> 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> 	<classpathentry kind="var"
> path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/activemq/activeio-core/3.1.0.0-fuse/activeio-core-3.1.0.0-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/activemq/activemq-core/5.0.0.18-fuse/activemq-core-5.0.0.18-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/axis/axis-ant/1.4/axis-ant-1.4.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/bouncycastle/bcprov-jdk14/136/bcprov-jdk14-136.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/bouncycastle/bcprov-jdk15/132/bcprov-jdk15-132.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/camel/camel-spring/1.4.1.0-fuse/camel-spring-1.4.1.0-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/commons-dbcp/commons-dbcp/1.2/commons-dbcp-1.2.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/commons-pool/commons-pool/1.2/commons-pool-1.2.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-activation_1.0.2_spec-1.2.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/components/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/modules/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1/geronimo-j2ee-connector_1.5_spec-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-jacc_1.0_spec/1.1/geronimo-j2ee-jacc_1.0_spec-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.1/geronimo-j2ee-management_1.0_spec-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1/geronimo-jms_1.1_spec-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.1/geronimo-jta_1.0.1B_spec-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/specs/geronimo-qname_1.1_spec/1.1/geronimo-qname_1.1_spec-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/components/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/geronimo/modules/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/jaxen/jaxen/1.1-beta-9/jaxen-1.1-beta-9.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/jencks/jencks/2.1/jencks-2.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/>
> 	<classpathentry kind="var" path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/mx4j/mx4j-remote/3.0.1/mx4j-remote-3.0.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/opensaml/opensaml/1.1/opensaml-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/opensaml/opensaml/1.1/opensaml-1.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/regexp/regexp/1.3/regexp-1.3.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-camel/3.3.1.5-fuse/servicemix-camel-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-common/3.3.1.5-fuse/servicemix-common-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-core/3.3.1.5-fuse/servicemix-core-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-jbi/3.3.1.5-fuse/servicemix-jbi-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-services/3.3.1.5-fuse/servicemix-services-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-shared/3.3.1.5-fuse/servicemix-shared-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-soap/3.3.1.5-fuse/servicemix-soap-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/servicemix/servicemix-soap2/3.3.1.5-fuse/servicemix-soap2-3.3.1.5-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-aop/2.5.5/spring-aop-2.5.5.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-beans/2.0.6/spring-beans-2.0.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-context/2.0.6/spring-context-2.0.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-core/2.5.5/spring-core-2.5.5.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-dao/2.0.6/spring-dao-2.0.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-jms/2.0.6/spring-jms-2.0.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-jmx/2.0.6/spring-jmx-2.0.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-remoting/2.0.6/spring-remoting-2.0.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/springframework/spring-support/2.0.6/spring-support-2.0.6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/woden/woden/1.0.0M6/woden-1.0.0M6.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/ws/security/wss4j/1.5.4/wss4j-1.5.4.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.2/wstx-asl-3.2.2.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/xbean/xbean-classloader/3.1.0.2-fuse/xbean-classloader-3.1.0.2-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/xbean/xbean-kernel/3.1.0.2-fuse/xbean-kernel-3.1.0.2-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/xbean/xbean-server/3.1.0.2-fuse/xbean-server-3.1.0.2-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/xbean/xbean-spring/3.1.0.2-fuse/xbean-spring-3.1.0.2-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.3.2/XmlSchema-1.3.2.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/com/thoughtworks/xstream/xstream/1.3/xstream-1.3.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/camel/camel-core/1.4.4.0-fuse/camel-core-1.4.4.0-fuse.jar"/>
> 	<classpathentry kind="var"
> path="M2_REPO/org/apache/camel/camel-core/1.4.4.0-fuse/camel-core-1.4.4.0-fuse-tests.jar"/>
> 	<classpathentry kind="output" path="target/classes"/>
> </classpath>
> 
> 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
>> <version> 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:
>>>
>>> <dependencies>
>>> 		<dependency>
>>> 			<groupId>org.apache.servicemix</groupId>
>>> 			<artifactId>servicemix-camel</artifactId>
>>> 			<version>${servicemix-version}</version>
>>> 			<scope>provided</scope>
>>> 		</dependency>
>>> 		<dependency>
>>> 			<groupId>org.apache.servicemix</groupId>
>>> 			<artifactId>servicemix-core</artifactId>
>>> 			<version>${servicemix-version}</version>
>>> 			<scope>provided</scope>
>>> 		</dependency>
>>> 		<dependency>
>>> 	      <groupId>org.apache.camel</groupId>
>>> 	      <artifactId>camel-spring</artifactId>
>>> 	      <version>1.4.0</version>
>>>       </dependency>
>>>       <dependency>
>>>         <groupId>org.apache.camel</groupId>
>>>         <artifactId>camel-core</artifactId>
>>>         <version>1.4.0</version>
>>>         <type>test-jar</type>
>>>         <scope>test</scope>
>>>       </dependency>
>>>       <dependency>
>>>         <groupId>org.apache.camel</groupId>
>>>         <artifactId>camel-core</artifactId>
>>>         <version>1.4.0</version>
>>>       </dependency>
>>> </dependencies>
>>>
>>> & 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:
>>>
>>> <classpath>
>>>   <classpathentry kind="src" path="src/main/java"/>
>>>   <classpathentry kind="src" path="src/main/resources"
>>> excluding="**/*.java"/>
>>>   <classpathentry kind="output" path="target/classes"/>
>>>   <classpathentry kind="con"
>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/activemq/activeio-core/3.1.0.0-fuse/activeio-core-3.1.0.0-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/activemq/activemq-core/5.0.0.18-fuse/activemq-core-5.0.0.18-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/axis/axis-ant/1.4/axis-ant-1.4.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/bouncycastle/bcprov-jdk14/136/bcprov-jdk14-136.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/bouncycastle/bcprov-jdk15/132/bcprov-jdk15-132.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/camel/camel-core/1.4.1.0-fuse/camel-core-1.4.1.0-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/camel/camel-spring/1.4.1.0-fuse/camel-spring-1.4.1.0-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/commons-dbcp/commons-dbcp/1.2/commons-dbcp-1.2.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/commons-pool/commons-pool/1.2/commons-pool-1.2.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-activation_1.0.2_spec/1.2/geronimo-activation_1.0.2_spec-1.2.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/components/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/modules/geronimo-connector/2.0.1/geronimo-connector-2.0.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1/geronimo-j2ee-connector_1.5_spec-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-jacc_1.0_spec/1.1/geronimo-j2ee-jacc_1.0_spec-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.1/geronimo-j2ee-management_1.0_spec-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1/geronimo-jms_1.1_spec-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.1/geronimo-jta_1.0.1B_spec-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/specs/geronimo-qname_1.1_spec/1.1/geronimo-qname_1.1_spec-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/components/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/geronimo/modules/geronimo-transaction/2.0.1/geronimo-transaction-2.0.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/jaxen/jaxen/1.1-beta-9/jaxen-1.1-beta-9.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/jencks/jencks/2.1/jencks-2.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/mx4j/mx4j-remote/3.0.1/mx4j-remote-3.0.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/opensaml/opensaml/1.1/opensaml-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/opensaml/opensaml/1.1/opensaml-1.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/regexp/regexp/1.3/regexp-1.3.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-camel/3.3.1.5-fuse/servicemix-camel-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-common/3.3.1.5-fuse/servicemix-common-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-core/3.3.1.5-fuse/servicemix-core-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-jbi/3.3.1.5-fuse/servicemix-jbi-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-services/3.3.1.5-fuse/servicemix-services-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-shared/3.3.1.5-fuse/servicemix-shared-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-soap/3.3.1.5-fuse/servicemix-soap-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/servicemix/servicemix-soap2/3.3.1.5-fuse/servicemix-soap2-3.3.1.5-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-aop/2.5.5/spring-aop-2.5.5.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-beans/2.0.6/spring-beans-2.0.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-context/2.0.6/spring-context-2.0.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-core/2.5.5/spring-core-2.5.5.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-dao/2.0.6/spring-dao-2.0.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-jms/2.0.6/spring-jms-2.0.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-jmx/2.0.6/spring-jmx-2.0.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-remoting/2.0.6/spring-remoting-2.0.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/springframework/spring-support/2.0.6/spring-support-2.0.6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/woden/woden/1.0.0M6/woden-1.0.0M6.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/ws/security/wss4j/1.5.4/wss4j-1.5.4.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.2/wstx-asl-3.2.2.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/xbean/xbean-classloader/3.1.0.2-fuse/xbean-classloader-3.1.0.2-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/xbean/xbean-kernel/3.1.0.2-fuse/xbean-kernel-3.1.0.2-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/xbean/xbean-server/3.1.0.2-fuse/xbean-server-3.1.0.2-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/xbean/xbean-spring/3.1.0.2-fuse/xbean-spring-3.1.0.2-fuse.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.3.2/XmlSchema-1.3.2.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar"/>
>>>   <classpathentry kind="var"
>>> path="M2_REPO/com/thoughtworks/xstream/xstream/1.3/xstream-1.3.jar"/>
>>> </classpath>
>>>
>>> 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:
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>        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">
>>>>> 	  <camelContext useJmx="true"
>>>>> xmlns="http://activemq.apache.org/camel/schema/spring">
>>>>> 	    <package>com.liav.oxp.esb.poc</package>
>>>>> 	  </camelContext>
>>>>> </beans>
>>>>>
>>>>> 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. 
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> 


Mime
View raw message