Не удалось найти конечную точку для: RequestBlobRead, пожалуйста, проверьте, что ваш classpath содержит необходимый jar компонента Camel - PullRequest
0 голосов
/ 22 января 2020

Я новичок в ActiveMQ и пытаюсь вызвать один из моих методов для сообщения, и для этого я написал ниже код, но получаю ошибку как -

    Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route ReadBlob: Route(ReadBlob)[[From[RequestBlobRead]] -> [OnException[[cla... because of No endpoint could be found for: RequestBlobRead, please check your classpath contains the needed Camel component jar.
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:201)
    at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:974)
    at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3295)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3018)
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813)
    at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:116)
    ... 72 more
    Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: RequestBlobRead, please check your classpath contains the needed Camel component jar.
    at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:81)
    at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:211)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
    at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:69)
    at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1052)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
    ... 83 more

Пожалуйста, найдите ниже мой класс Route -

JmsRoute. java -

@Component
public class JmsRoute extends RouteBuilder {


@Autowired
private BlobWriteToFileProcessor blobWriteToFileProcessor;

@Override
public void configure() {
    onException(Exception.class)
            .log("Retrying...")
            .maximumRedeliveries(3).redeliveryDelay(StopRuleConstants.EXCEPTION_REDELIVERY_DELAY);
    from("RequestBlobRead")
            .routeId("ReadBlob")
            .log(LoggingLevel.INFO, "Method is going to trigger")
            .process(blobWriteToFileProcessor)
            .to("ReplyBlob")
            .end();
}
}

BlobWriteToFileProcessor. java -

 @Component
 public class BlobWriteToFileProcessor implements Processor {

private Logger logger = LoggerFactory.getLogger(BlobWriteToFileProcessor.class);

@Autowired
private BlobWriteToFileJDBCTemplate blobWriteToFile;

@Override
public void process(Exchange exchange) throws Exception {
    String inputJSONString = exchange.getIn().getBody().toString();
    logger.info("---------- Start refreshing Cache ---------------- "+ inputJSONString);
    blobWriteToFile.readData();
    //stopRuleCacheService.refreshCache(inputJSONString);
    logger.info("---------- End refreshing Cache ----------------");
}
}

Пожалуйста, дайте мне знать, где я делаю ошибку, также моя единственная цель - вызвать readData метод с использованием ActiveMQ.

Заранее спасибо!

...