OpenJDK fails to compile hadoop 0.23.1

Radim Kolar hsn at filez.com
Thu Apr 5 07:20:52 PDT 2012


ponto:(crawler)/tmp/hadoop-common>java -version
openjdk version "1.6.0_30"
OpenJDK Runtime Environment (build 1.6.0_30-b24)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

fails with:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile 
(default-compile) on project hadoop-mapreduce-client-core: Compilation 
failure: Compilation failure:
[ERROR] 
/tmp/hadoop-common/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java:[93,49] 
incompatible types; inferred type argument(s) 
org.apache.hadoop.mapreduce.Counter,java.lang.Object do not conform to 
bounds of type variable(s) C,G
[ERROR] found   : <C,G>java.lang.String
[ERROR] required: java.lang.String
[ERROR] 
/tmp/hadoop-common/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java:[576,33] 
incompatible types; inferred type argument(s) 
org.apache.hadoop.mapreduce.Counter,java.lang.Object do not conform to 
bounds of type variable(s) C,G
[ERROR] found   : <C,G>java.lang.String
[ERROR] required: java.lang.String
[ERROR] 
/tmp/hadoop-common/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java:[588,36] 
incompatible types; inferred type argument(s) 
org.apache.hadoop.mapreduce.Counter,java.lang.Object do not conform to 
bounds of type variable(s) C,G
[ERROR] found   : <C,G>org.apache.hadoop.mapred.Counters
[ERROR] required: org.apache.hadoop.mapred.Counters

replacing openjdk tools.jar with oracle java 6 tools.jar solved this 
problem  - hadoop compiles fine.



More information about the compiler-dev mailing list