You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/06/21 07:17:00 UTC

[jira] [Resolved] (CAMEL-15219) camel-cassandraql: cannot use a custom resultSetConversionStrategy

     [ https://issues.apache.org/jira/browse/CAMEL-15219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-15219.
---------------------------------
      Assignee: Claus Ibsen
    Resolution: Fixed

Thanks for reporting and spotting where the bug was in the code

> camel-cassandraql: cannot use a custom resultSetConversionStrategy
> ------------------------------------------------------------------
>
>                 Key: CAMEL-15219
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15219
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 3.3.0
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.4.1, 3.5.0
>
>
> According to the [documentation|https://camel.apache.org/components/latest/cql-component.html], it should be possible to use a custom ResultSetConversionStrategy on the camel-cassandraql component. 
> However, it seems it is not accepted in all cases and ends up failing to create the custom conversion. For example, using #bean:org.my.package.MyStrategy causes a failure similar to this:
> {quote}Caused by: java.lang.IllegalArgumentException: Unknown conversion strategy #bean:org.apache.camel.kafkaconnector.cassandra.clients.dao.TestResultSetConversionStrategy
> 	at org.apache.camel.component.cassandra.ResultSetConversionStrategies.fromName(ResultSetConversionStrategies.java:112) ~[camel-cassandraql-3.3.0.jar:3.3.0]
> 	at org.apache.camel.component.cassandra.CassandraComponent.createEndpoint(CassandraComponent.java:82) ~[camel-cassandraql-3.3.0.jar:3.3.0]
> 	at org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:237) ~[camel-support-3.3.0.jar:3.3.0]{quote}
> Looking at the current code on master, this does seem to be that the code on  
> [CassandraComponent.java|https://github.com/apache/camel/blob/961ca457e3e8120c4a9acdbe570669784bf3b12c/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/CassandraComponent.java#L82] and, more importantly, [ResultSetConversionStrategies.java|https://github.com/apache/camel/blob/961ca457e3e8120c4a9acdbe570669784bf3b12c/components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/ResultSetConversionStrategies.java#L97] do not behave like stated on the documentation (ie.: _"... Anything else, if resultSetConversionStrategy is a custom implementation of the ResultSetConversionStrategy ..."_).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)