首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

执行pconline手机网页抓取任务的过程中出现了java.lang.reflect.InvocationTargetException的异常

2012-03-12 
执行pconline手机网页抓取任务的过程中出现了java.lang.reflect.InvocationTargetException的错误我是新手

执行pconline手机网页抓取任务的过程中出现了java.lang.reflect.InvocationTargetException的错误
我是新手,按照书上的操作过程,结果出错了。大神帮小弟看看!!!

1:my.postprocessor.FrontierSchedulerForPconlineMobile|FrontierSchedulerForPconlineMobile是我自己写的一个Frontier扩展。我现在要在heritrix管理页面里面选择他,并把他add进来(具体的我就不详细说了,我相信大家比我熟,应该知道我在说什么),替换org.archive.crawler.postprocessor.FrontierScheduler,如下图:

2:然后我点击add的时候出现了这个错误,如下图:

请问这是什么情况啊???
另外,我把FrontierSchedulerForPconlineMobile类文件的代码贴出来:

Java code
package my.processor;//我要写的是垂直搜索import java.util.logging.Logger;import org.archive.crawler.datamodel.CandidateURI;import org.archive.crawler.postprocessor.FrontierScheduler;public class FrontierSchedulerForPconlineMobile extends FrontierScheduler {    private static Logger LOGGER = Logger.getLogger(FrontierSchedulerForPconlineMobile.class.getName());    public FrontierSchedulerForPconlineMobile(String name) {        super(name);    }    protected void schedule(CandidateURI caUri){        String url=caUri.toString();        try{            if(url.indexOf("product.pconline.com.cn/mobile/")!=-1                    || url.indexOf("product.pconline.com.cn/pdlib/")!=-1                    || url.indexOf("img.pconline.com.cn/images/product/")!=-1                    || url.endsWith(".jpg")                    || url.indexOf("robots.txt")!=-1                    || url.indexOf("dns:")!=-1){                getController().getFrontier().schedule(caUri);            }else{                return ;            }        }catch(Exception e){            e.printStackTrace();        }finally{        }    }}


[解决办法]
我了个去的!my.postprocessor.FrontierSchedulerForPconlineMobile|FrontierSchedulerForPconlineMobile里面的postprocessor要改成processor,这包的名字写错了啊!!新手伤不起啊!嘿嘿,这分还是还给自己吧!!

热点排行
Bad Request.