运行简单的hadoop程序时获取类强制转换异常

时间:2019-09-03 03:42:43

标签: hadoop mapreduce

我正在尝试从eclipse运行一个简单的hadoop程序,并且遇到了以下异常。请帮助解决该问题**

2019-09-02 21:32:13,528 WARN  [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.java:createSortingCollector(417)) - Unable to initialize MapOutputCollector org.apache.hadoop.mapred.MapTask$MapOutputBuffer
java.lang.ClassCastException: interface javax.xml.soap.Text
    at java.lang.Class.asSubclass(Unknown Source)
    at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:903)
    at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1018)
    at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:408)
    at org.apache.hadoop.mapred.MapTask.access$100(MapTask.java:82)
    at org.apache.hadoop.mapred.MapTask$NewOutputCollector.<init>(MapTask.java:710)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:782)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
    at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:271)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

1 个答案:

答案 0 :(得分:0)

当您打算导入/*C# Code Behind*/ public string BaseUrl {get {return "http://127.0.0.1:8080";}} /*HTML/.apx*/ <link href="<%=this.BaseUrl%>/assets/plugins/timepicker/bootstrap-timepicker.min.css" rel="stylesheet" /> <link href="<%=this.BaseUrl%>/assets/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet" /> <link href="<%=this.BaseUrl%>/assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" /> 时,您已经导入了runat=server