z.load of breeze library failed

330 views
Skip to first unread message

Roman Zykov

unread,
Dec 30, 2014, 2:52:31 AM12/30/14
to zeppelin-...@googlegroups.com
I wrote a simple test in Zeppelin

z.load("org.scalanlp:breeze_2.10:0.10",true) 
import breeze.stats.distributions.Beta
val sampleA = new Beta(10, 10).sample(1000)

but it failed with:
error: error while loading package, class file '/Users/rzykov/projects/zeppelin/zeppelin-server/target/lib/scala-library-2.10.4.jar(scala/reflect/package.class)' is broken (class java.lang.RuntimeException/Scala class file does not contain Scala annotation) error: error while loading package, class file '/Users/rzykov/projects/zeppelin/zeppelin-server/target/lib/scala-library-2.10.4.jar(scala/package.class)' is broken (class java.lang.RuntimeException/Scala class file does not contain Scala annotation) error: error while loading Predef, class file '/Users/rzykov/projects/zeppelin/zeppelin-server/target/lib/scala-library-2.10.4.jar(scala/Predef.class)' is broken (class java.lang.RuntimeException/Scala class file does not contain Scala annotation)

How to fix it?

moon soo Lee

unread,
Jan 1, 2015, 9:31:57 PM1/1/15
to zeppelin-...@googlegroups.com
Hi,

Unfortunately library loading is still experimental feature.
I'm expecting Zeppelin will get stabilize z.load() feature from spark 1.2 support. (though spark 1.2 support is not ready)
Currently, put library into the classpath is the only stable option.

Regards,
moon

Roman Zykov

unread,
Jan 12, 2015, 8:34:26 AM1/12/15
to zeppelin-...@googlegroups.com
I have downloaded from maven breeze and apache commons jars
and included them:
export ZEPPELIN_JAVA_OPTS="-Dspark.jars=./commons-math3-3.4.jar,./breeze_2.11-0.10.jar"

simple test line
val sampleA = new  breeze.stats.distributions.Beta(10, 10).sample(1000)

failed with this
Caused by: java.lang.ClassNotFoundException: org.apache.commons.math3.random.RandomGenerator

but this lib was included into path explicitly

Roman Zykov

unread,
Jan 12, 2015, 8:39:45 AM1/12/15
to zeppelin-...@googlegroups.com
I create another test

import org.apache.commons.math3.random.RandomDataGenerator
val a = (new RandomDataGenerator).nextLong(1,10)

output:
import org.apache.commons.math3.random.RandomDataGenerator a: Long = 9

Roman Zykov

unread,
Jan 12, 2015, 9:55:15 AM1/12/15
to zeppelin-...@googlegroups.com
Another update

I put these jars into the root of zeppelin project
then run ./bin/zeppelin.sh

test works!!!

but ZEPPELIN_JAVA_OPTS didn't  affect on this one
Reply all
Reply to author
Forward
0 new messages