Closed pkasson closed 6 years ago
The NPE will be fixed, but what do you mean by "capture the results"? If you are looking to store the crawled content, you need to use a Committer.
Yes, store the content ... I will take a look at the Committer. Thanks.
The latest snapshot release now has a fix for the NullPointerException
when calling saveToXML(...)
. Please confirm.
What repo do I pull the snapshot from ?
Maven? It is indicated on the download page: http://www.norconex.com/collectors/collector-filesystem/download
Confirmed, saved to XML, no crash. Thanks !
Thanks for confirming.
Tried this:
OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(outputPath), Charset.forName("UTF-8").newEncoder());
After crawler stops, tried saving ...
FilesystemCollector collector = new FilesystemCollector(collectorConfig)
collector.start(true);
crawlerConfig.saveToXML(osw);
kaboom -
Exception in thread "MyFilesystemCrawler" java.lang.NullPointerException at com.norconex.collector.fs.crawler.FilesystemCrawlerConfig.saveCrawlerConfigToXML(FilesystemCrawlerConfig.java:212) at com.norconex.collector.core.crawler.AbstractCrawlerConfig.saveToXML(AbstractCrawlerConfig.java:301) at com.kasstek.crawler.Test.startCrawling(Test.java:42)
How do you create an output file to capture the results ?
Thanks !