前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Kafka - java.lang.VerifyError: Uninitialized object exists on backward branch 193

Kafka - java.lang.VerifyError: Uninitialized object exists on backward branch 193

作者头像
小小工匠
发布2023-10-27 16:44:43
2070
发布2023-10-27 16:44:43
举报
文章被收录于专栏:小工匠聊架构小工匠聊架构

问题

代码语言:javascript
复制
[root@localhost bin]# ./kafka-server-start.sh ../config/server.properties
[2023-10-25 14:37:59,386] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2023-10-25 14:37:59,697] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.lang.VerifyError: Uninitialized object exists on backward branch 193
Exception Details:
  Location:
    scala/collection/immutable/HashMap$HashTrieMap.split()Lscala/collection/immutable/Seq; @238: goto
  Reason:
    Error exists in the bytecode
  Bytecode:
    0000000: 2ab6 0044 04a0 000f bb00 da59 2ab2 00df
    0000010: b700 e2b0 2ab6 003e b800 523c 1b04 a401
    0000020: 5b1b 056c 3d2a 1b05 6c2a b600 3eb7 00e4
    0000030: 3e2a b600 3e02 1d78 7e36 042a b600 3e02
    0000040: 1020 1d64 7c7e 3605 bb00 1c59 b200 e92a
    0000050: b600 41c0 00eb b600 efb7 00f2 1cb6 00f6
    0000060: 3a06 1906 c600 1a19 06b6 00f9 c000 773a
    0000070: 0719 06b6 00fc c000 773a 08a7 000c bb00
    0000080: fe59 01b7 0101 bf19 073a 0919 083a 0abb
    0000090: 0002 5915 0419 09bb 001c 59b2 00e9 1909
    00000a0: c000 ebb6 00ef b700 f203 b801 073a 0e3a
    00000b0: 0d03 190d b901 0b01 0019 0e3a 1136 1036
    00000c0: 0f15 0f15 10a0 0008 1911 a700 2715 0f04
    00000d0: 6015 1019 0d15 0fb9 010e 0200 c000 053a
    00000e0: 1719 1119 17b8 0112 3a11 3610 360f a7ff
    00000f0: d3b8 0116 b700 803a 0bbb 0002 5915 0519
    0000100: 0abb 001c 59b2 00e9 190a c000 ebb6 00ef
    0000110: b700 f203 b801 073a 133a 1203 1912 b901
    0000120: 0b01 0019 133a 1636 1536 1415 1415 15a0
    0000130: 0008 1916 a700 2715 1404 6015 1519 1215
    0000140: 14b9 010e 0200 c000 053a 1819 1619 18b8
    0000150: 0119 3a16 3615 3614 a7ff d3b8 0116 b700
    0000160: 803a 0cbb 00da 5919 0bbb 00da 5919 0cb2
    0000170: 00df b700 e2b7 00e2 b02a b600 4103 32b6
    0000180: 011b b0
  Stackmap Table:
    same_frame(@20)
    full_frame(@126,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#147]},{})
    append_frame(@135,Object[#119],Object[#119])
    full_frame(@193,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#147],Object[#119],Object[#119],Object[#119],Object[#119],Top,Top,Object[#28],Object[#78],Integer,Integer,Object[#145]},{Uninitialized[#143],Uninitialized[#143],Integer,Object[#119]})
    full_frame(@205,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#147],Object[#119],Object[#119],Object[#119],Object[#119],Top,Top,Object[#28],Object[#78],Integer,Integer,Object[#145]},{Uninitialized[#143],Uninitialized[#143],Integer,Object[#119]})
    full_frame(@241,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#147],Object[#119],Object[#119],Object[#119],Object[#119],Top,Top,Object[#28],Object[#78],Integer,Integer,Object[#145]},{Uninitialized[#143],Uninitialized[#143],Integer,Object[#119],Object[#145]})
    full_frame(@299,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#147],Object[#119],Object[#119],Object[#119],Object[#119],Object[#2],Top,Object[#28],Object[#78],Integer,Integer,Object[#145],Object[#28],Object[#78],Integer,Integer,Object[#145]},{Uninitialized[#249],Uninitialized[#249],Integer,Object[#119]})
    full_frame(@311,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#147],Object[#119],Object[#119],Object[#119],Object[#119],Object[#2],Top,Object[#28],Object[#78],Integer,Integer,Object[#145],Object[#28],Object[#78],Integer,Integer,Object[#145]},{Uninitialized[#249],Uninitialized[#249],Integer,Object[#119]})
    full_frame(@347,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#147],Object[#119],Object[#119],Object[#119],Object[#119],Object[#2],Top,Object[#28],Object[#78],Integer,Integer,Object[#145],Object[#28],Object[#78],Integer,Integer,Object[#145]},{Uninitialized[#249],Uninitialized[#249],Integer,Object[#119],Object[#145]})
    full_frame(@377,{Object[#2],Integer},{})

        at scala.collection.immutable.HashMap$.scala$collection$immutable$HashMap$$makeHashTrieMap(HashMap.scala:340)
        at scala.collection.immutable.HashMap$.scala$collection$immutable$HashMap$$makeHashTrieMap(HashMap.scala:344)
        at scala.collection.immutable.HashMap$HashMap1.updated0(HashMap.scala:390)
        at scala.collection.immutable.HashMap.updated(HashMap.scala:79)
        at scala.collection.immutable.Map$Map4.updated(Map.scala:467)
        at scala.collection.immutable.Map$Map4.$plus(Map.scala:468)
        at scala.collection.immutable.Map$Map4.$plus(Map.scala:430)
        at scala.collection.mutable.MapBuilder.$plus$eq(MapBuilder.scala:32)
        at scala.collection.mutable.MapBuilder.$plus$eq(MapBuilder.scala:28)
        at scala.collection.generic.Growable.$anonfun$$plus$plus$eq$1(Growable.scala:62)
        at scala.collection.generic.Growable$$Lambda$6/315138752.apply(Unknown Source)
        at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
        at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
        at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:38)
        at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:62)
        at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
        at scala.collection.mutable.MapBuilder.$plus$plus$eq(MapBuilder.scala:28)
        at scala.collection.generic.GenMapFactory.apply(GenMapFactory.scala:51)
        at kafka.server.KafkaConfig$.<init>(KafkaConfig.scala:338)
        at kafka.server.KafkaConfig$.<clinit>(KafkaConfig.scala)
        at kafka.Kafka$.buildServer(Kafka.scala:72)
        at kafka.Kafka$.main(Kafka.scala:91)
        at kafka.Kafka.main(Kafka.scala)

排查思路

这玩意儿一看就是JDK版本的问题

问题出在 JDK 次要版本上。 Scala 2.12 需要更新版本的 JDK,然后是 1.8.0_111

我这里的版本虽然看起来对,但是JAVA_HOME不对。 无论运行哪个版本的 JRE,都需要 JAVA_HOME 指向正确的 JDK 版本。

在这里插入图片描述
在这里插入图片描述

解决办法

  1. 要么更新系统默认的JAVA_HOME的值
  2. 要么启动前 export JAVA_HOME

我采用了第二种方法

代码语言:javascript
复制
[root@localhost bin]# export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.382.b05-1.el7_9.x86_64/jre
[root@localhost bin]# ./kafka-server-start.sh ../config/server.properties

问题解决

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2023-10-26,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 问题
  • 排查思路
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档