ARI-4528 avoid this exception

2016-02-18 01:44:46.434 SEVERE thread-51 org.archive.crawler.spring.SheetOverlaysManager.applyOverlaysTo() problem determining whether to apply overlays, so not applying [ignoreCookies] to https://static.xx.fbcdn.net/rsrc.php/v2/yY/r/z9xrgSKFbeZ.js
java.lang.NullPointerException
        at org.archive.spring.KeyedProperties.get(KeyedProperties.java:65)
        at org.archive.modules.deciderules.DecideRule.getEnabled(DecideRule.java:38)
        at org.archive.modules.deciderules.DecideRule.decisionFor(DecideRule.java:57)
        at org.archive.modules.deciderules.DecideRule.accepts(DecideRule.java:77)
        at org.archive.crawler.spring.SheetOverlaysManager.applyOverlaysTo(SheetOverlaysManager.java:331)
        at org.archive.crawler.postprocessor.CandidatesProcessor.runCandidateChain(CandidatesProcessor.java:170)
        at org.archive.crawler.frontier.AMQPUrlReceiver$UrlConsumer.handleDelivery(AMQPUrlReceiver.java:321)
        at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:140)
        at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:76)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
This commit is contained in:
Noah Levitt
2016-02-17 17:53:05 -08:00
parent 13322111b5
commit 8a6a49f7fc
@@ -39,6 +39,7 @@ import org.archive.modules.extractor.Hop;
import org.archive.modules.extractor.LinkContext;
import org.archive.net.UURI;
import org.archive.net.UURIFactory;
import org.archive.spring.KeyedProperties;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -316,6 +317,7 @@ public class AMQPUrlReceiver implements Lifecycle, ApplicationListener<CrawlStat
if ("GET".equals(jo.getString("method"))) {
try {
CrawlURI curi = makeCrawlUri(jo);
KeyedProperties.clearAllOverrideContexts();
candidates.runCandidateChain(curi, null);
} catch (URIException e) {
logger.log(Level.WARNING,