Jobs with tCassandra and tHDFS components fail due to two Guava library versions

Talend Version       6.2.1

Summary

Jobs that contain tCassandra components and tHDFS or tRest components are failing due to two different versions of the Guava library in the Job build.
Additional Versions  
Product Big Data
Component HDFS Cassandra NoSQL Studio
Problem Description

A standard Talend Job 6.2.1 is composed of tCassandra components (such as tCassandraIntput) and tHDFS components (such as tHDFSOutput).

 

When running this Job, it fails with a java.lang.NoSuchMethodError exception, and the following Java Exception Stack:

Exception in thread "main" java.lang.NoSuchMethodError:
com.google.common.util.concurrent.Futures.withFallback
(Lcom/google/common/util/concurrent/ListenableFuture;Lcom/google/common/util/concurrent/FutureFallback;Ljava/util/concurrent/Executor;)
Lcom/google/common/util/concurrent/ListenableFuture;
at com.datastax.driver.core.Connection.initAsync(Connection.java:177)
at com.datastax.driver.core.Connection$Factory.open(Connection.java:731)
at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:251)
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:199)
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1414)
at com.datastax.driver.core.Cluster.init(Cluster.java:162)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:308)
at com.datastax.driver.core.Cluster.connect(Cluster.java:250)
Problem root cause

Checking the build of the Job, you see that run script of the Job contains two versions of the guava library:

  • guava-11.0.2.jar
  • guava-16.0.1.jar

The method withFallback of the com.google.common.util.concurrent.Futures class does not exist in the guava-11.0.2.jar library, but it does in the guava-16.0.1.jar library, and this is causing the issue.

 

A similar issue can also occur when tCassandra components such as tCassandraInput, and tRest components such as tRestClient, appear within a same Job.

 

When executing such a Job, an IllegalStateException exception will be thrown with the following Java Exception Stack:

Caused by: 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.
at com.datastax.driver.core.SanityChecks.checkGuava(SanityChecks.java:62)
at com.datastax.driver.core.SanityChecks.check(SanityChecks.java:36)
at com.datastax.driver.core.Cluster.<clinit>(Cluster.java:67)
Solution or Workaround

Against Talend 6.2.1, the solution consists of applying patch Patch_20170615_TPS-1980_v1-6.2.1.zip.

 

Apply this patch manually

  1. Create a folder named patches under your Studio installer directory.
  2. Copy the patch .zip file to this folder.
  3. Restart Studio, which will display a prompt window the first time.
  4. Click OK to install the patch.

 

Install by updating from TAC (Studio)

  1. Log in to TAC and switch to Configuration > Software Update. Fill in the correct value, then click Save.
  2. Switch to the Software update page. You should see the new patch.
  3. Download the patch, which will be stored in Nexus.
  4. On the Studio side, log in to Studio using remote mode.
  5. On the login page, click Update to install the patch.

 

Install by updating from TAC (CommandLine)

Execute these commands:

Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
checkAndUpdate -tu {TAC login username} -tup {TAC login password}

 

Install patch manually without TAC (supported only after version Talend 6.2.1)

  1. Create a folder named patches under your Studio installer directory.
  2. Copy the patch .zip file to this folder.
  3. Restart Studio, which will display a prompt window the first time.
  4. Click OK or restart CommandLine. The patch will be installed automatically.
JIRA ticket number  
Version history
Revision #:
26 of 26
Last update:
‎09-29-2018 12:18 AM
Updated by: