You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Sami Siren (JIRA)" <ji...@apache.org> on 2006/05/23 19:29:30 UTC

[jira] Resolved: (NUTCH-280) url query causes NullPointerException

     [ http://issues.apache.org/jira/browse/NUTCH-280?page=all ]
     
Sami Siren resolved NUTCH-280:
------------------------------

    Fix Version: 0.8-dev
     Resolution: Fixed
      Assign To: Sami Siren

fixed in trunk, thanks for reporting this

> url query causes NullPointerException
> -------------------------------------
>
>          Key: NUTCH-280
>          URL: http://issues.apache.org/jira/browse/NUTCH-280
>      Project: Nutch
>         Type: Bug

>   Components: searcher
>     Versions: 0.8-dev
>     Reporter: Grant Glouser
>     Assignee: Sami Siren
>      Fix For: 0.8-dev

>
> A search such as "url:java.sun.com" causes a NullPointerException.
> The cause is setConf() in URLQueryFilter (in the query-url plugin) that overrides FieldQueryFilter.setConf(), but does not call super.setConf().  The superclass, FieldQueryFilter, depends on setConf in order to initialize its commonGrams.  When FieldQueryFilter tries to access commonGrams later on, it throws a NullPointerException.
> This bug only affects phrase URL queries, so a simple URL query like url:sun would not hit it.
> Here is a simple patch which fixes this problem.  An alternative would be to remove all configuration fields and methods from URLQueryFilter since it does not use them.
> Index: src/plugin/query-url/src/java/org/apache/nutch/searcher/url/URLQueryFilter.java
> ===================================================================
> --- src/plugin/query-url/src/java/org/apache/nutch/searcher/url/URLQueryFilter.java	(revision 1260)
> +++ src/plugin/query-url/src/java/org/apache/nutch/searcher/url/URLQueryFilter.java	(working copy)
> @@ -31,6 +31,7 @@
>    }
>  
>    public void setConf(Configuration conf) {
> +    super.setConf(conf);
>      this.conf = conf;
>    }
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira