[ 
https://issues.apache.org/jira/browse/KAFKA-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ewen Cheslack-Postava resolved KAFKA-2990.
------------------------------------------
       Resolution: Fixed
    Fix Version/s: 0.9.1.0
                   0.9.0.1

Issue resolved by pull request 675
[https://github.com/apache/kafka/pull/675]

> 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
>             Fix For: 0.9.0.1, 0.9.1.0
>
>
> 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)

Reply via email to