[ 
https://issues.apache.org/jira/browse/CAMEL-12453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16443315#comment-16443315
 ] 

Andreas Mattes commented on CAMEL-12453:
----------------------------------------

I've been checking with further route samples, and I've seen that custom 
serializer/deserializer classes are normally resolved in the KafkaEndpoint 
using the class resolver of the Camel context. This has been working well in my 
latest samples; and I am going to revisit the problematic routes. I will come 
back if I find any issue which should be resolved in Camel, otherwise the 
present issue can be closed.

> Custem serializers referenced in a Camel Kafka endpoint URL cannot be 
> resolved in OSGi
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12453
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12453
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-kafka
>    Affects Versions: 2.21.0
>            Reporter: Andreas Mattes
>            Priority: Major
>         Attachments: Kafka-serializer-classloading-src.tar.gz, 
> Kafka-serializer-classloading-test.tar.gz
>
>
> In Camel Kafka endpoint URLs, serializer and deserializer classes can be set 
> as parameters. These are set as Strings (class names) and resolved to classes 
> in the scope of the Kafka client. In environments with restrictive class 
> loading like OSGi, camel-karaf ensures that Kafka classes can be resolved 
> properly by setting the context class loader to the class loader of the Kafka 
> client classes. However, this setting makes it impossible to reference custom 
> serializers in the Kafka endpoint URL, because these cannot be resolved by 
> the Kafka class loader and let Kafka producer and/or consumer creation fail 
> with a ClassNotFoundException.
> The attached file "Kafka-serializer-classloading-test.tar.gz" contains a test 
> derived from a camel-kafka unit test which demonstrates the serializer class 
> loading issue.
> The attached file "Kafka-serializer-classloading-src.tar.gz" contains class 
> sources of a proposal for a fix of this issue.
> The content of both files is derived from Camel 2.21.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to