[ 
https://issues.apache.org/jira/browse/NUTCH-2641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16603142#comment-16603142
 ] 

ASF GitHub Bot commented on NUTCH-2641:
---------------------------------------

rustyx opened a new pull request #380: Fix for NUTCH-2641 contributed by rustyx
URL: https://github.com/apache/nutch/pull/380
 
 
   Minor fix.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> ClassCastException in webui
> ---------------------------
>
>                 Key: NUTCH-2641
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2641
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Rustam Abdullaev
>            Priority: Minor
>
> 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)

Reply via email to