‎Hi Lewis,

I am using Nutch 2.3

Regards,
Alex

  Original Message  
From: Lewis John Mcgibbney
Sent: Wednesday, 13 May, 2015 05:14
To: [email protected]
Reply To: [email protected]
Subject: Re: ClassPathException sending topN argument for /job/create using 
Nutch 2.x RESTApi

Hi Alex,

Which version of Nutch 2.x are you using?

Yes I think this is a bug and a patch would be great.
Thanks
Lewis


On Sat, May 9, 2015 at 4:31 PM, <[email protected]> wrote:

>
> Hi Lewis,
>
> Thanks for replying, I will try and open a ticket after I'm sure its a
> Nutch "bug" and not something that I've overlooked (don't want to create
> noise). Looking at the source I think it was caused by the following line:
>
> topN = (Long) args.get(Nutch.ARG_TOPN);
>
> I managed to get it temporarily "fixed" by replacing the above with the
> following:
>
> try{
>
> topN = (Long) args.get(Nutch.ARG_TOPN);
> } catch(Exception e) {
>
> topN = Long.parseLong(args.get(Nutch.ARG_TOPN).toString());
> LOG.warn("Error: " + e + "test: " + args.get(Nutch.ARG_TOPN));
> }
>
> I guess it complains about ClassCastException because JSON stores the
> argument as int or string and not long.
>
>

Reply via email to