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

correct cassandra-driver-dse exclusions #47

Merged
merged 1 commit into from Dec 1, 2015
Merged

correct cassandra-driver-dse exclusions #47

merged 1 commit into from Dec 1, 2015

Conversation

d-t-w
Copy link
Collaborator

@d-t-w d-t-w commented Dec 1, 2015

Alia uses the shaded version of the Datastax Java Driver, that suits me because I run a suite of applications that are built on Netty, and sometimes the version that I'm using (current: 4.0.30) differs from that of the driver (current: 4.0.27).

Alia includes com.datastax.cassandra/cassandra-driver-dse which has a dependency on com.datastax.cassandra/cassandra-driver-core (not shaded), originally I excluded netty from dse:

[com.datastax.cassandra/cassandra-driver-dse ~driver-version :exclusions [io.netty/*]]

more correctly, that driver-dse should exclude driver-core

[com.datastax.cassandra/cassandra-driver-dse ~driver-version :exclusions [com.datastax.cassandra/cassandra-driver-core]]

Otherwise it's possible (happens in my Jenkins builds) that the non-shaded version of driver-core supersedes shaded on the classpath, but there's no Netty (it's been excluded) and you see an error like:

Caused by: java.lang.NoClassDefFoundError: io/netty/util/Timer
    at com.datastax.driver.core.Cluster$Builder.<init>(Cluster.java:685)
    at com.datastax.driver.core.Cluster.builder(Cluster.java:193)
    at qbits.alia$cluster.invoke(alia.clj:183)
    at smx.eventstore.cassandra.core$eval13118$__GT_cluster__13119$fn__13120.invoke(core.clj:197)
    at smx.eventstore.cassandra.core$eval13118$__GT_cluster__13119.invoke(core.clj:194)

For more info, see the similar example of excluding driver-core from cassandra-driver-mapper here:

https://github.com/datastax/java-driver/blob/4a17af6af768b77796055dba9ba1e12bd1098b45/features/shaded_jar/README.md

@mpenet
Copy link
Owner

mpenet commented Dec 1, 2015

Good catch, thanks! I ll release shortly

mpenet added a commit that referenced this pull request Dec 1, 2015
correct cassandra-driver-dse exclusions
@mpenet mpenet merged commit 0c9400d into mpenet:master Dec 1, 2015
@mpenet
Copy link
Owner

mpenet commented Dec 1, 2015

released as [cc.qbits/alia "2.12.1"]

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