Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-5157

Shiro environment initialization fails when zeppelin installation path includes blank spaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.8.2
    • None
    • zeppelin-server
    • None

    Description

      There is a problem in zeppelin when the installation directory contains blank spaces.

      The shiroConfigLocations parameter is sent to Shiro using the toURI method.

      webapp.setInitParameter("shiroConfigLocations", new File(shiroIniPath).toURI().toString());
      

      This causes an error when shiro tries to create a new FileInputStream because shiro does not support characters introduced with the toURI method in the current version.

      The error that Shiro gives is:

      org.apache.shiro.config.ConfigurationException: java.io.FileNotFoundException
      at org.apache.shiro.web.env.IniWebEnvironment.convertPathToIni(IniWebEnvironment.java:255)
      at org.apache.shiro.web.env.IniWebEnvironment.createIni(IniWebEnvironment.java:163)
      at org.apache.shiro.web.env.IniWebEnvironment.getSpecifiedIni(IniWebEnvironment.java:121)
      at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:77)
      at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
      at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
      at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
      at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
      at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
      at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:957)
      at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:552)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:922)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:364)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:168)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.server.Server.start(Server.java:415)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.Server.doStart(Server.java:382)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.apache.zeppelin.server.ZeppelinServer.main(ZeppelinServer.java:235)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            llozano Luis Lozano Coira
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: