Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caused by: java.lang.VerifyError: class proto.PoseidonIf$DocIdList$Builder #15

Open
shillyyour opened this issue Jan 19, 2017 · 3 comments

Comments

@shillyyour
Copy link

在hadoop2.6.0上运行index目录下的start.sh,报错:
Caused by: java.lang.VerifyError: class proto.PoseidonIf$DocIdList$Builder overrides final method mergeUnknownFields.(Lcom/google/protobuf/UnknownFieldSet;)Lcom/google/protobuf/GeneratedMessage$Builder;
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at proto.PoseidonIf$DocIdList.toBuilder(PoseidonIf.java:1572)
at proto.PoseidonIf$DocIdList.newBuilder(PoseidonIf.java:1564)
at InvertedIndex.ReduceGroupData$MetaData.(ReduceGroupData.java:15)
at InvertedIndex.ReduceGroupData.runGroup(ReduceGroupData.java:54)
at InvertedIndex.InvertedIndexGenerateReducer.runAsMemory(InvertedIndexGenerateReducer.java:183)
at InvertedIndex.InvertedIndexGenerateReducer.reduce(InvertedIndexGenerateReducer.java:118)
at InvertedIndex.InvertedIndexGenerateReducer.reduce(InvertedIndexGenerateReducer.java:32)
at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:171)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:627)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
at org.apache.hadoop.mapred.LocalJobRunner$Job$ReduceTaskRunnable.run(LocalJobRunner.java:319)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

在当前用户下可以执行protoc命令,说明protobuf安装成功的.代码是2017-01-16从github下载编译的

@liwei-ch
Copy link
Contributor

mr任务在启动的时候会通过‘DistributedCache.addFileToClassPath’,将依赖的jar分发到各个节点上后并设置到该任务的配置文件的;
所以检查下任务的conf中是否存在以下两项配置:
mapreduce.job.classpath.files
mapreduce.job.user.classpath.first

@shillyyour
Copy link
Author

已经在mapred-site.xml增加了两个配置,hadoop也读到了(因为路径错误,运行报错),但是运行start.sh,还是报错。hadoop上跑job是正常的,已经验证。能提供点思路,应该往哪个方向去定位呢?或者能否屏蔽掉这行代码?

@liwei-ch
Copy link
Contributor

检查下 yarn-site.xml 检查下是否存在:yarn.application.classpath
或者检查下mapreduce-site.xml 是否存在:mapreduce.application.classpath
如果没有请自行加上;
如果还是不行,并且你的hadoop是单机版的,请自行将
yarn.application.classpath 或者mapreduce.application.classpath 中的protobuf-java-2.5.0.jar 替换成protobuf-java-3.1.0.jar;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants