You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Reminia Scarlet <re...@gmail.com> on 2017/06/13 02:36:26 UTC

Re: zeppelin R plot with exception

I’ve checked the jar zeppelin-spark_2.10-0.7.1.jar  on maven.

I decompiler the class ZeppelinRDisplay.class,  method htmlDisplay as below:

 private RDisplay htmlDisplay(Element body, String imageWidth)
  {
    ObjectRef div = ObjectRef.create(new String());
    
    JavaConversions..MODULE$.asScalaBuffer(body.children()).foreach(new AbstractFunction1()
    {
      public static final long serialVersionUID = 0L;
      
      public final void apply(Element element)
      {
        String eHtml = element.html();
        String eOuterHtml = element.outerHtml();
        
        eOuterHtml = eOuterHtml.replace("“%html 

It calls ObjectRef.create which method is from scala 2.11 not scala 2.10.

Anybody can tell why zepplin-spark_2.10 is not compiled base on scala 2.10?



> 在 2017年6月13日,上午9:21,Reminia Scarlet <re...@gmail.com> 写道:
> 
> When I plot a data in R, the exception below comes:
> 
> java.lang.NoSuchMethodError: scala.runtime.ObjectRef.create(Ljava/lang/Object;)Lscala/runtime/ObjectRef;
> 	at org.apache.zeppelin.spark.ZeppelinRDisplay$.htmlDisplay(ZeppelinRDisplay.scala:91)
> 	at org.apache.zeppelin.spark.ZeppelinRDisplay$.render(ZeppelinRDisplay.scala:66)
> 	at org.apache.zeppelin.spark.ZeppelinRDisplay.render(ZeppelinRDisplay.scala)
> 	at org.apache.zeppelin.spark.SparkRInterpreter.interpret(SparkRInterpreter.java:150)
> 	at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:95)
> 	at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:490)
> 	at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
> 	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)
> 
> My problem is same as https://stackoverflow.com/questions/43980147/error-when-rendering-plots-in-apache-zeppelin-0-7-1-on-cloudera-cluster-with-spa <https://stackoverflow.com/questions/43980147/error-when-rendering-plots-in-apache-zeppelin-0-7-1-on-cloudera-cluster-with-spa>
> 
> The exception suggests a scala version issue.
> 
> My spark is 1.6 with scala 2.10.
> 
> And I’ve changed the interpreter of spark to 2.10  with command 
> 
> ./bin/install-interpreter.sh —name spark —artifact org.apache.zeppelin:zeppelin-spark_2.10:0.7.1
> 
> Do I have to recompile the whole zeppelin project with scala 2.10?
> 
> Any help? Thanks very much.