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]

Reply via email to