avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Gibbs <ian.gi...@virtualclarity.com>
Subject Jackson version problem?
Date Thu, 17 Sep 2015 11:11:13 GMT
Dear list,

I'm trying to use the Schema parser. When I do so, I get the java error
"Cannot inherit from final class", apparently at the point where a
Jackson ObjectMapper is created.

Exception in thread "main" java.lang.VerifyError: Cannot inherit from
final class
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
     at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     at org.apache.avro.Schema.<clinit>(Schema.java:81)

The relevant part of the Schema code is:

79: public abstract class Schema extends JsonProperties {
80:  static final JsonFactory FACTORY = new JsonFactory();
81:  static final ObjectMapper MAPPER = new ObjectMapper(FACTORY);

I infer that the Schema class is creating an ObjectMapper in a way that
causes it to be extended, and expects it to be extendable, but it isn't.
But if I look at the source for the ObjectMapper, it would appear the
class isn't final:

57 public class  [More ...] ObjectMapper
58  extends ObjectCodec
59  implements Versioned
60  {

So perhaps my inference is wrong. Can someone help, please? I have
following in my CP:

jackson-asl-0.9.5
jackson-core-asl-1.9.13
jackson-mapper-asl-1.9.13
avro-1.7.7

The Getting Started page
(http://avro.apache.org/docs/1.7.7/gettingstartedjava.html) doesn't
define which version of Jackson I should have.

Ian



Mime
View raw message