I can't see the image that you attached.

Anyways, if you are running via command line (ie. runtime/local): set
"plugin.folders" to "plugins" in
"NUTCH_HOME/runtime/local/conf/nutch-site.xml". For running from
Eclipse, set "plugin.folders" to the absolute path of directory where the
plugins are generated (ie. NUTCH_HOME/build/plugins) in
"NUTCH_HOME/conf/nutch-site.xml"

On Thu, Jun 13, 2013 at 5:38 AM, Tony Mullins <[email protected]>wrote:

> Tejas,
>
> I can now successfully run the plugin from terminal like bin/nutch
> parsechecker http://www.google.nl....
>
> But if I try to run my code directly from eclipse , with main class as
> 'org.apache.nutch.parse.ParserChecker' and program arguments as '
> http://www.google.nl' it fails with same exception of ClassNotFound.
>
> Please see the attached image.
>
> [image: Inline image 1]
>
>
> I have tried 'ant clean' in my Nutch2.2 source...  but same error !!!
>
> Could you please help me fixing this issue.
>
> Thanks,
> Tony
>
>
>
>
> On Thu, Jun 13, 2013 at 2:23 PM, Tony Mullins <[email protected]>wrote:
>
>> Thank you very much Tejas. It worked. :)
>>
>> Just wondering why did you ask me to remove the 'plugin.folders' from
>> conf/nutch-site.xml ?
>> And the problem was due to bad cache/runtime build ?
>>
>> Thank you again !!!
>> Tony.
>>
>>
>>
>> On Thu, Jun 13, 2013 at 1:47 PM, Tejas Patil <[email protected]>wrote:
>>
>>> I don't see any attachments with the mail.
>>>
>>> Anyways, you need to:
>>> 1. remove all your changes from conf/nutch-default.xml. Make it in sync
>>> with svn. (rm conf/nutch-default.xml && svn up conf/nutch-default.xml)
>>> 2. In conf/nutch-site.xml, remove the entry for "plugin.folders"
>>> 3. run "ant clean runtime"
>>>
>>> Now try again.
>>>
>>>
>>> On Thu, Jun 13, 2013 at 1:39 AM, Tony Mullins <[email protected]
>>> >wrote:
>>>
>>> > Hi Tejas,
>>> >
>>> > Thanks for pointing out the problem. I have changed the package to
>>> > kaqqao.nutch.selector and have also modified the package in java source
>>> > files as package kaqqao.nutch.selector;
>>> >
>>> > But I am still getting the ClassNotFound exception... please see
>>> attached
>>> > images !!!
>>> >
>>> > Please note that I am using fresh Nutch 2.2 source without additional
>>> > patch ... do I need to apply any patch to run this ?
>>> >
>>> > Thanks,
>>> > Tony.
>>> >
>>> >
>>> >
>>> > On Thu, Jun 13, 2013 at 1:16 PM, Tejas Patil <[email protected]
>>> >wrote:
>>> >
>>> >> The package structure you actually have is:
>>> >> *kaqqao.nutch.plugin.selector;*
>>> >>
>>> >> In src/plugin/element-selector/plugin.xml you have defined it as:
>>> >>
>>> >>    <extension id="*kaqqao.nutch.selector*.HtmlElementSelectorIndexer"
>>> >>               name="Nutch Blacklist and Whitelist Indexing Filter"
>>> >>               point="org.apache.nutch.indexer.IndexingFilter">
>>> >>       <implementation id="HtmlElementSelectorIndexer"
>>> >>                       class="*kaqqao.nutch.selector*
>>> >> .HtmlElementSelectorIndexer"/>
>>> >>    </extension>
>>> >>
>>> >> It aint the same and thats why it cannot load that class at runtime.
>>> Make
>>> >> it consistent and try again.
>>> >> It worked at my end after changing the package structure to
>>> >> kaqqao.nutch.selector
>>> >>
>>> >>
>>> >> On Wed, Jun 12, 2013 at 11:45 PM, Tony Mullins <
>>> [email protected]
>>> >> >wrote:
>>> >>
>>> >> > Hi Tejas,
>>> >> >
>>> >> > I am following this example
>>> >> > https://github.com/veggen/nutch-element-selector. And now I have
>>> tried
>>> >> > this example without any changes to my  fresh source of Nutch 2.2.
>>> >> >
>>> >> > Attached is my patch ( change set) on fresh Nutch 2.2 source.
>>> >> > Kindly review it and please let me know if I am missing something.
>>> >> >
>>> >> > Thanks,
>>> >> > Tonny
>>> >> >
>>> >> >
>>> >> > On Thu, Jun 13, 2013 at 11:19 AM, Tejas Patil <
>>> [email protected]
>>> >> >wrote:
>>> >> >
>>> >> >> Weird. I would like to have a quick peek into your changes. Maybe
>>> you
>>> >> are
>>> >> >> doing something wrong which is hard to predict and figure out by
>>> asking
>>> >> >> bunch of questions to you over email. Can you attach a patch file
>>> of
>>> >> your
>>> >> >> changes ? Please remove the fluff from it and only keep the bare
>>> >> essential
>>> >> >> things in the patch. Also, if you are working for some company,
>>> make
>>> >> sure
>>> >> >> that you attaching some code here should not be against your
>>> >> >> organisational
>>> >> >> policy.
>>> >> >>
>>> >> >> Thanks,
>>> >> >> Tejas
>>> >> >>
>>> >> >> On Wed, Jun 12, 2013 at 11:03 PM, Tony Mullins <
>>> >> [email protected]
>>> >> >> >wrote:
>>> >> >>
>>> >> >> > I have done this all. Created my plugin's ivy.xml , plugin.xml ,
>>> >> >> build,xml
>>> >> >> > . Added the entry in nutch-site.xml and src>plugin>build.xml.
>>> >> >> > But I am still getting "PluginRuntimeException:
>>> >> >> > java.lang.ClassNotFoundException"
>>> >> >> >
>>> >> >> >
>>> >> >> > Is there any other configuration that I am missing or its Nutch
>>> 2.2
>>> >> >> issues
>>> >> >> > ?
>>> >> >> >
>>> >> >> > Thanks,
>>> >> >> > Tony.
>>> >> >> >
>>> >> >> >
>>> >> >> > On Thu, Jun 13, 2013 at 1:09 AM, Tejas Patil <
>>> >> [email protected]
>>> >> >> > >wrote:
>>> >> >> >
>>> >> >> > > Here is the relevant wiki page:
>>> >> >> > > http://wiki.apache.org/nutch/WritingPluginExample
>>> >> >> > >
>>> >> >> > > Although its old, I think that it will help.
>>> >> >> > >
>>> >> >> > >
>>> >> >> > > On Wed, Jun 12, 2013 at 1:01 PM, Sebastian Nagel <
>>> >> >> > > [email protected]
>>> >> >> > > > wrote:
>>> >> >> > >
>>> >> >> > > > Hi Tony,
>>> >> >> > > >
>>> >> >> > > > you have to "register" your plugin in
>>> >> >> > > >  src/plugin/build.xml
>>> >> >> > > >
>>> >> >> > > > Does your
>>> >> >> > > >  src/plugin/myplugin/plugin.xml
>>> >> >> > > > properly propagate jar file,
>>> >> >> > > > extension point and implementing class?
>>> >> >> > > >
>>> >> >> > > > And, finally, you have to add your plugin
>>> >> >> > > > to the property plugin.includes in nutch-site.xml
>>> >> >> > > >
>>> >> >> > > > Cheers,
>>> >> >> > > > Sebastian
>>> >> >> > > >
>>> >> >> > > > On 06/12/2013 07:48 PM, Tony Mullins wrote:
>>> >> >> > > > > Hi,
>>> >> >> > > > >
>>> >> >> > > > > I am trying simple ParseFilter plugin in Nutch 2.2. And I
>>> can
>>> >> >> build
>>> >> >> > it
>>> >> >> > > > and
>>> >> >> > > > > also the src>plugin>build.xml successfully. But its .jar
>>> file
>>> >> is
>>> >> >> not
>>> >> >> > > > being
>>> >> >> > > > > created in my runtime>local>plugins>myplugin directory.
>>> >> >> > > > >
>>> >> >> > > > > And on running
>>> >> >> > > > > "bin/nutch parsechecker http://www.google.nl";
>>> >> >> > > > >  I get this error " java.lang.RuntimeException:
>>> >> >> > > > > org.apache.nutch.plugin.PluginRuntimeException:
>>> >> >> > > > > java.lang.ClassNotFoundException:
>>> >> >> > > > > com.xyz.nutch.selector.HtmlElementSelectorFilter"
>>> >> >> > > > >
>>> >> >> > > > > If I go to MyNutch2.2Source/build/myplugin , I can see
>>> plugin's
>>> >> >> jar
>>> >> >> > > with
>>> >> >> > > > > test & classes directory created there. If I copy .jar
>>>  from
>>> >> here
>>> >> >> and
>>> >> >> > > > paste
>>> >> >> > > > > it to my runtime>local>plugins>myplugin directory with
>>> >> plugin.xml
>>> >> >> > file
>>> >> >> > > > then
>>> >> >> > > > > too I get the same exception of class not found.
>>> >> >> > > > >
>>> >> >> > > > > I have not made any changes in src>plugin>build-plugin.xml.
>>> >> >> > > > >
>>> >> >> > > > > Could you please guide me that what is I am doing wrong
>>> here ?
>>> >> >> > > > >
>>> >> >> > > > > Thanks,
>>> >> >> > > > > Tony
>>> >> >> > > > >
>>> >> >> > > >
>>> >> >> > > >
>>> >> >> > >
>>> >> >> >
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >
>>> >
>>>
>>
>>
>

Reply via email to