Uploaded image for project: 'Nutch'
  1. Nutch
  2. NUTCH-2019

ClassPathException sending topN argument for /job/create using Nutch 2.x RESTApi

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.3.1
    • generator
    • None
    • Nutch 2.3

    Description

      As described [http://www.mail-archive.com/user%40nutch.apache.org/msg13549.html|here], the issues is as follows

      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.

      Regards,
      Alex

      Attachments

        1. NUTCH-2019.patch
          0.7 kB
          Lewis John McGibbney
        2. NUTCH-2019v2.patch
          0.7 kB
          Lewis John McGibbney

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lewismc Lewis John McGibbney
            lewismc Lewis John McGibbney
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment