You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Sebastian Nagel (JIRA)" <ji...@apache.org> on 2018/09/11 08:09:00 UTC

[jira] [Updated] (NUTCH-2641) ClassCastException in webui

     [ https://issues.apache.org/jira/browse/NUTCH-2641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Nagel updated NUTCH-2641:
-----------------------------------
    Fix Version/s: 1.16
                   2.4

> ClassCastException in webui
> ---------------------------
>
>                 Key: NUTCH-2641
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2641
>             Project: Nutch
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 2.4, 1.15
>            Reporter: Rustam Abdullaev
>            Priority: Minor
>             Fix For: 2.4, 1.16
>
>
> webui 2.x constantly logs this exception whenever the status of a crawl changes:
> {noformat}
> 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){noformat}
> The issue is in RemoteCommand, line 72. The arguments to MessageFormat.format() should be in an array, even when there is only one.
> {code:java}
> statusInfo = new MessageFormat("{0}", Locale.ROOT).format(new Object[] {jobInfo.getState()});
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)