avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Carey <sc...@richrelevance.com>
Subject Re: Schema <clinit> verify error in Tomcat 6
Date Thu, 30 Sep 2010 20:46:56 GMT
On Sep 30, 2010, at 10:14 AM, Tatu Saloranta wrote:

> On Thu, Sep 30, 2010 at 9:30 AM, Scott Carey <scott@richrelevance.com> wrote:
>> I think Jersey uses the Jackson JSON library, like Avro does.  The Schema
>> class is the first class in the chain that references jackson classes.  If
>> the version of Jackson that Jersey uses is old enough, that might be the
>> problem.  Its version likely comes first in the classpath.   Some of the
>> 1.0.x Jackson versions are known to be incompatible with later Jackson 1.x
>> versions.
>> The trace below is cryptic, but the first place I would look would be a jar
>> file conflict in a common dependeny.
> 
> Right: specifically, this is due to unintended binary incompatibility
> in Jackson (between version 1.1 and 1.2), casued by changing
> configuration method return type from void to "this type". Change was
> made to allow chaining of calls, and is source compatible. But it was
> not realized at the time that it is not binary compatible... hence
> issues.
> 
> Solution is simple; code that configures Jackson ObjectMapper needs to
> be recompiled. This is not a problem for direct usage, but is
> problematic when Jackson is transitive dependency. So in case of  Avro
> one has to recompile avro lib with never Jackson version, or upgrade
> to version that was compiled against later version.
> 
> -+ Tatu +-

Thanks Tatu!

Avro is using Jackson 1.4.2 right now.  So I think Jersey is using 1.1.x or before and its
version is earlier in the classpath.  Would making sure Avro and its Jackson 1.4.2 jar being
first in the classpath work?  Or does the incompatibility go both ways?

The latest jersey-json jar (1.4) depends on jackson 1.5.5.  However, as late as jersey-json
1.3, they were still on Jackson 1.1.
So it looks like at the minimum, upgrading to Jersey 1.4 should help Ta-Chung.  Assuming he
is using jersey-json.

-Scott
Mime
View raw message