You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by ivrokv <iv...@gmail.com> on 2008/05/10 01:33:03 UTC

Error building "recommended" plugin - Nutch 0.9

Hello,

I am unable to get the "recommended" plugin as described on the plugins
central page - 
http://wiki.apache.org/nutch/WritingPluginExample-0.9

I followed the setup instructions precisely and I am getting this error when
I compile the recommended  plugin source code.


My configuration is as follows:

The NutchCheckoutDirectory is /home/admin/nutch

In the src/plugin folder I created a directory called recommended

In the recommended directory,  I created the path
src/java/org/apache/nutch/parse/recommended/

The source code for these files is exactly as posted on the plugins webpage:
RecommendedIndexer.java
RecommendedParser.java
RecommendedQueryFilter.java

When I build this plugin I get this error:

Buildfile: build.xml

init:

init-plugin:

deps-jar:

compile:
     [echo] Compiling plugin: recommended
    [javac] Compiling 1 source file to
/home/admin/nutch/build/recommended/classes
    [javac]
/home/admin/nutch/src/plugin/recommended/src/java/org/apache/nutch/parse/recommended/RecommendedParser.java:22:
org.apache.nutch.parse.recommended.RecommendedParser is not abstract and
does not override abstract method
filter(org.apache.nutch.protocol.Content,org.apache.nutch.parse.ParseResult,org.apache.nutch.parse.HTMLMetaTags,org.w3c.dom.DocumentFragment)
in org.apache.nutch.parse.HtmlParseFilter
    [javac] public class RecommendedParser implements HtmlParseFilter{
    [javac]        ^
    [javac] 1 error


When I make the following change to the RecommendedParser.java by making the
class abstract 
the code builds without error, but I cannot see the recommended field in the
lucene index.

 public abstract class RecommendedParser implements HtmlParseFilter{

Can anyone please help me or suggest what I am doing wrong?

Thanks.



-- 
View this message in context: http://www.nabble.com/Error-building-%22recommended%22-plugin---Nutch-0.9-tp17158137p17158137.html
Sent from the Nutch - User mailing list archive at Nabble.com.


Re: Error building "recommended" plugin - Nutch 0.9

Posted by ivrokv <iv...@gmail.com>.
After looking at the interface HtmlParseFilter in
src/java/org/apache/nutch/parse directory the method  filter in this class 
is 
ParseResult filter(Content content, ParseResult parseResult, HTMLMetaTags
metaTags, DocumentFragment doc);

In the recommended plugin code for RecommendedParser.java the method
implemented has the signature 
public Parse filter(Content content, Parse  parse, HTMLMetaTags metaTags,
DocumentFragment doc) 

Since the method signature is not the same ( Parse and ParseResult), has
anyone faced a similar issue with this present state of code?  I dont think
the plugin will work with the current implementation?





ivrokv wrote:
> 
> Hello,
> 
> I am unable to get the "recommended" plugin as described on the plugins
> central page - 
> http://wiki.apache.org/nutch/WritingPluginExample-0.9
> 
> I followed the setup instructions precisely and I am getting this error
> when I compile the recommended  plugin source code.
> 
> 
> My configuration is as follows:
> 
> The NutchCheckoutDirectory is /home/admin/nutch
> 
> In the src/plugin folder I created a directory called recommended
> 
> In the recommended directory,  I created the path
> src/java/org/apache/nutch/parse/recommended/
> 
> The source code for these files is exactly as posted on the plugins
> webpage:
> RecommendedIndexer.java
> RecommendedParser.java
> RecommendedQueryFilter.java
> 
> When I build this plugin I get this error:
> 
> Buildfile: build.xml
> 
> init:
> 
> init-plugin:
> 
> deps-jar:
> 
> compile:
>      [echo] Compiling plugin: recommended
>     [javac] Compiling 1 source file to
> /home/admin/nutch/build/recommended/classes
>     [javac]
> /home/admin/nutch/src/plugin/recommended/src/java/org/apache/nutch/parse/recommended/RecommendedParser.java:22:
> org.apache.nutch.parse.recommended.RecommendedParser is not abstract and
> does not override abstract method
> filter(org.apache.nutch.protocol.Content,org.apache.nutch.parse.ParseResult,org.apache.nutch.parse.HTMLMetaTags,org.w3c.dom.DocumentFragment)
> in org.apache.nutch.parse.HtmlParseFilter
>     [javac] public class RecommendedParser implements HtmlParseFilter{
>     [javac]        ^
>     [javac] 1 error
> 
> 
> When I make the following change to the RecommendedParser.java by making
> the class abstract 
> the code builds without error, but I cannot see the recommended field in
> the lucene index.
> 
>  public abstract class RecommendedParser implements HtmlParseFilter{
> 
> Can anyone please help me or suggest what I am doing wrong?
> 
> Thanks.
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-building-%22recommended%22-plugin---Nutch-0.9-tp17158137p17160048.html
Sent from the Nutch - User mailing list archive at Nabble.com.