Thanks Stephan, problem solved.
here is my configuration
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>my.main.class</mainClass>
</transformer>
</transformers>
<relocations>
<relocation>
<pattern>org.apache.http</pattern>
<shadedPattern>org.apache.shaded.http</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons</pattern>
<shadedPattern>org.apache.shaded.commons</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
/Andrew
> On 18 Feb 2016, at 14:02, Stephan Ewen <[email protected]> wrote:
>
> Hi!
>
> A lot of those dependencies are pulled in by Hadoop (for example the
> configuration / HTTP components).
>
> In 1.0-SNAPSHOT, the HTTP components dependency has been shaded away in
> Hadoop, so it should not bother you any more.
>
> One solution you can always do is to "shade" your dependencies in your fat
> jar. Shading relocates the classes (and rewrites your code) so the
> dependencies do not conflict, but co-exist in different namespaces.
>
> Greetings,
> Stephan
>
>
> On Thu, Feb 18, 2016 at 1:56 PM, Andrew Ge Wu <[email protected]
> <mailto:[email protected]>> wrote:
> Hi guys,
>
> You probably have noticed. I found a lot of old dependencies (http component
> 3.1/apache configuration 1.6 etc..) in Flink and leads up errors to stuff
> like this:
> java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.http.conn.ssl.SSLConnectionSocketFactory
>
> Is there anyway to get around this?
>
> Thanks!
>
>
> Andrew
> --
> Confidentiality Notice: This e-mail transmission may contain confidential
> or legally privileged information that is intended only for the individual
> or entity named in the e-mail address. If you are not the intended
> recipient, you are hereby notified that any disclosure, copying,
> distribution, or reliance upon the contents of this e-mail is strictly
> prohibited and may be unlawful. If you have received this e-mail in error,
> please notify the sender immediately by return e-mail and delete all copies
> of this message.
>
--
Confidentiality Notice: This e-mail transmission may contain confidential
or legally privileged information that is intended only for the individual
or entity named in the e-mail address. If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution, or reliance upon the contents of this e-mail is strictly
prohibited and may be unlawful. If you have received this e-mail in error,
please notify the sender immediately by return e-mail and delete all copies
of this message.