You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Liav Ezer <li...@gmail.com> on 2009/01/21 21:18:44 UTC
Need assistance to solve a camelContext exception
Hi,
This is another try to post my problem - maybe you ran into something
similar...
I use fuse-esb 3.3.1.3 with camel 1.4.
I have a Camel SA & i try to add an interceptor via the following code:
Router class:
public void configure() throws Exception {
getContext().addInterceptStrategy(new MyFromEndpointInterceptor());
from("jbi:service:http://oxp/oXpInternalService")
.process(new OXpServicesAuthenticationProcessor());
}
& i get the following exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'camelContext:beanPostProcessor': Cannot
resolve reference to bean 'camelContext' while setting bean property
'camelContext'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating be
an with name 'camelContext': Invocation of init method failed; nested
exception is java.lang.NoSuchMethodError:
org.apache.camel.CamelContext.addInterceptStrategy(Lorg/apache/camel
/spi/InterceptStrategy;)
What i tried to do is to remove camel-core 1.4 from my classpath & to add
1.5 (after getting it via pom dependecy)
Here is my camel-context
<?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">
<!-- Define the location of our router builder class -->
<package>com.liav.oxp.esb.poc</package>
</camelContext>
</beans>
Many thanks.
Liav.
--
View this message in context: http://www.nabble.com/Need-assistance-to-solve-a-camelContext-exception-tp21591380s22882p21591380.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Need assistance to solve a camelContext exception
Posted by Willem Jiang <wi...@gmail.com>.
Hi ,
How did just change the camel version in your SU ?
If so , you did not really change the camel version in fuse-esb.
If you want to use the camel 1.5 in fuse-esb 3.3.1.3, I think you need
to hack the service-camel component (replaceing old camel-* jars).
But I am not sure if you will face other problem then.
Why did you not upgrade fuse-esb? I think it is more easy way to do it.
Willem
Liav Ezer wrote:
> Hi,
>
> This is another try to post my problem - maybe you ran into something
> similar...
>
> I use fuse-esb 3.3.1.3 with camel 1.4.
>
> I have a Camel SA & i try to add an interceptor via the following code:
>
> Router class:
> public void configure() throws Exception {
>
> getContext().addInterceptStrategy(new MyFromEndpointInterceptor());
>
> from("jbi:service:http://oxp/oXpInternalService")
> .process(new OXpServicesAuthenticationProcessor());
> }
>
> & i get the following exception:
>
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'camelContext:beanPostProcessor': Cannot
> resolve reference to bean 'camelContext' while setting bean property
> 'camelContext'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating be
> an with name 'camelContext': Invocation of init method failed; nested
> exception is java.lang.NoSuchMethodError:
> org.apache.camel.CamelContext.addInterceptStrategy(Lorg/apache/camel
> /spi/InterceptStrategy;)
>
> What i tried to do is to remove camel-core 1.4 from my classpath & to add
> 1.5 (after getting it via pom dependecy)
>
> Here is my camel-context
>
> <?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">
> <!-- Define the location of our router builder class -->
> <package>com.liav.oxp.esb.poc</package>
> </camelContext>
> </beans>
>
> Many thanks.
> Liav.
Re: Need assistance to solve a camelContext exception
Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Jan 26, 2009 at 1:57 PM, Ashwin Karpe <as...@progress.com> wrote:
>
> Hi Liav,
>
> I have also answered in another thread...
>
> Why the Lorg/apache/camel/spi/InterceptStrategy ? Could this be a typo...
>
> I would have expected to see org/apache/camel/spi/InterceptStrategy as the
> one that could not load... But since you have all the jars in the path it
> should be fine...
This is not a typo, it's the name mangling performed by the JVM and
defined by the Java Language Spec:
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#14152
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Blog: http://bruceblog.org/
Re: Need assistance to solve a camelContext exception
Posted by Ashwin Karpe <as...@progress.com>.
Hi Liav,
I have also answered in another thread...
Why the Lorg/apache/camel/spi/InterceptStrategy ? Could this be a typo...
I would have expected to see org/apache/camel/spi/InterceptStrategy as the
one that could not load... But since you have all the jars in the path it
should be fine...
Cheers,
Ashwin...
Liav Ezer wrote:
>
> Hi,
>
> This is another try to post my problem - maybe you ran into something
> similar...
>
> I use fuse-esb 3.3.1.3 with camel 1.4.
>
> I have a Camel SA & i try to add an interceptor via the following code:
>
> Router class:
> public void configure() throws Exception {
>
> getContext().addInterceptStrategy(new MyFromEndpointInterceptor());
>
> from("jbi:service:http://oxp/oXpInternalService")
> .process(new OXpServicesAuthenticationProcessor());
> }
>
> & i get the following exception:
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'camelContext:beanPostProcessor': Cannot
> resolve reference to bean 'camelContext' while setting bean property
> 'camelContext'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating be
> an with name 'camelContext': Invocation of init method failed; nested
> exception is java.lang.NoSuchMethodError:
> org.apache.camel.CamelContext.addInterceptStrategy(Lorg/apache/camel
> /spi/InterceptStrategy;)
>
> What i tried to do is to remove camel-core 1.4 from my classpath & to add
> 1.5 (after getting it via pom dependecy)
>
> Here is my camel-context
>
> <?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">
> <!-- Define the location of our router builder class -->
> <package>com.liav.oxp.esb.poc</package>
> </camelContext>
> </beans>
>
> Many thanks.
> Liav.
>
-----
---
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
---
+1-972-304-9084 (Office)
+1-972-971-1700 (Mobile)
----
Blog: http://opensourceknowledge.blogspot.com/
--
View this message in context: http://www.nabble.com/Need-assistance-to-solve-a-camelContext-exception-tp21591380s22882p21673691.html
Sent from the Camel - Users mailing list archive at Nabble.com.