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

ClassCastException in webui

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4, 1.15
    • Fix Version/s: 2.4, 1.16
    • Component/s: web gui
    • Labels:
      None

      Description

      webui 2.x constantly logs this exception whenever the status of a crawl changes:

      java.lang.ClassCastException: org.apache.nutch.webui.client.model.JobInfo$State cannot be cast to [Ljava.lang.Object;
      at java.text.MessageFormat.format(MessageFormat.java:865)
      at java.text.Format.format(Format.java:157)
      at org.apache.nutch.webui.client.impl.RemoteCommand.toString(RemoteCommand.java:72)
      at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:305)
      at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:277)
      at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:231)
      at org.slf4j.helpers.MessageFormatter.format(MessageFormatter.java:124)
      at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:322)
      at org.apache.nutch.webui.client.impl.CrawlingCycle.executeCrawlCycle(CrawlingCycle.java:63)
      at org.apache.nutch.webui.service.impl.CrawlServiceImpl.startCrawl(CrawlServiceImpl.java:71)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:97)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

      The issue is in RemoteCommand, line 72. The arguments to MessageFormat.format() should be in an array, even when there is only one.

      statusInfo = new MessageFormat("{0}", Locale.ROOT).format(new Object[] {jobInfo.getState()});
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rustamabd Rustam Abdullaev
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: