You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Prathamesh (Jira)" <ji...@apache.org> on 2021/08/03 07:01:00 UTC

[jira] [Created] (CAMEL-16835) spring boot camel kafka failing to create routes

Prathamesh created CAMEL-16835:
----------------------------------

             Summary: spring boot camel kafka failing to create routes
                 Key: CAMEL-16835
                 URL: https://issues.apache.org/jira/browse/CAMEL-16835
             Project: Camel
          Issue Type: Bug
            Reporter: Prathamesh


I am to trying consume message from kafka and invoke mailService to trigger email. Below is the code snippet for the same

@Component

public class KafkaReceiverRoute extends RouteBuilder {

@Override

public void configure() throws Exception {
     errorHandler(deadLetterChannel("kafka:\{{camel.kafkaEmailDeadLetterTopic}}")

.maximumRedeliveries(3)

.loggingLevel(LoggingLevel.WARN));

from("kafka:\{{camel.kafkaEmailTopic}}") .unmarshal()

.json(JsonLibrary.Jackson, EmailRequest.class)

.to("bean:mailService?method=sendMailAndCommitTokafka");
 }
}

 

I am using spring boot 2.5.3 and java 1.8 with below camel dependencies

<dependency>

<groupId>org.apache.camel.springboot</groupId>

<artifactId>camel-kafka-starter</artifactId>

<version>3.11.0</version> </dependency>

<dependency>

<groupId>org.apache.camel.springboot</groupId>

<artifactId>camel-jackson-starter</artifactId>

<version>3.11.0</version>

</dependency>

 

But it fails to create routes with below exception

 

org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> To[bean:mailService?method=sendMailAndCommitTokafka] <<< in route: Route(route1)[From[kafka:\{{camel.kafkaEmailTopic}}] -> [Unma... because of No endpoint could be found for: bean://mailService?method=sendMailAndCommitTokafka, please check your classpath contains the needed Camel component jar.org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> To[bean:mailService?method=sendMailAndCommitTokafka] <<< in route: Route(route1)[From[kafka:\{{camel.kafkaEmailTopic}}] -> [Unma... because of No endpoint could be found for: bean://mailService?method=sendMailAndCommitTokafka, please check your classpath contains the needed Camel component jar. at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:240) at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74) at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:826) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:716) at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2756) at org.apache.camel.support.service.BaseService.init(BaseService.java:83) at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2475) at org.apache.camel.support.service.BaseService.start(BaseService.java:111) at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2494) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:245) at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:119) at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:151) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at com.infosys.icets.cs.CommunicationserviceApp.main(CommunicationserviceApp.java:73)Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: bean://mailService?method=sendMailAndCommitTokafka, please check your classpath contains the needed Camel component jar. at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:968) at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:844) at org.apache.camel.support.CamelContextHelper.resolveEndpoint(CamelContextHelper.java:123) at org.apache.camel.reifier.SendReifier.resolveEndpoint(SendReifier.java:43) at org.apache.camel.reifier.SendReifier.createProcessor(SendReifier.java:36) at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:838) at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:579) at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:236) ... 25 common frames omitted



--
This message was sent by Atlassian Jira
(v8.3.4#803005)