gpt4 book ai didi

java - 线程 "main"java.lang.VerifyError : Bad type on operand stack 中的异常

转载 作者:可可西里 更新时间:2023-11-01 15:00:18 25 4
gpt4 key购买 nike

此错误已发生在 map-reduce 程序中,用于在给定的 input.txt 文件中查找最高温度。我写了两列,分别是年份和温度。

    Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
org/apache/hadoop/mapred/JobTrackerInstrumentation.create(Lorg/apache/hadoop/mapred/JobTracker;Lorg/apache/hadoop/mapred/JobConf;)Lorg/apache/hadoop/mapred/JobTrackerInstrumentation; @5: invokestatic
Reason:
Type 'org/apache/hadoop/metrics2/lib/DefaultMetricsSystem' (current frame, stack[2]) is not assignable to 'org/apache/hadoop/metrics2/MetricsSystem'
Current Frame:
bci: @5
flags: { }
locals: { 'org/apache/hadoop/mapred/JobTracker', 'org/apache/hadoop/mapred/JobConf' }
stack: { 'org/apache/hadoop/mapred/JobTracker', 'org/apache/hadoop/mapred/JobConf', 'org/apache/hadoop/metrics2/lib/DefaultMetricsSystem' }
Bytecode:
0000000: 2a2b b200 03b8 0004 b0

at org.apache.hadoop.mapred.LocalJobRunner.<init>(LocalJobRunner.java:422)
at org.apache.hadoop.mapred.JobClient.init(JobClient.java:488)
at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:473)
at org.apache.hadoop.mapreduce.Job$1.run(Job.java:513)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)
at org.apache.hadoop.mapreduce.Job.connect(Job.java:511)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:499)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
at com.letsdobigdata.MaxTemperatureDriver.run(MaxTemperatureDriver.java:35)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at com.letsdobigdata.MaxTemperatureDriver.main(MaxTemperatureDriver.java:41)

最佳答案

请尝试将JDK版本降低到7,并从oracle站点下载JDK。

我可以用 JDK 7 解决这个问题。

关于java - 线程 "main"java.lang.VerifyError : Bad type on operand stack 中的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28515890/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com