java.lang.NoSuchMethodError means the code is compiled with a different version as the one which is available at runtime. Please check your class path whether you use the right version.
P.S.: As far as I know, there is no ServiceMix version available which is using Camel 2.12 at present. Best, Christian ----------------- Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC Member https://www.linkedin.com/pub/christian-mueller/11/551/642 On Thu, Oct 17, 2013 at 9:34 PM, paulo.neves <[email protected]>wrote: > Hi, > > > I have a route that use .transacted(), and with apache camel 2.10 works > fine, but with apache camel 2.12.1 give-me error. What could be? Was > .transacted() removed from camel ? > > Exception in thread "SpringOsgiExtenderThread-16" > java.lang.NoSuchMethodError: > > org.apache.camel.model.RouteDefinition.transacted(Ljava/lang/String;)Lorg/apache/camel/model/PolicyDefinition; > at > com.mycompany.template.SplitXMLRoute.configure(SplitXMLRoute.java:11) > at > > org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:322) > at > > org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:276) > at > > org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:262) > at > > org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:669) > at > > org.apache.camel.core.xml.AbstractCamelContextFactoryBean.installRoutes(AbstractCamelContextFactoryBean.java:738) > at > > org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:299) > at > > org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:295) > at > > org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96) > at > > org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334) > at > > org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948) > at > > org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235) > at > > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358) > at > > org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) > at > > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) > at > > org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132) > at java.lang.Thread.run(Thread.java:724) > > > my route > > > from("activemq:persons?requestTimeoutCheckerInterval=10").routeId("SplitXMLRoute") > .transacted("required") > .split() > .tokenizeXML("person") > .streaming() > .unmarshal("person") > .to("bean:myService?method=settingRequestId") > .to("mybatis:insertPerson?statementType=Insert") > .end() > > my configuration > > <bean id="sqlSessionFactory" > class="org.mybatis.spring.SqlSessionFactoryBean"> > <property name="dataSource" ref="camelJpaDS"/> > > <property name="configLocation" > value="/META-INF/SqlMapConfig.xml"/> > > <property name="mapperLocations" > value="classpath*:META-INF/mappers/**/*.xml"/> > </bean> > > <bean id="required" > class="org.apache.camel.spring.spi.SpringTransactionPolicy"> > <property name="transactionManager" ref="txManager" /> > <property name="propagationBehaviorName" > value="PROPAGATION_REQUIRED" /> > </bean> > > <bean id="txManager" > class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> > <property name="dataSource" ref="camelJpaDS"/> > </bean> > > <bean id="mybatis" > class="org.apache.camel.component.mybatis.MyBatisComponent"> > <property name="sqlSessionFactory" ref="sqlSessionFactory"/> > </bean> > > <osgi:reference id="camelJpaDS" interface="javax.sql.DataSource" > bean-name="camelJpaDS" /> > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Camel-2-12-1-don-t-recognize-transacted-tp5718078.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. >
