Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK-72: Added missing dependencies used for relocation when creating shaded jar #71

Merged
merged 1 commit into from Sep 25, 2016
Merged

Conversation

ghost
Copy link

@ghost ghost commented Sep 22, 2016

The SDK has some dependencies that can conflict with Jersey 2.0. To resolve this, an option to create a shaded JAR is provided here.

Creating a shaded JAR file includes all the dependencies of the SDK in a single JAR while modifying the namespace of the included dependencies to avoid conflict. However, not all dependencies are relocated in the POM file; dependencies with the namespace com.fasterxml.jackson are missed.

The above issue throws the following exception in the ResultStreamer class when the results of the query are returned in an S3 file format:

Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ObjectMapper.configure(Lhidden/com/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/fasterxml/jackson/databind/ObjectMapper;
    at hidden.com.amazonaws.internal.config.InternalConfig.<clinit>(InternalConfig.java:43)
    at hidden.com.amazonaws.internal.config.InternalConfig$Factory.<clinit>(InternalConfig.java:304)
    at hidden.com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:139)
    at hidden.com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:134)
    at hidden.com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:95)
    at hidden.com.amazonaws.ClientConfiguration.<clinit>(ClientConfiguration.java:60)
    at hidden.com.amazonaws.ClientConfigurationFactory.getDefaultConfig(ClientConfigurationFactory.java:46)
    at hidden.com.amazonaws.ClientConfigurationFactory.getConfig(ClientConfigurationFactory.java:35)
    at hidden.com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:304)
    at com.qubole.qds.sdk.java.client.ResultStreamer.newS3Client(ResultStreamer.java:117)

Adding the missing dependencies for relocation in the POM file.

Fixes issue: #72

The SDK has some dependencies that can conflict with Jersey 2.0.
To resolve this, an option to create a shaded JAR is provided:
https://github.com/qubole/qds-sdk-java#jersey-20

Creating a shaded JAR file includes all the dependencies of the SDK
in a single JAR while modifying the namespace of the included
dependencies to avoid conflict. However, not all dependencies are
relocated in the POM file; dependencies with the namespace
`com.fasterxml.jackson` are missed.

Adding the missing dependencies for relocation in the POM file.
@ghost ghost changed the title Added missing dependencies used for relocation when creating shaded jar SDK-72: Added missing dependencies used for relocation when creating shaded jar Sep 22, 2016
@amoghmargoor amoghmargoor merged commit c65ad6a into qubole:master Sep 25, 2016
@amoghmargoor
Copy link
Contributor

@nimbudew Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants