version 2.2.6 IncompatibleClassChangeError

615 views
Skip to first unread message

1226...@qq.com

unread,
Nov 11, 2014, 3:33:02 AM11/11/14
to json-schem...@googlegroups.com
Hi all,

    When the validate is executed ,below error is throwed...
    I  check the JsonNumEquals class that it do extend a interface???  The class even can not compile in my IDE. Could anybody help me? Thanks!
java.lang.IncompatibleClassChangeError: class com.github.fge.jackson.JsonNumEquals has interface com.google.common.base.Equivalence as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.github.fge.jsonschema.core.keyword.syntax.checkers.common.EnumSyntaxChecker.<clinit>(EnumSyntaxChecker.java:46)
at com.github.fge.jsonschema.core.keyword.syntax.dictionaries.CommonSyntaxCheckerDictionary.<clinit>(CommonSyntaxCheckerDictionary.java:152)
at com.github.fge.jsonschema.core.keyword.syntax.dictionaries.DraftV4SyntaxCheckerDictionary.<clinit>(DraftV4SyntaxCheckerDictionary.java:59)
at com.github.fge.jsonschema.library.DraftV4Library.<clinit>(DraftV4Library.java:32)
at com.taobao.sell.service.rule.jsonSchema.JsonSchemaRuleImpl.validate(JsonSchemaRuleImpl.java:47)

Francis Galiegue

unread,
Nov 11, 2014, 5:36:44 AM11/11/14
to 1226...@qq.com, json-schem...@googlegroups.com
Hello,

On Tue, Nov 11, 2014 at 9:33 AM, <1226...@qq.com> wrote:
> Hi all,
>
> When the validate is executed ,below error is throwed...
> I check the JsonNumEquals class that it do extend a interface??? The
> class even can not compile in my IDE. Could anybody help me? Thanks!
> java.lang.IncompatibleClassChangeError: class
> com.github.fge.jackson.JsonNumEquals has interface
> com.google.common.base.Equivalence as super class
> at java.lang.ClassLoader.defineClass1(Native Method)
> [snip]

The fact that it does not compile on your IDE and the exception are unrelated.

For the first, it means you don't have the necessary dependencies;
also, what is the compile error?

As to the second, I've had someone mail me recently with exactly the
same problem: it appeared that he used weblogic, which used a modified
version of Guava; the solution here is to make your container
(weblogic or other) use the version of Guava this library depends on?

Regards,
--
Francis Galiegue, fgal...@gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)

1226...@qq.com

unread,
Nov 17, 2014, 1:37:57 AM11/17/14
to json-schem...@googlegroups.com
Dear Galiegue,
 
   Thanks!

   Yes,you are right. In my parent maven project,it include a old version of "guava".  

   

在 2014年11月11日星期二UTC+8下午4时33分02秒,1226...@qq.com写道:
Reply all
Reply to author
Forward
0 new messages