You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Christian Fries (JIRA)" <ji...@apache.org> on 2017/04/07 18:24:42 UTC
[jira] [Created] (ZEPPELIN-2375) Some interpreters (md) fail with
java.lang.IncompatibleClassChangeError is CLASSPATH is set
Christian Fries created ZEPPELIN-2375:
-----------------------------------------
Summary: Some interpreters (md) fail with java.lang.IncompatibleClassChangeError is CLASSPATH is set
Key: ZEPPELIN-2375
URL: https://issues.apache.org/jira/browse/ZEPPELIN-2375
Project: Zeppelin
Issue Type: Bug
Components: Interpreters, zeppelin-server
Affects Versions: 0.7.1, 0.7.0, 0.6.2, 0.8.0
Environment: macOS Sierra (OS X) Version 10.12.3, Java 1.7 to Java 1.8 (1.7u80, 1.8u121), Maven 3.2.5 or 3.3.9
Reporter: Christian Fries
The issue is a follow-up of https://issues.apache.org/jira/browse/ZEPPELIN-2370 - clarifying the reasons.
When the CLASSPATH variable is set in bash (even if it is empty), some zeppelin interpreters fail (on OS X). The error occurs if you run
{code}
export CLASSPATH=
./bin/zeppelin.sh
{code}
and then try to execute the md interpreter, e.g. via
{code}
%md
*Test*
{code}
I then get the following error
{code}
java.lang.IncompatibleClassChangeError: class org.objectweb.asm.tree.ClassNode has interface org.objectweb.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.parboiled.transform.ParserTransformer.extendParserClass(ParserTransformer.java:43)
at org.parboiled.transform.ParserTransformer.transformParser(ParserTransformer.java:38)
at org.parboiled.Parboiled.createParser(Parboiled.java:54)
at org.pegdown.plugins.PegDownPlugins$Builder.withPlugin(PegDownPlugins.java:126)
at org.apache.zeppelin.markdown.PegdownParser.<init>(PegdownParser.java:35)
at org.apache.zeppelin.markdown.Markdown.createMarkdownParser(Markdown.java:75)
at org.apache.zeppelin.markdown.Markdown.open(Markdown.java:85)
at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:483)
at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
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)
{code}
A further investigation showed that setting CLASSPATH will change the classpath of an interpreter. Running the following Scala code in Zeppelin prints the classpath of the Scala interpreter (which could/should differ from the classpath of the Zeppelin server):
{code}
def urlses(cl: ClassLoader): Array[java.net.URL] = cl match {
case null => Array()
case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent)
case _ => urlses(cl.getParent)
}
val urls = urlses(getClass.getClassLoader)
println(urls.mkString("\n"))
{code}
If CLASSPATH is set, then we find
{code}
zeppelin-0.7.1-bin-all/lib/asm-3.1.jar
{code}
in the interpreter classpath (and many other jars in zeppelin-0.7.1-bin-all/lib/).
However, if CLASSPATH is unset, then only jars from zeppelin-0.7.1-bin-all/lib/interpreter/ are found in the interpreters classpath. To check this, stop zeppelin and run
{code}
unset CLASSPATH
./bin/zeppelin.sh
{code}
and repeat the tests above.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)