You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Eamon Kavanagh <ka...@gmail.com> on 2016/06/26 15:46:22 UTC

Cassandra Connector Problem (Possible Guava Conflict?)

Hey everyone,

I'm having an issue using the Flink -> Cassandra connector.  The error
message I get is:



*Class com.datastax.driver.core.DefaultResultSetFuture does not implement
the requested interface
org.apache.flink.shaded.com.google.common.util.concurrent.ListenableFuture*
I believe the problem is related to this (
https://github.com/apache/flink/pull/2133) pull request but it still
results in this error.  Does anyone have any advice on how to debug it?

Thanks,
Eamon

Re: Cassandra Connector Problem (Possible Guava Conflict?)

Posted by AndreaKinn <ki...@hotmail.it>.
Hi,
I have the same problem but trying your solution so substituting this:

<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-shade-plugin</artifactId>
						<version>2.4.1</version>
						<executions>
							<execution>
							   	<phase>package</phase>
								<goals>
									<goal>shade</goal>
								</goals>
								<configuration>
									<artifactSet>
										<excludes combine.self="override"></excludes>
									</artifactSet>
								</configuration>
							</execution>
						</executions>
					</plugin>

with :

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.1</version>
                <executions>
                    
                    <execution>
                        <id>shade-flink</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration combine.self="override">
                            <artifactSet>
                                <includes>
                                   
<include>com.datastax.cassandra:cassandra-driver-core</include>
                                   
<include>com.datastax.cassandra:cassandra-driver-mapping</include>
                                   
<include>com.google.guava:guava</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>com.google</pattern>
                                   
<shadedPattern>org.apache.flink.cassandra.shaded.com.google</shadedPattern>
                                    <excludes>
                                       
<exclude>com.google.protobuf.**</exclude>
                                       
<exclude>com.google.inject.**</exclude>
                                    </excludes>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Eclipse shows me a non specified error:                         
<configuration combine.self="override">




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: Cassandra Connector Problem (Possible Guava Conflict?)

Posted by Eamon Kavanagh <ka...@gmail.com>.
Perfect, that worked.  Thanks!

On Sun, Jun 26, 2016 at 12:56 PM, Chesnay Schepler <ch...@apache.org>
wrote:

> Replace the maven shade plugin section in the flink-cassandra pom with the
> following,
> or apply the additions(in bold) manually:
>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-shade-plugin</artifactId>
>                 <version>2.4.1</version>
>                 <executions>
>                     <!-- Run shade goal on package phase -->
>                     <execution>
>                         *<id>shade-flink</id>*
>                         <phase>package</phase>
>                         <goals>
>                             <goal>shade</goal>
>                         </goals>
>                         <configuration* combine.self="override"*>
>                             <artifactSet>
>                                 <includes>
>
> <include>com.datastax.cassandra:cassandra-driver-core</include>
>
> <include>com.datastax.cassandra:cassandra-driver-mapping</include>
>
> <include>com.google.guava:guava</include>
>                                 </includes>
>                             </artifactSet>
>                             <relocations>
>                                 <relocation>
>                                     <pattern>com.google</pattern>
>
> <shadedPattern>org.apache.flink.cassandra.shaded.com.google</shadedPattern>
>                                     <excludes>
>
> <exclude>com.google.protobuf.**</exclude>
>
> <exclude>com.google.inject.**</exclude>
>                                     </excludes>
>                                 </relocation>
>                             </relocations>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
>
>
> On 26.06.2016 18:00, Eamon Kavanagh wrote:
>
> Hey Chesnay,
>
> Thanks for the response.  Is there anything I can do in the short term to
> skirt the issue?
>
> On Sun, Jun 26, 2016 at 11:55 AM, Chesnay Schepler < <ch...@apache.org>
> chesnay@apache.org> wrote:
>
>> The problem is that the cassandra jar currently contains 2 shaded guavas.
>> I already have a fix ready that suppressed the root-poms shade plugin
>> configuration inside the cassandra submit.
>>
>> I will submit that next week.
>>
>>
>> On 26.06.2016 17:46, Eamon Kavanagh wrote:
>>
>> Hey everyone,
>>
>> I'm having an issue using the Flink -> Cassandra connector.  The error
>> message I get is:
>>
>>
>>
>> *Class com.datastax.driver.core.DefaultResultSetFuture does not implement
>> the requested interface
>> org.apache.flink.shaded.com.google.common.util.concurrent.ListenableFuture *
>> I believe the problem is related to this (
>> <https://github.com/apache/flink/pull/2133>
>> https://github.com/apache/flink/pull/2133) pull request but it still
>> results in this error.  Does anyone have any advice on how to debug it?
>>
>> Thanks,
>> Eamon
>>
>>
>>
>
>

Re: Cassandra Connector Problem (Possible Guava Conflict?)

Posted by Chesnay Schepler <ch...@apache.org>.
Replace the maven shade plugin section in the flink-cassandra pom with 
the following,
or apply the additions(in bold) manually:

             <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
                 <version>2.4.1</version>
                 <executions>
                     <!-- Run shade goal on package phase -->
                     <execution>
*<id>shade-flink</id>*
                         <phase>package</phase>
                         <goals>
                             <goal>shade</goal>
                         </goals>
                         <configuration*combine.self="override"*>
                             <artifactSet>
                                 <includes>
<include>com.datastax.cassandra:cassandra-driver-core</include>
<include>com.datastax.cassandra:cassandra-driver-mapping</include>
<include>com.google.guava:guava</include>
                                 </includes>
                             </artifactSet>
                             <relocations>
                                 <relocation>
<pattern>com.google</pattern>
<shadedPattern>org.apache.flink.cassandra.shaded.com.google</shadedPattern>
                                     <excludes>
<exclude>com.google.protobuf.**</exclude>
<exclude>com.google.inject.**</exclude>
                                     </excludes>
                                 </relocation>
                             </relocations>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>

On 26.06.2016 18:00, Eamon Kavanagh wrote:
> Hey Chesnay,
>
> Thanks for the response.  Is there anything I can do in the short term 
> to skirt the issue?
>
> On Sun, Jun 26, 2016 at 11:55 AM, Chesnay Schepler <chesnay@apache.org 
> <ma...@apache.org>> wrote:
>
>     The problem is that the cassandra jar currently contains 2 shaded
>     guavas.
>     I already have a fix ready that suppressed the root-poms shade
>     plugin configuration inside the cassandra submit.
>
>     I will submit that next week.
>
>
>     On 26.06.2016 17:46, Eamon Kavanagh wrote:
>>     Hey everyone,
>>
>>     I'm having an issue using the Flink -> Cassandra connector.  The
>>     error message I get is:
>>
>>     *Class com.datastax.driver.core.DefaultResultSetFuture does not
>>     implement the requested interface
>>     org.apache.flink.shaded.com.google.common.util.concurrent.ListenableFuture
>>
>>     *
>>     I believe the problem is related to this
>>     (https://github.com/apache/flink/pull/2133) pull request but it
>>     still results in this error.  Does anyone have any advice on how
>>     to debug it?
>>
>>     Thanks,
>>     Eamon
>
>


Re: Cassandra Connector Problem (Possible Guava Conflict?)

Posted by Eamon Kavanagh <ka...@gmail.com>.
Hey Chesnay,

Thanks for the response.  Is there anything I can do in the short term to
skirt the issue?

On Sun, Jun 26, 2016 at 11:55 AM, Chesnay Schepler <ch...@apache.org>
wrote:

> The problem is that the cassandra jar currently contains 2 shaded guavas.
> I already have a fix ready that suppressed the root-poms shade plugin
> configuration inside the cassandra submit.
>
> I will submit that next week.
>
>
> On 26.06.2016 17:46, Eamon Kavanagh wrote:
>
> Hey everyone,
>
> I'm having an issue using the Flink -> Cassandra connector.  The error
> message I get is:
>
>
>
> *Class com.datastax.driver.core.DefaultResultSetFuture does not implement
> the requested interface
> org.apache.flink.shaded.com.google.common.util.concurrent.ListenableFuture *
> I believe the problem is related to this (
> <https://github.com/apache/flink/pull/2133>
> https://github.com/apache/flink/pull/2133) pull request but it still
> results in this error.  Does anyone have any advice on how to debug it?
>
> Thanks,
> Eamon
>
>
>

Re: Cassandra Connector Problem (Possible Guava Conflict?)

Posted by Chesnay Schepler <ch...@apache.org>.
The problem is that the cassandra jar currently contains 2 shaded guavas.
I already have a fix ready that suppressed the root-poms shade plugin 
configuration inside the cassandra submit.

I will submit that next week.

On 26.06.2016 17:46, Eamon Kavanagh wrote:
> Hey everyone,
>
> I'm having an issue using the Flink -> Cassandra connector.  The error 
> message I get is:
>
> *Class com.datastax.driver.core.DefaultResultSetFuture does not 
> implement the requested interface 
> org.apache.flink.shaded.com.google.common.util.concurrent.ListenableFuture
>
> *
> I believe the problem is related to this 
> (https://github.com/apache/flink/pull/2133) pull request but it still 
> results in this error.  Does anyone have any advice on how to debug it?
>
> Thanks,
> Eamon