Hai-Chien Teng created ZEPPELIN-5735:
----------------------------------------
Summary: NPE when run java code in Zeppelin 0.10.0
Key: ZEPPELIN-5735
URL: https://issues.apache.org/jira/browse/ZEPPELIN-5735
Project: Zeppelin
Issue Type: Bug
Components: interpreter-launcher
Affects Versions: 0.10.0
Environment: Ubuntu 18.04.6 LTS
Docker version 20.10.12, build e91ed57
Apache Zeppelin Version 0.10.0
Reporter: Hai-Chien Teng
when I run the java code example which is provided by official
[https://zeppelin.apache.org/docs/0.10.0/interpreter/java.html,
|https://zeppelin.apache.org/docs/0.10.0/interpreter/java.html]ZP throws the NPE
code:
{code:java}
%java
import java.util.HashMap;
import java.util.Map;
import org.apache.zeppelin.java.JavaInterpreterUtils;
public class HelloWorld {
public static void main(String[] args) {
Map<String, Long> counts = new HashMap<>();
counts.put("hello",4L);
counts.put("world",5L);
System.out.println(JavaInterpreterUtils.displayTableFromSimpleMap("Word","Count",
counts));
}
} {code}
the output:
{code:java}
java.lang.NullPointerException
at
org.apache.zeppelin.interpreter.InterpreterOutput.write(InterpreterOutput.java:334)
at
org.apache.zeppelin.interpreter.InterpreterResult.add(InterpreterResult.java:90)
at
org.apache.zeppelin.interpreter.InterpreterResult.<init>(InterpreterResult.java:75)
at
org.apache.zeppelin.java.JavaInterpreter.interpret(JavaInterpreter.java:69)
at
org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:110)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:849)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:741)
at org.apache.zeppelin.scheduler.Job.run(Job.java:172)
at
org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:132)
at
org.apache.zeppelin.scheduler.FIFOScheduler.lambda$runJobInScheduler$0(FIFOScheduler.java:42)
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) {code}
the partial log:
{code:java}
INFO [2022-05-03 16:08:31,982] ({qtp230528013-64}
NotebookServer.java[onOpen]:246) - New connection from 10.10.16.217:49563
INFO [2022-05-03 16:08:32,056] ({qtp230528013-28}
InterpreterSetting.java[getOrCreateInterpreterGroup]:454) - Create
InterpreterGroup with groupId: java-shared_process for
ExecutionContext{user='anonymous', noteId='2H4W1X9T9',
interpreterGroupId='null', defaultInterpreterGroup='java',
inIsolatedMode=false, startTime=}
INFO [2022-05-03 16:08:32,058] ({qtp230528013-28}
InterpreterSetting.java[createInterpreters]:823) - Interpreter
org.apache.zeppelin.java.JavaInterpreter created for user: anonymous,
sessionId: shared_session
INFO [2022-05-03 16:08:32,058] ({qtp230528013-28}
ManagedInterpreterGroup.java[getOrCreateSession]:180) - Create Session:
shared_session in InterpreterGroup: java-shared_process for user: anonymous
WARN [2022-05-03 16:08:32,098] ({qtp230528013-28}
GitNotebookRepo.java[revisionHistory]:210) - No Head found for Untitled Note
2_2H4W1X9T9.zpln, No HEAD exists and no explicit starting revision was specified
INFO [2022-05-03 16:08:32,142] ({qtp230528013-28}
NoAuthenticationService.java[<init>]:38) - NoAuthenticationService is
initialized
INFO [2022-05-03 16:08:32,224] ({qtp230528013-24} Helium.java[loadConf]:139) -
Add helium local registry /opt/zeppelin/helium
WARN [2022-05-03 16:08:32,225] ({qtp230528013-24} Helium.java[loadConf]:147) -
/opt/zeppelin/conf/helium.json does not exists
INFO [2022-05-03 16:08:49,584] ({qtp230528013-80}
LocalConfigStorage.java[save]:70) - Save notebook authorization to file:
/opt/zeppelin/conf/notebook-authorization.json
INFO [2022-05-03 16:08:49,587] ({qtp230528013-80}
VFSNotebookRepo.java[save]:144) - Saving note 2H3Z6GSHV to Untitled Note
3_2H3Z6GSHV.zpln
WARN [2022-05-03 16:08:49,638] ({qtp230528013-69}
GitNotebookRepo.java[revisionHistory]:210) - No Head found for Untitled Note
3_2H3Z6GSHV.zpln, No HEAD exists and no explicit starting revision was specified
INFO [2022-05-03 16:08:59,051] ({qtp230528013-93}
VFSNotebookRepo.java[save]:144) - Saving note 2H3Z6GSHV to Untitled Note
3_2H3Z6GSHV.zpln
INFO [2022-05-03 16:08:59,137] ({qtp230528013-95}
NotebookService.java[runParagraph]:346) - Start to run paragraph:
paragraph_1651594129586_2001782025 of note: 2H3Z6GSHV
INFO [2022-05-03 16:08:59,137] ({qtp230528013-95}
VFSNotebookRepo.java[save]:144) - Saving note 2H3Z6GSHV to Untitled Note
3_2H3Z6GSHV.zpln
INFO [2022-05-03 16:08:59,144] ({qtp230528013-95}
SchedulerFactory.java[<init>]:56) - Scheduler Thread Pool Size: 100
INFO [2022-05-03 16:08:59,145] ({qtp230528013-95}
NotebookServer.java[inlineBroadcastNewParagraph]:629) - Broadcasting paragraph
on run call instead of note.
INFO [2022-05-03 16:08:59,145] ({SchedulerFactory2}
AbstractScheduler.java[runJob]:127) - Job paragraph_1651594129586_2001782025
started by scheduler RemoteInterpreter-java-shared_process-shared_session
INFO [2022-05-03 16:08:59,146] ({SchedulerFactory2}
Paragraph.java[jobRun]:416) - Run paragraph [paragraph_id:
paragraph_1651594129586_2001782025, interpreter:
org.apache.zeppelin.java.JavaInterpreter, note_id: 2H3Z6GSHV, user: anonymous]
INFO [2022-05-03 16:08:59,146] ({SchedulerFactory2}
ManagedInterpreterGroup.java[getOrCreateInterpreterProcess]:65) - Create
InterpreterProcess for InterpreterGroup: java-shared_process
INFO [2022-05-03 16:08:59,147] ({SchedulerFactory2}
PluginManager.java[loadInterpreterLauncher]:154) - Loading Interpreter Launcher
Plugin: org.apache.zeppelin.interpreter.launcher.StandardInterpreterLauncher
INFO [2022-05-03 16:08:59,147] ({SchedulerFactory2}
StandardInterpreterLauncher.java[launchDirectly]:50) - Launching new
interpreter process of java
INFO [2022-05-03 16:08:59,195] ({SchedulerFactory2}
ProcessLauncher.java[transition]:109) - Process state is transitioned to
LAUNCHED
INFO [2022-05-03 16:08:59,195] ({SchedulerFactory2}
ProcessLauncher.java[launch]:96) - Process is launched:
[/opt/zeppelin/bin/interpreter.sh, -d, /opt/zeppelin/interpreter/java, -c,
172.17.0.7, -p, 36879, -r, :, -i, java-shared_process, -l,
/opt/zeppelin/local-repo/java, -g, java]
INFO [2022-05-03 16:08:59,555] ({Exec Stream Pumper}
ProcessLauncher.java[processLine]:189) - [INFO] Interpreter launch command:
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dfile.encoding=UTF-8
-Dlog4j.configuration=file:///opt/zeppelin/conf/log4j.properties
-Dlog4j.configurationFile=file:///opt/zeppelin/conf/log4j2.properties
-Dzeppelin.log.file=/opt/zeppelin/logs/zeppelin-interpreter-java-shared_process--d22a16d5dbd2.log
-Xmx1024m -cp
:/opt/zeppelin/local-repo/java/*:/opt/zeppelin/interpreter/java/*:::/opt/zeppelin/interpreter/zeppelin-interpreter-shaded-0.10.0.jar
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer 172.17.0.7
36879 java-shared_process :
INFO [2022-05-03 16:09:00,834] ({pool-7-thread-2}
RemoteInterpreterEventServer.java[registerInterpreterProcess]:183) - Register
interpreter process: 172.17.0.7:40979, interpreterGroup: java-shared_process
INFO [2022-05-03 16:09:00,835] ({pool-7-thread-2}
ProcessLauncher.java[transition]:109) - Process state is transitioned to RUNNING
INFO [2022-05-03 16:09:00,928] ({SchedulerFactory2}
RemoteInterpreter.java[lambda$internal_create$1]:160) - Create
RemoteInterpreter org.apache.zeppelin.java.JavaInterpreter
INFO [2022-05-03 16:09:00,993] ({SchedulerFactory2}
RemoteInterpreter.java[lambda$open$0]:134) - Open RemoteInterpreter
org.apache.zeppelin.java.JavaInterpreter
INFO [2022-05-03 16:09:00,993] ({SchedulerFactory2}
RemoteInterpreter.java[pushAngularObjectRegistryToRemote]:393) - Push local
angular object registry from ZeppelinServer to remote interpreter group
java-shared_process
INFO [2022-05-03 16:09:01,055]
({JobStatusPoller-paragraph_1651594129586_2001782025}
NotebookServer.java[onStatusChange]:1989) - Job
paragraph_1651594129586_2001782025 starts to RUNNING
INFO [2022-05-03 16:09:01,056]
({JobStatusPoller-paragraph_1651594129586_2001782025}
VFSNotebookRepo.java[save]:144) - Saving note 2H3Z6GSHV to Untitled Note
3_2H3Z6GSHV.zpln
WARN [2022-05-03 16:09:01,110] ({SchedulerFactory2}
NotebookServer.java[onStatusChange]:1986) - Job
paragraph_1651594129586_2001782025 is finished, status: ERROR, exception: null,
result: %text java.lang.NullPointerException
at
org.apache.zeppelin.interpreter.InterpreterOutput.write(InterpreterOutput.java:334)
at
org.apache.zeppelin.interpreter.InterpreterResult.add(InterpreterResult.java:90)
at
org.apache.zeppelin.interpreter.InterpreterResult.<init>(InterpreterResult.java:75)
at
org.apache.zeppelin.java.JavaInterpreter.interpret(JavaInterpreter.java:69)
at
org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:110)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:849)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:741)
at org.apache.zeppelin.scheduler.Job.run(Job.java:172)
at
org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:132)
at
org.apache.zeppelin.scheduler.FIFOScheduler.lambda$runJobInScheduler$0(FIFOScheduler.java:42)
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) INFO [2022-05-03 16:09:01,110]
({SchedulerFactory2} VFSNotebookRepo.java[save]:144) - Saving note 2H3Z6GSHV to
Untitled Note 3_2H3Z6GSHV.zpln
INFO [2022-05-03 16:09:01,112] ({SchedulerFactory2}
AbstractScheduler.java[runJob]:154) - Job paragraph_1651594129586_2001782025
finished by scheduler RemoteInterpreter-java-shared_process-shared_session with
status ERROR {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)