[ https://issues.apache.org/jira/browse/KAFKA-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15056988#comment-15056988 ]
ASF GitHub Bot commented on KAFKA-2990: --------------------------------------- GitHub user hachikuji opened a pull request: https://github.com/apache/kafka/pull/675 KAFKA-2990: fix NoSuchMethodError in Pool with cast to ConcurrentMap You can merge this pull request into a Git repository by running: $ git pull https://github.com/hachikuji/kafka KAFKA-2990 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/675.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #675 ---- commit 19a12ca16b4330de90096f1fafffdc5ae7709ead Author: Jason Gustafson <ja...@confluent.io> Date: 2015-12-14T23:36:24Z KAFKA-2990: fix NoSuchMethodError in Pool with cast to ConcurrentMap ---- > NoSuchMethodError when Kafka is compiled with 1.8 and run on 1.7 > ---------------------------------------------------------------- > > Key: KAFKA-2990 > URL: https://issues.apache.org/jira/browse/KAFKA-2990 > Project: Kafka > Issue Type: Bug > Reporter: Jason Gustafson > Assignee: Jason Gustafson > > I saw the following exception in the server logs when Kafka is compiled with > 1.8 jdk and run on a 1.7. > {code} > java.lang.NoSuchMethodError: > java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView; > at kafka.utils.Pool.keys(Pool.scala:79) > at > kafka.coordinator.GroupMetadataManager.kafka$coordinator$GroupMetadataManager$$removeGroupsAndOffsets$1(GroupMetadataManager.scala:483) > at > kafka.coordinator.GroupMetadataManager$$anonfun$removeGroupsForPartition$1.apply$mcV$sp(GroupMetadataManager.scala:465) > at > kafka.utils.KafkaScheduler$$anonfun$1.apply$mcV$sp(KafkaScheduler.scala:110) > at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:60) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > {code} > The keySet() method for ConcurrentHashMap was changed in 1.8 to refer to > KeySetView, which didn't exist in 1.7. To fix it, we just need to make sure > that Pool calls ConcurrentMap.keySet() instead. -- This message was sent by Atlassian JIRA (v6.3.4#6332)