Hi all,
I got org.apache.camel.NoSuchEndpointException: No endpoint could be found for: 
ref:direct:createFolderQueue .

I am using this bean to create one camel context, and use this context in all 
routes:

@Component
public class ArkCaseCamelContext
{
    private CamelContext context;

    public ArkCaseCamelContext() throws Exception
    {
        context = new DefaultCamelContext();
        context.start();
    }

I have producer class :

@Component
public class CMISQueue
{
    private ProducerTemplate producerTemplate;

    @Autowired
    private ArkCaseCamelContext arkCaseCamelContext;

    public void createFolder(Item item) throws Exception
    {
        CamelContext context = arkCaseCamelContext.getContext();
        producerTemplate = context.createProducerTemplate();
        producerTemplate.start();

        producerTemplate.requestBody("direct:createFolderQueue", item);
    }

and consumer route

@Component
public class CMISRoute
{
    private CamelContext camelContext;

    @Autowired
    private ArkCaseCamelContext arkCaseCamelContext;

    public void test() throws Exception
    {
        camelContext = arkCaseCamelContext.getContext();
        camelContext.addRoutes(new RouteBuilder()
        {
            @Override
            public void configure() throws Exception
            {
                from("direct:createFolderQueue")
                        .startupOrder(1)
                        
.log("***********************************************Executing 
CMISRoute***********************************************")
                        .process(exchange -> {
                            
exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder");
                            exchange.getIn().getHeaders().put(PropertyIds.NAME, 
"New folder from Camel - adfasdfasdf");
                            
exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_FOLDER_PATH, "/User 
Homes/ann-acm");
                        })
                        // arkcase-cmis is the file under META-INF which points 
to ArkCaseCMISComponent
                        .to(
                                "arkcase-cmis:......");
            }
        });
    }

So, I have direct producer and consumer. Why camel says that there is no 
consumer for direct:createFolderQueue ?
I was trying with direct, seda, vm...
I need synchronous communication, because of that I am using direct.
Any suggestions are welcomed 🙂

Reply via email to