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

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

The issue of your first comment is the issue behind CAMEL-10069 where the 
problem was addressed that serializer classes from Kafka itself and other Kafka 
resources could not be resolved, because this was internally attempted from the 
bundle class loader of the Camel route invoking Kafka, and this bundle does not 
necessarily import all Kafka internals. However, with the fix for CAMEL-10069 
it is no longer possible to "inject" Serializer classes from the bundle of the 
Camel route.

> 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