nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadeem Douba (JIRA)" <>
Subject [jira] [Commented] (NUTCH-1084) ReadDB url throws exception
Date Sat, 12 Sep 2015 06:57:46 GMT


Nadeem Douba commented on NUTCH-1084:

I think I found the issue and I don't think it's related to Nutch. AbstractMapWritable uses
the Class.forName method which throws the CNFE. This is because Class.forName uses the system
class loader which is different than the current thread's class loader in that it does not
include the job jar as part of its class path. I recompiled hadoop-common to see if it would
fix the issue by replacing the Class.forName call with Thread.currentThread().getContextClassLoader().loadClass(class).
This seems to fix the issue.

> ReadDB url throws exception
> ---------------------------
>                 Key: NUTCH-1084
>                 URL:
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Markus Jelsma
>            Assignee: Markus Jelsma
>         Attachments: NUTCH-1084.patch
> Readdb -url suffers from two problems:
> 1. it trips over the _SUCCESS file generated by newer Hadoop version
> 2. throws can't find class: org.apache.nutch.protocol.ProtocolStatus (???)
> The first problem can be remedied by not allowing the injector or updater to write the
_SUCCESS file. Until now that's the solution implemented for similar issues. I've not been
successful as to make the Hadoop readers simply skip the file.
> The second issue seems a bit strange and did not happen on a local check out. I'm not
yet sure whether this is a Hadoop issue or something being corrupt in the CrawlDB. Here's
the stack trace:
> {code}
> Exception in thread "main" can't find class: org.apache.nutch.protocol.ProtocolStatus
because org.apache.nutch.protocol.ProtocolStatus
>         at
>         at
>         at org.apache.nutch.crawl.CrawlDatum.readFields(
>         at$Reader.getCurrentValue(
>         at$Reader.get(
>         at org.apache.hadoop.mapred.MapFileOutputFormat.getEntry(
>         at org.apache.nutch.crawl.CrawlDbReader.get(
>         at org.apache.nutch.crawl.CrawlDbReader.readUrl(
>         at org.apache.nutch.crawl.CrawlDbReader.main(
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke(
>         at org.apache.hadoop.util.RunJar.main(
> {code}

This message was sent by Atlassian JIRA

View raw message