Reply
New Contributor
Posts: 4
Registered: ‎08-29-2018

setup a multi-broker /Kafka/ exception

Hello,

 

I would like to set up a multi-broker cluster (kafka) and I followed the instruction on the apache kafka website.

  • I created config-files for each broker and edited them
    • cp config/server.properties config/server.1.properties
    • cp config/server.properties config/server.2.properties
    • cp config/server.properties config/server.3.properties
  • then I tried to start the brokers
    • /bin/kafka-server-start.sh conf/server.1.properties    

 

 

But I get following exception:

 

  1. Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/kafka/common/utils/KafkaThread : Unsupported major.minor version 51.0
  2. at java.lang.ClassLoader.defineClass1(Native Method)
  3. at java.lang.ClassLoader.defineClass(ClassLoader.java:648)
  4. at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  5. at java.net.URLClassLoader.defineClass(URLClassLoader.java:272)
  6. at java.net.URLClassLoader.access$000(URLClassLoader.java:68)
  7. at java.net.URLClassLoader$1.run(URLClassLoader.java:207)
  8. at java.net.URLClassLoader$1.run(URLClassLoader.java:201)
  9. at java.security.AccessController.doPrivileged(Native Method)
  10. at java.net.URLClassLoader.findClass(URLClassLoader.java:200)
  11. at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
  12. at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:296)
  13. at java.lang.ClassLoader.loadClass(ClassLoader.java:270)
  14. at kafka.utils.Log4jController$.<init>(Log4jController.scala:30)
  15. at kafka.utils.Log4jController$.<clinit>(Log4jController.scala)
  16. at kafka.utils.Logging$class.$init$(Logging.scala:29)
  17. at com.cloudera.kafka.wrap.Kafka$.<init>(Kafka.scala:28)
  18. at com.cloudera.kafka.wrap.Kafka$.<clinit>(Kafka.scala)
  19. at com.cloudera.kafka.wrap.Kafka.main(Kafka.scala)

 

Can someone help me with the exception? I do not know what to do now.

 

Highlighted
Cloudera Employee
Posts: 12
Registered: ‎04-24-2017

Re: setup a multi-broker /Kafka/ exception

Hi,

Seems like you are using jdk 1.7 which is not compatible with the kafka
version being used. Using jdk 1.8 should resolve this issue. Also see the
following link:

https://stackoverflow.com/questions/10382929/how-to-fix-java-lang-unsupportedclassversionerror-unsup...


Regards
Bimal
Announcements
New solutions