You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/10/08 17:29:30 UTC
[GitHub] [camel-k] bthj commented on issue #2684: Unable to access MongoDB
bthj commented on issue #2684:
URL: https://github.com/apache/camel-k/issues/2684#issuecomment-938925359
I tried to use `.bean`, like so:
```
.bean(MongoDbComponent.class, "createEndpoint(String 'hosts=[shard1].mongodb.net:27017,[shard2].xiqat.mongodb.net:27017,[shard3].mongodb.net:27017&username=[user]&password=[pass]&database=[db]&collection=[coll]&operation=getDbStats')")
```
but that throws:
```
org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [protected org.apache.camel.Endpoint org.apache.camel.component.mongodb.MongoDbComponent.createEndpoint(java.lang.String,java.lang.String,java.util.Map) throws java.lang.Exception] on the exchange: Exchange[]
```
while I thought I was eliminating ambiguity by [using the type qualifier](https://camel.apache.org/manual/latest/bean-binding.html#BeanBinding-Usingtypequalifierstoselectamongoverloadedmethods) `String` to select among the overloaded methods.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org