dc2tom commented on issue #837:
URL: https://github.com/apache/camel-quarkus/issues/837#issuecomment-623564487


   Hi, I've made a start with this following the Freemarker pull request as an 
example.  I'm working on porting over the unit tests from camel-velocity but 
there is one thing I'm not getting.  
   
   When trying to run my test, against the below resource definition
   ```java
   @Path("/velocity")
   @ApplicationScoped
   public class VelocityLetterResource {
   
       @Inject
       ProducerTemplate producerTemplate;
   
       @Path("/velocityLetter")
       @POST
       @Consumes(MediaType.APPLICATION_JSON)
       @Produces(MediaType.TEXT_PLAIN)
       public String post(String message) {
           Exchange exchange = producerTemplate.request("direct:a", new 
Processor() {
               @Override
               public void process(Exchange exchange) throws Exception {
                   exchange.getIn().setHeader("firstName", "Claus");
                   exchange.getIn().setHeader("lastName", "Ibsen");
                   exchange.getIn().setHeader("item", "Camel in Action");
                   exchange.getIn().setBody("PS: Next beer is on me, James");
               }
           });
   
           return (String) exchange.getOut().getBody();
       }
   
   public static class VelocityRouteBuilder extends RouteBuilder {
           @Override
           public void configure() {
               from("direct:a")
                       
.to("velocity:org/apache/camel/quarkus/component/velocity/letter.vm");
           }
       }
   ```
   I see the following failure:
   ```code
   Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be 
found for: direct://a, please check your classpath contains the needed Camel 
component jar.
   ```
   I can't work out how the RouteBuilder is invoked - my integration tests 
exist in the org.apache.camel.quarkus.component.velocity.it package.. I auto 
generated the velocity extension as per the contribution guide.
   
   I expected that perhaps my extension would not be able to load the .vm file 
as I have yet to implement the functionality, but instead it seems the 
RouteBuilder is not being executed.  Any advice appreciated :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to