class com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text

运行mapreduce遇到的奇芭的错:

java.lang.ClassCastException: classcom.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text

    atjava.lang.Class.asSubclass(Unknown Source)

    atorg.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:774)

    atorg.apache.hadoop.mapred.MapTask$MapOutputBuffer.<init>(MapTask.java:959)

    atorg.apache.hadoop.mapred.MapTask$NewOutputCollector.<init>(MapTask.java:674)

    atorg.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:756)

    atorg.apache.hadoop.mapred.MapTask.run(MapTask.java:370)

    atorg.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:214)

14/02/26 14:37:30 INFOmapred.JobClient:  map 0% reduce 0%

14/02/26 14:37:30 INFOmapred.JobClient: Job complete: job_local_0001

14/02/26 14:37:30 INFO mapred.JobClient:Counters: 0


弄了半天原来是Text的包导错了

不是:import com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider.Text;

而是:import org.apache.hadoop.io.Text;


郁闷。。。。


你可能感兴趣的:(eclipse,mapreduce,hadoop,jar)