NoSuchMethodError when using in hadoop mapper

534 views
Skip to first unread message

hyunju...@gmail.com

unread,
Mar 28, 2014, 5:18:45 AM3/28/14
to guava-...@googlegroups.com
Hi guys,

When using BloomFilter in hadoop mapper I got this;
java.lang.NoSuchMethodError: com.google.common.hash.BloomFilter.put(Ljava/lang/Object;)Z

It never happens using from local. Please tell me your any thoughts.

Thanks.

Kurt Alfred Kluever

unread,
Mar 28, 2014, 9:52:09 AM3/28/14
to hyunju...@gmail.com, guava-discuss
While I can't be certain, I'd guess that the Hadoop library is also compiling in a (older) version of Guava. If they also depend on Guava, but it's an older version (perhaps without the BloomFilter API), then there are 2 versions on the classpath at runtime, and it's a toss up which you'll get.

More info:


--
--
guava-...@googlegroups.com
Project site: http://guava-libraries.googlecode.com
This group: http://groups.google.com/group/guava-discuss
 
This list is for general discussion.
To report an issue: http://code.google.com/p/guava-libraries/issues/entry
To get help: http://stackoverflow.com/questions/ask (use the tag "guava")
---
You received this message because you are subscribed to the Google Groups "guava-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guava-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/guava-discuss/7992b052-1152-41c0-9fdb-9f9555675fc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
kak

Ray Conner

unread,
Mar 28, 2014, 1:22:59 PM3/28/14
to guava-...@googlegroups.com, hyunju...@gmail.com
That is definitely the case. Hadoop used to jar-jar guava to avoid this, and then they stopped doing that. The version of hadoop I use is stuck on Guava 11. You need to isolate your usage of Guava from theirs, which means jar-jar, maven shade, OSGI, or similar.

- Ray A. Conner
Reply all
Reply to author
Forward
0 new messages