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 2018/05/25 13:58:00 UTC

[jira] [Resolved] (CAMEL-12453) Custem serializers referenced in a Camel Kafka endpoint URL cannot be resolved in OSGi

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

Claus Ibsen resolved CAMEL-12453.
---------------------------------
    Resolution: Not A Problem
      Assignee: Claus Ibsen

Thanks for the status update

> 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
>            Assignee: Claus Ibsen
>            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)