I guess eclipse doesn’t recompile the route when you switch the camel version.
It’s could be more easy just by using mvn clean install command to do the 
recompile work.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, November 12, 2013 at 6:42 PM, Agostino Calamita wrote:

> Hi all,
> the problems was connected to my maven repository: I had in my mvn
> repository an old version of camel, and also if I used camel.version 2.12.1
> in pom.xml of my Eclipse project, it was compiled it with old version of
> camel.
>  
> I removed old camel version from maven repos, and recompiled my sources,
> and the problems was solved.
>  
>  
>  
>  
> 2013/11/11 Agostino Calamita <[email protected] 
> (mailto:[email protected])>
>  
> > I recompiled it with 2.12.1.
> >  
> > I compiled this route for the first time, in 2.12.1 ( following an example
> > that I found in Apache Camel site ) and this ends with error (
> > NoSuchMethodException ); then I tried to compile the same code with Camel
> > 2.11.0 and it worked ( no Exception ).
> >  
> > I don't know I have to change to make it work in Camel 2.12.1
> >  
> > Thanks.
> >  
> >  
> >  
> > 2013/11/11 Willem jiang <[email protected] 
> > (mailto:[email protected])>
> >  
> > > Hi,
> > >  
> > > I think you may need to recompile the route instead of just change the
> > > class path when you move to use Camel 2.12.1.
> > >  
> > > --
> > > Willem Jiang
> > >  
> > > Red Hat, Inc.
> > > Web: http://www.redhat.com
> > > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> > > (English)
> > > http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >  
> > >  
> > >  
> > >  
> > >  
> > > On Monday, November 11, 2013 at 5:39 AM, Agostino Calamita wrote:
> > >  
> > > > Hi,
> > > > I'm trying to use transacted route with Camel 2.12.1.
> > > >  
> > > > This is just a little example to test transacted() method:
> > > >  
> > > > public static void main(String args[]) throws Exception {
> > > > // create CamelContext
> > > > CamelContext context = new DefaultCamelContext();
> > > >  
> > > > // add our route to the CamelContext
> > > > context.addRoutes(new RouteBuilder() {
> > > > public void configure() {
> > > > from("activemq:topic:example_queue")
> > > > .transacted()
> > > > .to("log:mediationrouter?level=DEBUG");
> > > >  
> > > > }
> > > >  
> > > > });
> > > >  
> > > > This route is only an example.
> > > >  
> > > > If I use this code with Camel 2.12.1, it throws a strange Exception:
> > > >  
> > > > Exception in thread "main" java.lang.NoSuchMethodError:
> > > org.apache.camel.model.RouteDefinition.transacted()Lorg/apache/camel/model/PolicyDefinition;
> > > >  
> > > >  
> > > > but, if I user Camel 2.11.0 it works !
> > > >  
> > > > I read in 2.12.1 Release Notes that something changed in transaction
> > > > setting, but I didn't find any example or document.
> > > >  
> > > > Can somebody help me ?
> > > >  
> > > > Thanks.  


Reply via email to