You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "apoorvmintri (via GitHub)" <gi...@apache.org> on 2024/01/22 06:06:17 UTC

[I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

apoorvmintri opened a new issue, #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587

   Background: I am a python developer & have never done Java.
   
   Camel Salesforce Source Connector: v3.20.6 ( I have tried 3.21.0 & 4.0.0 and I'm facing the same issue)
   Kafka: v3.6.1
   
   Issue: Trying to create CamelSalesforcesourceSourceConnector for my kafka instance and it fails with the exception ResolveEndpointFailedException. I have tried a few variations of creating the connector using Kafka's REST API.
   
   Variation 1:
   `{
       "name": "sf-source-connector",
       "config": {
           "tasks.max":"1",
           "connector.class":"org.apache.camel.kafkaconnector.salesforcesource.CamelSalesforcesourceSourceConnector",
           "key.converter":"org.apache.kafka.connect.storage.StringConverter",
           "value.converter":"org.apache.kafka.connect.storage.StringConverter",
           "camel.kamelet.salesforce-source.query": "SELECT * FROM Account",
           "camel.kamelet.salesforce-source.topicName": "/data/AccountChangeEvent",
           "camel.kamelet.salesforce-source.loginUrl": "https://login.salesforce.com/",
           "camel.kamelet.salesforce-source.clientId": "<Redacted>",
           "camel.kamelet.salesforce-source.clientSecret": "<Redacted>",
           "camel.kamelet.salesforce-source.userName": "<Redacted>",
           "camel.kamelet.salesforce-source.password": "<Redacted>",
           "camel.kamelet.salesforce-source.notifyForOperationCreate": "true",
           "camel.kamelet.salesforce-source.notifyForOperationUpdate": "true",
           "camel.kamelet.salesforce-source.notifyForOperationDelete": "true",
           "camel.kamelet.salesforce-source.notifyForOperationUndelete": "true",
           "camel.source.endpoint.rawPayload": "true",
           "camel.kamelet.salesforce-source.operation": "subscribe",
           "topics": "camelsfstream"
       }
   }`
   
   Failure Exception Summary -
   Starts with - `org.apache.kafka.connect.errors.ConnectException: Failed to create and start Camel context\n\tat org.apache.camel.kafkaconnector.CamelSourceTask.start(CamelSourceTask.java:184)`
   Ends with - `Caused by: java.lang.IllegalArgumentException: /data/AccountChangeEvent\n\tat org.apache.camel.component.salesforce.internal.OperationName.fromValue(OperationName.java:128)\n\tat org.apache.camel.component.salesforce.SalesforceComponent.createEndpoint(SalesforceComponent.java:303)\n\tat org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:171)\n\tat org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:975)`
   
   Key Issue -
   `IllegalArgumentException: /data/AccountChangeEvent`
   
   Variation 2 -
   In my connector I replaced the topic name: `"camel.kamelet.salesforce-source.topicName": "subscribe:/data/AccountChangeEvent"`
   
   The exception starts with `Failed to create and start Camel context`, but the final exception changes to -
   `due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{operationName=subscribe}]`
   
   I am unable to overwrite the endpoint url to test the above variation without the operationName and I am also aware that subscribe is the default. So even if I remove that property from the json, it makes no difference.
   
   On another note the endpoint starts with `local-salesforce-1://` the # increments - is that right? I couldnt find any property to change this. I imagine it gets replaced eventually.


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "apoorvmintri (via GitHub)" <gi...@apache.org>.
apoorvmintri commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903574868

   @oscerd The issue is fixed by reverting to 3.18.x, issue persists for 3.19.x and above (incl 4.0.0), unless there is something wrong with my configuration. This is just an fyi, if you still think I should close it, then I will. 


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "aonamrata (via GitHub)" <gi...@apache.org>.
aonamrata commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1951967136

   Hi, Any idea when 4.0.4 would be available? I am getting the same error and dont see 4.0.4 in 
   https://repo.maven.apache.org/maven2/org/apache/camel/kafkaconnector/camel-salesforce-source-kafka-connector/ list.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "apoorvmintri (via GitHub)" <gi...@apache.org>.
apoorvmintri commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903772647

   Sorry for spamming. The salesforce source kafka connector seems to be **unusable** above 3.19.x as "operationName=subscribe" is added by default and the topic name does not work without the "subscribe:" prefix. This leads to either IllegalArgumentException on the topic name (if prefix not added) OR an unknown property exception for operationName.
   
   Not an issue if devs use 3.18.x or earlier. Just letting you know in case this is suppose to be a higher priority issue as the component is unusable, assuming there isn't any other workaround for those versions.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1951973390

   No ETA at this stage.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903580442

   I'll try to investigate, but I don't have an ETA.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "apoorvmintri (via GitHub)" <gi...@apache.org>.
apoorvmintri commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903697881

   @oscerd In addition to the operationName, there is the issue with InputStreamCache being transported to Kafka. This could only be resolved by using ByteArrayConverter & disabling the stream caching as described in <https://github.com/apache/camel-kafka-connector/issues/1433#issuecomment-1903471389> another ticket that is open.
   
   Not sure if this is a bug as well.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903583691

   Leave it open for the moment, thank you.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903703553

   StreamCaching has been enabled by default in Camel. So it must be disabled with camel.main.streamCachingEnabled set to false.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903775111

   We'll fix that in 4.4.0.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "apoorvmintri (via GitHub)" <gi...@apache.org>.
apoorvmintri commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903530176

   #### Workaround
   
   Realizing that the "operationName" property was added in v3.19.x, I switch to 3.18.x (I used the latest - v3.18.2). And my json was the same as Version 2 (described in the problem) -
   
   `{ "name": "sf-source-connector", "config": { "tasks.max":"1", "connector.class":"org.apache.camel.kafkaconnector.salesforcesource.CamelSalesforcesourceSourceConnector", "key.converter":"org.apache.kafka.connect.storage.StringConverter", "value.converter":"org.apache.kafka.connect.storage.StringConverter", "camel.kamelet.salesforce-source.query": "SELECT * FROM Account", "camel.kamelet.salesforce-source.topicName": "subscribe:/data/AccountChangeEvent", "camel.kamelet.salesforce-source.loginUrl": "https://login.salesforce.com/", "camel.kamelet.salesforce-source.clientId": "<Redacted>", "camel.kamelet.salesforce-source.clientSecret": "<Redacted>", "camel.kamelet.salesforce-source.userName": "<Redacted>", "camel.kamelet.salesforce-source.password": "<Redacted>", "camel.kamelet.salesforce-source.notifyForOperationCreate": "true", "camel.kamelet.salesforce-source.notifyForOperationUpdate": "true", "camel.kamelet.salesforce-source.notifyForOperationDelete": "true", "camel.kamelet.salesf
 orce-source.notifyForOperationUndelete": "true", "camel.source.endpoint.rawPayload": "true", "topics": "camelsfstream" } }`
   
   Note - 
   `"camel.kamelet.salesforce-source.operation": "subscribe"` is removed &
   `"camel.kamelet.salesforce-source.topicName": "subscribe:/data/AccountChangeEvent"` prefix 'subscribe:' added to topic
   
   I did face Authorization Failure, which was resolved by going to Salesforce Setup > OAuth and OpenId Connect Settings, and enabling 'Allow OAuth Usename-Password Flows'. Just FYI, there are other policies that should be setup in your salesforce connected app to make this connection succeful.
   
   After this, I faced the infamous `InputStreamCache` messages in my kafka instance instead of the actual data, as described in issue #1433 . To resolve this, the following workaround I described here works - 
   <https://github.com/apache/camel-kafka-connector/issues/1433#issuecomment-1903471389>


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903571465

   Thanks for reporting, if this is fixed please close the issue.


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903776676

   We just released 4.0.3 camel-kamelets-catalog, and we're going to release 4.0.3 camel-kafka-connector based on that. So the issue will be fixed in 4.4.0 and 4.0.4


-- 
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


Re: [I] Failed to create CamelSalesforcesourceSourceConnector: ResolveEndpointFailedException [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1587:
URL: https://github.com/apache/camel-kafka-connector/issues/1587#issuecomment-1903774716

   https://github.com/apache/camel-kamelets/issues/1841


-- 
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