Hi, I discovered that the message reporting a guava version < 19 was incorrect. The datastax driver checks for the existence of the transformAsync method in the Futures class that takes the parameters ListenableFuture and AsyncFunction which was deprecated and removed from guava in version 26.0-jre. Since storm 2.0 uses guava 27.0-jre, this method cannot be found and assumes the guava version is < 19. I also discovered that I am forced to use storms version of guava when I submit my topology despite purposely excluding all guava dependencies from my jar. Is it possible to not use storms guava version and just use the version that datastax is trying to use?
Thanks ________________________________ From: Zac <[email protected]> Sent: Thursday, October 17, 2019 8:54:53 AM To: [email protected] <[email protected]> Subject: Storm 2.0 Guava Issue Hi all, I am having an issue with deploying a topology in Storm 2.0.0. The issue involves Guava. I was building a Storm fat jar with Guava 18.0 and began getting this error when I submitted my topology: INFO c.d.d.c.GuavaCompatibility - Detected Guava < 19 in the classpath, using legacy compatibility layer INFO c.d.d.c.Native - Could not load JNR C Library, native system calls through this library will not be available. INFO c.d.d.c.ClockFactory - Using java.lang.System clock to generate timestamps. ERROR MyClassName – my logged error: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService; \tat com.datastax.driver.core.GuavaCompatibility$Version18OrLower.sameThreadExecutor(GuavaCompatibility.java:185) I upgraded Guava to 19.0 and made sure to exclude all versions of Guava that were not 19.0 and started getting this error (it’s the same error): INFO c.d.d.c.GuavaCompatibility - Detected Guava < 19 in the classpath, using legacy compatibility layer INFO c.d.d.c.Native - Could not load JNR C Library, native system calls through this library will not be.\ INFO c.d.d.c.ClockFactory - Using java.lang.System clock to generate timestamps. ERROR MyClassName – my logged error: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;\n\tat com.datastax.driver.core.GuavaCompatibility$Version18OrLower.sameThreadExecutor(GuavaCompatibility.java:185) I was very confused by this as I did not have any jars of Guava < 19.0 included at all (I checked very thoroughly). Lastly, I tried removing all Guava inclusions and I got the following error: INFO c.d.d.c.GuavaCompatibility - Detected Guava < 19 in the classpath, using legacy compatibility layer ERROR MyClassName – my logged error: java.lang.NoClassDefFoundError: com/google/common/util/concurrent/FutureFallback \tat com.datastax.driver.core.GuavaCompatibility.selectImplementation(GuavaCompatibility.java:136) I am very confused as to how this is detecting a version of Guava when there are none included in the jar. When submitting a topology to storm, does it add in dependency or package in libs? I need to use Guava 19.0 as one of my dependencies relies on it. How can I make sure that 19.0 is the only version being used and that Storm 2.0 does not add any versions of Guava? Thanks
