You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/01/24 11:18:45 UTC

[GitHub] ppalaga opened a new issue #370: Failed to resolve endpoint: twitter-search

ppalaga opened a new issue #370: Failed to resolve endpoint: twitter-search
URL: https://github.com/apache/camel-k/issues/370
 
 
   Have a route starting with
   
   ```
   from("twitter-search:{{twitterKeywords}}?delay={{twitterDelayMs}}"
                   + "&consumerKey={{twitterConsumerKey}}"
                   + "&consumerSecret={{twitterConsumerSecret}}"
                   + "&accessToken={{twitterAccessToken}}"
                   + "&accessTokenSecret={{twitterAccessTokenSecret}}")
   ```
   
   Have a secret 
   
   ```
   apiVersion: v1
   data:
     application.properties: CmNhbWVsLnNwcmluZ2Jvb3QubmFtZSA9IENhbWVsIERlbW8KCnR3aXR0ZXJDb25zdW1lcktleSA9IE5NcWFjYTFielhzT2NaaFAyWGx3QQp0d2l0dGVyQ29uc3VtZXJTZWNyZXQgPSBWeE5RaVJMd3dLVkQwSzltbWZ4bFRUYlZkZ1JwcmlPUnlwblViSGh4ZVF3CnR3aXR0ZXJBY2Nlc3NUb2tlbiA9IDI2NjkzMjM0LVcwWWp4TDljTUpyQzBWWlo0eGRnRk15bXhJUTEwTGVMMUs4WWxiQlkKdHdpdHRlckFjY2Vzc1Rva2VuU2VjcmV0ID0gQlpENTFCZ3piT2RGc3RXWllzcUI1cDVkYnV1RFYxMnZyT2RhdHpoWTRFCgp0d2l0dGVyS2V5d29yZHMgPSBjYW1lbCxkZXZjb25mY3oKdHdpdHRlckRlbGF5TXMgPSA1MDAwCgoKCm1hbmFnZW1lbnQuZW5kcG9pbnRzLndlYi5leHBvc3VyZS5pbmNsdWRlPWluZm8saGVhbHRoLGNhbWVscm91dGVzCgptYW5hZ2VtZW50LmVuZHBvaW50LmhlYWx0aC5zaG93LWRldGFpbHM9YWx3YXlzCgptYW5hZ2VtZW50LmluZm8uY2FtZWwuZW5hYmxlZD1mYWxzZQoKbWFuYWdlbWVudC5lbmRwb2ludC5jYW1lbHJvdXRlcy5lbmFibGVkID0gdHJ1ZQptYW5hZ2VtZW50LmVuZHBvaW50LmNhbWVscm91dGVzLnJlYWQtb25seSA9IHRydWUKCgp0ZWxlZ3JhbUF1dGhvcml6YXRpb25Ub2tlbj03NzA4ODIzMTA6QUFGMGwxcThDVHhYM2Y1dlcxT1I2MGJxWU5CX1FmY19aTm8K
   kind: Secret
   metadata:
     creationTimestamp: 2019-01-24T10:47:28Z
     name: forwarder-props
     namespace: ck
     resourceVersion: "650844"
     selfLink: /api/v1/namespaces/ck/secrets/forwarder-props
     uid: 713d4ee5-1fc5-11e9-af4d-525400726495
   type: Opaque
   ```
   
   and start with
   
   ```
   kamel run MyCamelRouter.groovy --dev --secret forwarder-props
   ```
   
   Expected: it should work as it does on plain Camel
   
   Actual: I get the following exception:
   
   ```
   [1] Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[twitter-search:{{twitterKeywords}}?delay... because of Failed to resolve endpoint: twitter-search://camel,devconfcz?accessToken=26693234-W0YjxL9cMJrC0VZZ4xdgFMymxIQ10LeL1K8YlbBY&accessTokenSecret=BZD51BgzbOdFstWZYsqB5p5dbuuDV12vrOdatzhY4E&consumerKey=NMqaca1bzXsOcZhP2XlwA&consumerSecret=VxNQiRLwwKVD0K9mmfxlTTbVdgRpriORypnUbHhxeQw&delay=5000 due to: No component found with scheme: twitter-search
   [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)
   [1]     at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3244)
   [1]     at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3267)
   [1]     at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3244)
   [1]     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
   [1]     at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3160)
   [1] 2019-01-24 11:06:58.142 INFO  [Camel Thread #1 - CamelHangupInterceptor] MainSupport$HangupInterceptor - Received hang up - stopping the main instance.
   [1]     at org.apache.camel.k.jvm.Runtime.doStart(Runtime.java:110)
   [1]     at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
   [1]     at org.apache.camel.main.MainSupport.run(MainSupport.java:170)
   [1]     at org.apache.camel.k.jvm.Application.main(Application.java:73)
   [1] Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: twitter-search://camel,devconfcz?accessToken=26693234-W0YjxL9cMJrC0VZZ4xdgFMymxIQ10LeL1K8YlbBY&accessTokenSecret=BZD51BgzbOdFstWZYsqB5p5dbuuDV12vrOdatzhY4E&consumerKey=NMqaca1bzXsOcZhP2XlwA&consumerSecret=VxNQiRLwwKVD0K9mmfxlTTbVdgRpriORypnUbHhxeQw&delay=5000 due to: No component found with scheme: twitter-search
   [1]     at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:759)
   [1]     at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80)
   [1]     at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:227)
   [1]     at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
   [1]     at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:122)
   [1]     at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:75)
   [1]     at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:98)
   [1]     at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1332)
   [1]     at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:212)
   [1]     ... 13 more
   ```
   
   When I replace the placeholders with the values, the route starts working:
   
   ```
   from("twitter-search://camel,devconfcz?accessToken=26693234-W0YjxL9cMJrC0VZZ4xdgFMymxIQ10LeL1K8YlbBY&accessTokenSecret=BZD51BgzbOdFstWZYsqB5p5dbuuDV12vrOdatzhY4E&consumerKey=NMqaca1bzXsOcZhP2XlwA&consumerSecret=VxNQiRLwwKVD0K9mmfxlTTbVdgRpriORypnUbHhxeQw&delay=5000")
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services