Please add properties in your interpreter-setting.json. But I think this is some sort of bug that we should fix, we should allow properties to be not specified.
[ { "group": "geo", "name": "geo", "className": "adrax.GeoInterpreter", "editor": { "language": "java", "editOnDblClick": false, "completionKey": "TAB" }, properties: { } } ] Xun Liu <neliu...@163.com> 于2019年1月23日周三 下午5:08写道: > hi,Никита Терлыч > > This is the exception when the interpreter process is initialized because > a value is a null pointer. > > You can solve it by the following methods: > 1) You can set it in zeppelin/conf/zeppelin-env.sh > Export > ZEPPELIN_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=15005 > " > > 2)Restart zeppelin/bin/zeppelin-daemon.sh restart > 3)Set up remote debugging in IDEA, debug port 15005, and set breakpoints > in 405 lines of code in > `zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java`. > Check out what caused the null pointer to solve the problem. > > > 在 2019年1月23日,下午4:09,Никита Терлыч <terlychnik...@gmail.com> 写道: > > Greetings, > > > I am working on notebook for specific database and I decided to use Apache > Zeppelin as a base, so I started with creating the most basic interpreter > for it. > > I used this piece of documentation: > https://zeppelin.apache.org/docs/latest/development/writing_zeppelin_interpreter.html > . > > Thus, I created my class which inherits > org.apache.zeppelin.interpreter.Interpreter class: > import org.apache.zeppelin.interpreter.Interpreter; > import org.apache.zeppelin.interpreter.InterpreterContext; > import org.apache.zeppelin.interpreter.InterpreterException; > import org.apache.zeppelin.interpreter.InterpreterResult; > import org.apache.zeppelin.interpreter.InterpreterResult.Code; > import org.apache.zeppelin.interpreter.InterpreterResult.Type; > import java.util.Properties; > > > public class GeoInterpreter extends Interpreter { > > > public GeoInterpreter(Properties properties) { > super(properties); > } > > > public void open() throws InterpreterException { > > > } > > > public void close() throws InterpreterException { > > > } > > > public InterpreterResult interpret(String s, InterpreterContext > interpreterContext) throwsInterpreterException { > return new InterpreterResult(Code.SUCCESS, Type.TEXT, s); > } > > > public void cancel(InterpreterContext interpreterContext) throws > InterpreterException { > > > } > > > public FormType getFormType() throws InterpreterException { > return null; > } > > > public int getProgress(InterpreterContext interpreterContext) throws > InterpreterException { > return 0; > } > } > > After that I configured pom.xml file for my interpreter as it was shown in > documentation. > > The pom.xml file: > <?xml version="1.0" encoding="UTF-8"?> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > > > <groupId>adrax</groupId> > <artifactId>geo-interpreter</artifactId> > <version>0.8.0</version> > <parent> > <artifactId>interpreter-parent</artifactId> > <groupId>org.apache.zeppelin</groupId> > <version>0.8.0</version> > <relativePath>../interpreter-parent</relativePath> > </parent> > > > <dependencies> > <dependency> > <groupId>org.apache.zeppelin</groupId> > <artifactId>zeppelin-interpreter</artifactId> > <version>${project.version}</version> > <scope>provided</scope> > </dependency> > </dependencies> > <build> > <plugins> > <plugin> > <artifactId>maven-enforcer-plugin</artifactId> > </plugin> > <plugin> > <artifactId>maven-dependency-plugin</artifactId> > </plugin> > <plugin> > <artifactId>maven-resources-plugin</artifactId> > </plugin> > </plugins> > </build> > > > </project> > > > Next, I created “zeppelin-site.xml” from template added my interpreter to > “zeppelin.interpreters” property like this: > . . . > <property> > <name>zeppelin.interpreters</name> > <value>…,adrax.GeoInterpreter</value> > </property> > . . . > > Then I put interpreter’s jar with “interpreter-setting.json” to > “interpreter” folder. > > My interpreter-setting.json: > [ > { > "group": "geo", > "name": "geo", > "className": "adrax.GeoInterpreter", > "editor": { > "language": "java", > "editOnDblClick": false, > "completionKey": "TAB" > } > } > ] > > > Finally, I tried to run Zeppelin (zeppelin.cmd) with my interpreter and > got several errors, the whole server log: > > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option > MaxPermSize=512m; support was removed in 8.0 > > SLF4J: Class path contains multiple SLF4J bindings. > > SLF4J: Found binding in > [jar:file:/C:/Users/Admin/Documents/Development/Java/Geonotebook/zeppelin-0.8.0-bin-netinst/lib/interpreter/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > SLF4J: Found binding in > [jar:file:/C:/Users/Admin/Documents/Development/Java/Geonotebook/zeppelin-0.8.0-bin-netinst/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an > explanation. > > SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] > > INFO [2019-01-20 20:26:45,332] ({main} > ZeppelinConfiguration.java[create]:121) - Load configuration from > file:/C:/Users/Admin/Documents/Development/Java/Geonotebook/zeppelin-0.8.0-bin-netinst/conf/zeppelin-site.xml > > INFO [2019-01-20 20:26:45,395] ({main} > ZeppelinConfiguration.java[create]:129) - Server Host: 0.0.0.0 > > INFO [2019-01-20 20:26:45,396] ({main} > ZeppelinConfiguration.java[create]:131) - Server Port: 8080 > > INFO [2019-01-20 20:26:45,396] ({main} > ZeppelinConfiguration.java[create]:135) - Context Path: / > > INFO [2019-01-20 20:26:45,397] ({main} > ZeppelinConfiguration.java[create]:136) - Zeppelin Version: 0.8.0 > > INFO [2019-01-20 20:26:45,440] ({main} Log.java[initialized]:186) - > Logging initialized @7383ms > > INFO [2019-01-20 20:26:45,501] ({main} > ZeppelinServer.java[setupWebAppContext]:387) - ZeppelinServer Webapp path: > C:\Users\Admin\Documents\Development\Java\Geonotebook\zeppelin-0.8.0-bin-netinst\webapps > > INFO [2019-01-20 20:26:45,573] ({main} ZeppelinServer.java[main]:213) - > Starting zeppelin server > > INFO [2019-01-20 20:26:45,576] ({main} Server.java[doStart]:327) - > jetty-9.2.15.v20160210 > > INFO [2019-01-20 20:28:17,850] ({main} > StandardDescriptorProcessor.java[visitServlet]:297) - NO JSP Support for /, > did not find org.eclipse.jetty.jsp.JettyJspServlet > > WARN [2019-01-20 20:28:17,928] ({main} > ServletHolder.java[getNameOfJspClass]:923) - Unable to make identifier for > jsp rest trying rest instead > > WARN [2019-01-20 20:28:18,294] ({main} > ZeppelinConfiguration.java[getConfigFSDir]:527) - zeppelin.config.fs.dir is > not specified, fall back to local conf directory zeppelin.conf.dir > > WARN [2019-01-20 20:28:18,294] ({main} > ZeppelinConfiguration.java[getConfigFSDir]:527) - zeppelin.config.fs.dir is > not specified, fall back to local conf directory zeppelin.conf.dir > > DEBUG [2019-01-20 20:28:18,307] ({main} > InterpreterSettingManager.java[<init>]:148) - InterpreterRootPath: > C:\Users\Admin\Documents\Development\Java\Geonotebook\zeppelin-0.8.0-bin-netinst\interpreter > > INFO [2019-01-20 20:28:18,393] ({main} > InterpreterSettingManager.java[<init>]:163) - Using RecoveryStorage: > org.apache.zeppelin.interpreter.recovery.NullRecoveryStorage > > INFO [2019-01-20 20:28:18,395] ({main} > InterpreterSettingManager.java[<init>]:167) - Using LifecycleManager: > org.apache.zeppelin.interpreter.lifecycle.NullLifecycleManager > > WARN [2019-01-20 20:28:18,431] ({main} > InterpreterSettingManager.java[init]:329) - No interpreter-setting.json > found in > C:\Users\Admin\Documents\Development\Java\Geonotebook\zeppelin-0.8.0-bin-netinst\interpreter\${ > interpreter.name} > > DEBUG [2019-01-20 20:28:18,441] ({main} > InterpreterSettingManager.java[registerInterpreterFromPath]:371) - Reading > interpreter-setting.json from file > C:\Users\Admin\Documents\Development\Java\Geonotebook\zeppelin-0.8.0-bin-netinst\interpreter\geo-interpreter\interpreter-setting.json > > WARN [2019-01-20 20:28:18,453] ({main} ContextHandler.java[log]:2062) - > unavailable > > MultiException stack 1 of 1 > > java.lang.NullPointerException > > at java.util.HashMap.putMapEntries(Unknown Source) > > at java.util.HashMap.putAll(Unknown Source) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.registerInterpreterSetting(InterpreterSettingManager.java:405) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.registerInterpreterFromPath(InterpreterSettingManager.java:374) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.init(InterpreterSettingManager.java:327) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.<init>(InterpreterSettingManager.java:171) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.<init>(InterpreterSettingManager.java:131) > > at > org.apache.zeppelin.server.ZeppelinServer.<init>(ZeppelinServer.java:151) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown > Source) > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) > > at java.lang.reflect.Constructor.newInstance(Unknown Source) > > at > org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1375) > > at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1083) > > at > org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:978) > > at > org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1082) > > at > org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1074) > > at > org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.createAndInitialize(AbstractHk2InjectionManager.java:213) > > at > org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.createAndInitialize(ImmediateHk2InjectionManager.java:54) > > at > org.glassfish.jersey.server.ApplicationConfigurator.createApplication(ApplicationConfigurator.java:138) > > at > org.glassfish.jersey.server.ApplicationConfigurator.init(ApplicationConfigurator.java:96) > > at > org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$0(ApplicationHandler.java:313) > > at > org.glassfish.jersey.server.ApplicationHandler$$Lambda$44/2067180044.accept(Unknown > Source) > > at java.util.Arrays$ArrayList.forEach(Unknown Source) > > at > org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:313) > > at > org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282) > > at > org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335) > > at > org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178) > > at > org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370) > > at javax.servlet.GenericServlet.init(GenericServlet.java:244) > > at > org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:616) > > at > org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:396) > > at > org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) > > at > org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) > > at > org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349) > > at > org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342) > > at > org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) > > at > org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) > > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) > > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) > > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163) > > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) > > at org.eclipse.jetty.server.Server.start(Server.java:387) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) > > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) > > at org.eclipse.jetty.server.Server.doStart(Server.java:354) > > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > > at > org.apache.zeppelin.server.ZeppelinServer.main(ZeppelinServer.java:215) > > ╤П╨╜╨▓ 20, 2019 8:28:18 PM org.glassfish.jersey.internal.Errors logErrors > > WARNING: The following warnings have been detected: WARNING: A HTTP GET > method, public javax.ws.rs.core.Response > org.apache.zeppelin.rest.InterpreterRestApi.listInterpreter(java.lang.String), > should not consume any entity. > > WARNING: A HTTP GET method, public javax.ws.rs.core.Response > org.apache.zeppelin.rest.CredentialRestApi.getCredentials(java.lang.String) > throws java.io.IOException,java.lang.IllegalArgumentException, should not > consume any entity. > > WARNING: The (sub)resource method createNote in > org.apache.zeppelin.rest.NotebookRestApi contains empty path annotation. > > WARNING: The (sub)resource method getNoteList in > org.apache.zeppelin.rest.NotebookRestApi contains empty path annotation. > > > WARN [2019-01-20 20:28:18,992] ({main} WebAppContext.java[doStart]:514) - > Failed startup of context o.e.j.w.WebAppContext@12028586 > {/,file:/C:/Users/Admin/Documents/Development/Java/Geonotebook/zeppelin-0.8.0-bin-netinst/webapps/webapp/,STARTING}{C:\Users\Admin\Documents\Development\Java\Geonotebook\zeppelin-0.8.0-bin-netinst\zeppelin-web-0.8.0.war} > > javax.servlet.ServletException: rest@355bd4 > ==org.glassfish.jersey.servlet.ServletContainer,-1,false > > at > org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:637) > > at > org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:396) > > at > org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) > > at > org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) > > at > org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349) > > at > org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342) > > at > org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) > > at > org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) > > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) > > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) > > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163) > > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) > > at org.eclipse.jetty.server.Server.start(Server.java:387) > > at > org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) > > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) > > at org.eclipse.jetty.server.Server.doStart(Server.java:354) > > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) > > at > org.apache.zeppelin.server.ZeppelinServer.main(ZeppelinServer.java:215) > > Caused by: A MultiException has 1 exceptions. They are: > > 1. java.lang.NullPointerException > > > at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1085) > > at > org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:978) > > at > org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1082) > > at > org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1074) > > at > org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.createAndInitialize(AbstractHk2InjectionManager.java:213) > > at > org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.createAndInitialize(ImmediateHk2InjectionManager.java:54) > > at > org.glassfish.jersey.server.ApplicationConfigurator.createApplication(ApplicationConfigurator.java:138) > > at > org.glassfish.jersey.server.ApplicationConfigurator.init(ApplicationConfigurator.java:96) > > at > org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$0(ApplicationHandler.java:313) > > at > org.glassfish.jersey.server.ApplicationHandler$$Lambda$44/2067180044.accept(Unknown > Source) > > at java.util.Arrays$ArrayList.forEach(Unknown Source) > > at > org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:313) > > at > org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282) > > at > org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335) > > at > org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178) > > at > org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370) > > at javax.servlet.GenericServlet.init(GenericServlet.java:244) > > at > org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:616) > > ... 20 more > > Caused by: java.lang.NullPointerException > > at java.util.HashMap.putMapEntries(Unknown Source) > > at java.util.HashMap.putAll(Unknown Source) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.registerInterpreterSetting(InterpreterSettingManager.java:405) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.registerInterpreterFromPath(InterpreterSettingManager.java:374) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.init(InterpreterSettingManager.java:327) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.<init>(InterpreterSettingManager.java:171) > > at > org.apache.zeppelin.interpreter.InterpreterSettingManager.<init>(InterpreterSettingManager.java:131) > > at > org.apache.zeppelin.server.ZeppelinServer.<init>(ZeppelinServer.java:151) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown > Source) > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) > > at java.lang.reflect.Constructor.newInstance(Unknown Source) > > at > org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1375) > > at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1083) > > ... 37 more > > INFO [2019-01-20 20:28:19,072] ({main} > AbstractConnector.java[doStart]:266) - Started ServerConnector@5ed190be > {HTTP/1.1}{0.0.0.0:8080} > > INFO [2019-01-20 20:28:19,073] ({main} Server.java[doStart]:379) - > Started @101031ms > > INFO [2019-01-20 20:28:19,073] ({main} ZeppelinServer.java[main]:223) - > Done, zeppelin server started > > Even though log said that zeppelin server has been started, after opening > localhost:8080 I got “HTTP ERROR: 503 Problem accessing. Reason: Service > Unavailable”. > > > I run Apache Zeppelin 0.8.0 on Windows 10. > > > Please, help to figure out what I am doing wrong. Maybe I am missing > something important in documentation. > > > Sincerely yours, > > Nikita Terlych > > > -- Best Regards Jeff Zhang