You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by afancy <gr...@gmail.com> on 2016/05/18 13:59:48 UTC

Job failed when run R

Hi,

I encountered the following errors when I ran R

%r 2+2

How to solve this problem? thanks

ERROR [2016-05-18 15:56:25,148] ({pool-2-thread-4} Job.java[run]:189) - Job
failed
java.lang.NoSuchMethodError:
org.jsoup.select.Elements.get(I)Lorg/jsoup/nodes/Element;
at
org.apache.zeppelin.spark.ZeppelinRDisplay$.textDisplay(ZeppelinRDisplay.scala:71)
at
org.apache.zeppelin.spark.ZeppelinRDisplay$.render(ZeppelinRDisplay.scala:55)
at org.apache.zeppelin.spark.ZeppelinRDisplay.render(ZeppelinRDisplay.scala)
at
org.apache.zeppelin.spark.SparkRInterpreter.interpret(SparkRInterpreter.java:146)
at
org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57)
at
org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:345)
at org.apache.zeppelin.scheduler.Job.run(Job.java:176)
at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

/afancy

Re: Job failed when run R

Posted by Eric Charles <er...@apache.org>.
I don't have that issue - `%r 2+2` works out of the box.

The NoSuchMethodError is IMHO not related. The getElementsByTag should 
return a list. I would suscpect more the html() method which may not be 
present in previous JSoup versions.

Did you rebuild between those tests?


On 18/05/16 20:48, xiufeng liu wrote:
> I used R interpreter. I have found the solution. I changed ".get(0)" 
> to ".first()", then the exception is gone (see the following code 
> snippet in ZeppelinRDisplay.scala:71).
>
> private deftextDisplay(body: Element): RDisplay = {
>    //RDisplay(body.getElementsByTag("p").get(0).html(), TEXT, SUCCESS)
>    RDisplay(body.getElementsByTag("p").first().html(),TEXT,SUCCESS)
> }
> Regards,
> /afancy
>
> On Wed, May 18, 2016 at 8:23 PM, Vinay Shukla <vinayshukla@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     What is your interpreter for this core? The R interpreter or Livy
>     interpreter?
>
>     On Wed, May 18, 2016 at 6:59 AM, afancy <groupme@gmail.com
>     <ma...@gmail.com>> wrote:
>
>         Hi,
>
>         I encountered the following errors when I ran R
>
>         %r 2+2
>
>         How to solve this problem? thanks
>
>         ERROR [2016-05-18 15:56:25,148] ({pool-2-thread-4}
>         Job.java[run]:189) - Job failed
>         java.lang.NoSuchMethodError:
>         org.jsoup.select.Elements.get(I)Lorg/jsoup/nodes/Element;
>         at
>         org.apache.zeppelin.spark.ZeppelinRDisplay$.textDisplay(ZeppelinRDisplay.scala:71)
>         at
>         org.apache.zeppelin.spark.ZeppelinRDisplay$.render(ZeppelinRDisplay.scala:55)
>         at
>         org.apache.zeppelin.spark.ZeppelinRDisplay.render(ZeppelinRDisplay.scala)
>         at
>         org.apache.zeppelin.spark.SparkRInterpreter.interpret(SparkRInterpreter.java:146)
>         at
>         org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57)
>         at
>         org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93)
>         at
>         org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:345)
>         at org.apache.zeppelin.scheduler.Job.run(Job.java:176)
>         at
>         org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
>         at
>         java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at
>         java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
>         at
>         java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
>         at
>         java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
>         java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
>
>         /afancy
>
>
>

Re: Job failed when run R

Posted by xiufeng liu <to...@gmail.com>.
I used R interpreter. I have found the solution. I changed ".get(0)" to
".first()", then the exception is gone (see the following code snippet
in ZeppelinRDisplay.scala:71).

private def textDisplay(body: Element): RDisplay = {
  //RDisplay(body.getElementsByTag("p").get(0).html(), TEXT, SUCCESS)
  RDisplay(body.getElementsByTag("p").first().html(), TEXT, SUCCESS)
}


Regards,

/afancy


On Wed, May 18, 2016 at 8:23 PM, Vinay Shukla <vi...@gmail.com> wrote:

> What is your interpreter for this core? The R interpreter or Livy
> interpreter?
>
> On Wed, May 18, 2016 at 6:59 AM, afancy <gr...@gmail.com> wrote:
>
>> Hi,
>>
>> I encountered the following errors when I ran R
>>
>> %r 2+2
>>
>> How to solve this problem? thanks
>>
>> ERROR [2016-05-18 15:56:25,148] ({pool-2-thread-4} Job.java[run]:189) -
>> Job failed
>> java.lang.NoSuchMethodError:
>> org.jsoup.select.Elements.get(I)Lorg/jsoup/nodes/Element;
>> at
>> org.apache.zeppelin.spark.ZeppelinRDisplay$.textDisplay(ZeppelinRDisplay.scala:71)
>> at
>> org.apache.zeppelin.spark.ZeppelinRDisplay$.render(ZeppelinRDisplay.scala:55)
>> at
>> org.apache.zeppelin.spark.ZeppelinRDisplay.render(ZeppelinRDisplay.scala)
>> at
>> org.apache.zeppelin.spark.SparkRInterpreter.interpret(SparkRInterpreter.java:146)
>> at
>> org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57)
>> at
>> org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93)
>> at
>> org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:345)
>> at org.apache.zeppelin.scheduler.Job.run(Job.java:176)
>> at
>> org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:745)
>>
>> /afancy
>>
>
>

Re: Job failed when run R

Posted by Vinay Shukla <vi...@gmail.com>.
What is your interpreter for this core? The R interpreter or Livy
interpreter?

On Wed, May 18, 2016 at 6:59 AM, afancy <gr...@gmail.com> wrote:

> Hi,
>
> I encountered the following errors when I ran R
>
> %r 2+2
>
> How to solve this problem? thanks
>
> ERROR [2016-05-18 15:56:25,148] ({pool-2-thread-4} Job.java[run]:189) -
> Job failed
> java.lang.NoSuchMethodError:
> org.jsoup.select.Elements.get(I)Lorg/jsoup/nodes/Element;
> at
> org.apache.zeppelin.spark.ZeppelinRDisplay$.textDisplay(ZeppelinRDisplay.scala:71)
> at
> org.apache.zeppelin.spark.ZeppelinRDisplay$.render(ZeppelinRDisplay.scala:55)
> at
> org.apache.zeppelin.spark.ZeppelinRDisplay.render(ZeppelinRDisplay.scala)
> at
> org.apache.zeppelin.spark.SparkRInterpreter.interpret(SparkRInterpreter.java:146)
> at
> org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57)
> at
> org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93)
> at
> org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:345)
> at org.apache.zeppelin.scheduler.Job.run(Job.java:176)
> at
> org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
>
> /afancy
>