contactreji commented on issue #892: Defining datasource in groovy and using in XML routes URL: https://github.com/apache/camel-k/issues/892#issuecomment-528889641 > org.apache.activemq.camel.component @WillemJiang - I get following error while starting the app. ``` 011 seconds [1] Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[activemq:queue:TESTINGCONNECTION]] -> [L... because of Failed to resolve endpoint: activemq://queue:TESTINGCONNECTION due to: Username must also be provided when using username/password as credentials. [1] at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:217) [1] at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:1140) [1] at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3735) [1] at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3440) [1] at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3248) ``` Route file ``` <?xml version="1.0" encoding="UTF-8"?> <routes xmlns="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <route streamCache="true"> <from uri="activemq:queue:TESTINGCONNECTION"/> <log message="Received request to process" /> </route> </routes> ``` Groovy file ``` import org.apache.activemq.camel.component.ActiveMQComponent; context { components { activemq(ActiveMQComponent) { brokerURL = 'tcp://localhost:61616' userName = 'admin' password = 'admin' } } } ```
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services