cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jorgensen <and...@andrewjorgensen.com>
Subject Re: Guava version check in 3.0
Date Thu, 11 Feb 2016 22:06:10 GMT
To answer my own question I was able to shade the dependencies in my jar
which fixed the issue and allow the job to run on Hadoop

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <configuration>
                    <relocations>
                        <relocation>
                            <pattern>com.google.common</pattern>
                            <shadedPattern>com.foo.com.google.common</shadedPattern>
                        </relocation>
                    </relocations>
                    <finalName>${project.artifactId}-${project.version}-jar-with-dependencies</finalName>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                            <transformers>
                                <transformer
                                implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>${main.class}</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

-- 
Andrew Jorgensen
@ajorgensen

On Thu, Feb 11, 2016, at 03:40 PM, Andrew Jorgensen wrote:
> Hello,
> 
> I am trying to get a cassandra v3.0 cluster up and running with the
> v3.0.0 of the datastax client. I am hitting a number of cases where I am
> running into the following exception:
> 
> java.lang.IllegalStateException: Detected Guava issue #1635 which
> indicates that a version of Guava less than 16.01 is in use.  This
> introduces codec resolution issues and potentially other incompatibility
> issues in the driver.  Please upgrade to Guava 16.01 or later.
> 
> I was wondering if there are any potential work arounds. There are some
> cases where I can work around this issue because I am able to control
> the dependency but there are a number of cases (Hadoop) where Guava is a
> provided dependency and currently set at v11.0.2. As such I cannot work
> around the version of Guava and as such cannot use the datastax driver
> in this context. Are there any work around to getting the driver working
> with older versions of Guava or would it be possible to turn off the
> sanity check?
> 
> Thanks,
> -- 
> Andrew Jorgensen
> @ajorgensen

Mime
View raw message