json-iterator / java

jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go
http://jsoniter.com/
MIT License
1.51k stars 519 forks source link

duplicate class definition for name: "com/jsoniter/IterImpl" when use treaming processing #333

Open mrfeiii opened 1 year ago

mrfeiii commented 1 year ago

22/11/06 08:57:30 ERROR javassist.CannotCompileException: by java.lang.ClassFormatError: loader (instance of org/apache/spark/util/MutableURLClassLoader): attempted duplicate class definition for name: "com/jsoniter/IterImpl" 22/11/06 08:57:30 ERROR : readObject: expect { or , or } or n, but found: , head: 1, peek: , buf: 22/11/06 08:57:30 ERROR Executor: Exception in task 0.0 in stage 0.0 (TID 0) java.lang.RuntimeException: com.jsoniter.spi.JsonException: readObject: expect { or , or } or n, but found: , head: 1, peek: , buf:

kothakokila commented 2 months ago

It seems there might be conflicting or duplicate class definitions, possibly due to the MutableURLClassLoader attempting to load the same class from different sources. Check your classpath or dependencies to ensure there are no conflicting versions of the JSONiter library or other dependencies that might include it.