camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paolo Antinori (JIRA)" <>
Subject [jira] [Created] (CAMEL-10282) [Avro] Issue on OSGi due to static cache
Date Thu, 01 Sep 2016 08:24:21 GMT
Paolo Antinori created CAMEL-10282:

             Summary: [Avro] Issue on OSGi due to static cache
                 Key: CAMEL-10282
             Project: Camel
          Issue Type: Bug
          Components: camel-avro
    Affects Versions: 2.17.3
            Reporter: Paolo Antinori

Avro holds a cache of classloaders and other reflection related classes in a static map here:

Keys of that map are `String`s with classname.

The cache is never updated, and this breaks OSGi ability to update a new class definition,
since avro **will keep pointing to the old version**.

This will lead to a situation where, on an OSGi platform, you are exposed to `ClassCastException`
since the rest of the platform might see a different varsion than the old one cached by avro.

The attached fix is a simple way to entirely bypass this caching behavior with just public
subclasses that turn off just the caching behavior.

This message was sent by Atlassian JIRA

View raw message