执行pconline手机网页抓取任务的过程中出现了java.lang.reflect.InvocationTargetException的错误
我是新手,按照书上的操作过程,结果出错了。大神帮小弟看看!!!
1:my.postprocessor.FrontierSchedulerForPconlineMobile|FrontierSchedulerForPconlineMobile是我自己写的一个Frontier扩展。我现在要在heritrix管理页面里面选择他,并把他add进来(具体的我就不详细说了,我相信大家比我熟,应该知道我在说什么),替换org.archive.crawler.postprocessor.FrontierScheduler,如下图:
2:然后我点击add的时候出现了这个错误,如下图:
请问这是什么情况啊???
另外,我把FrontierSchedulerForPconlineMobile类文件的代码贴出来:
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{ } }}