Github user liancheng commented on the pull request:
https://github.com/apache/spark/pull/2685#issuecomment-61214280
@pwendell Yesterday, I tried to include both Kryo 2.21 and Kryo 2.22 into
the assembly jar, so that both shaded and un-shaded Objenesis should co-exist.
But to my surprise, no matter how I specify the dependencies, the un-shaded
Objenesis classes can never appear in the assembly jar. Then I track down to
the Kryo 2.21 POM on Maven repo [1], and you may see that this POM says
Objenesis is *shaded* in 2.21, but apparently the kryo-2.21.jar binary doesn't
shade Objenesis:
```
$ tree -d kryo-2.21
kryo-2.21
âââ META-INF
â  âââ maven
â  âââ com.esotericsoftware.kryo
â  âââ kryo
âââ com
â  âââ esotericsoftware
â  âââ kryo
â  â  âââ io
â  â  âââ serializers
â  â  âââ util
â  âââ minlog
â  âââ reflectasm
â  âââ shaded
â  âââ org
â  âââ objectweb
â  âââ asm
âââ org -.
âââ objenesis |
âââ instantiator |
â  âââ basic |
â  âââ gcj > Un-shaded Objenesis classes
â  âââ jrockit |
â  âââ perc |
â  âââ sun |
âââ strategy -'
```
[1]
https://repo1.maven.org/maven2/com/esotericsoftware/kryo/kryo/2.21/kryo-2.21.pom
I'm not very familiar with Maven plugin behaviors, but I guess while
building the assembly jar, the `maven-shade-plugin` reads the inconsistent Kryo
2.21 POM retrieved from Maven repo, and always shades Objenesis, which directly
causes the class not found error we saw in test failures.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]