Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-8525

Add jasper-compiler-jdt runtime dependency to hwi

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 0.13.1
    • None
    • Web UI
    • None

    Description

      Without the jasper-compiler-jdt*.jar in hive/lib, the HWI service cannot compile jsp files.

      I've also noticed that this is mentioned in HIVE-5132 and HIVE-6912 in order to get HWI working. But, no code change or documentation were made in light of this.

      It seems reasonable to include jasper-compiler-jdt as a dependency in hwi/pom.xml. Are there any reasons not to do so?

      ------
      I had to do the following to reproduce this error:

      1. Generate war file (HIVE-8400)
      2. Fix bin/ext/hwi.sh script to make HWI_WAR_FILE be relative to HIVE_HOME
      3. Run `hive --service hwi`
      4. Go to http://localhost:9999/hwi/
      5. A 500 Error appears:

      HTTP ERROR 500
      
      Problem accessing /hwi/. Reason:
      
          Unable to find a javac compiler;
      com.sun.tools.javac.Main is not on the classpath.
      Perhaps JAVA_HOME does not point to the JDK.
      It is currently set to "/usr/java/jdk1.7.0_65/jre"
      
      Caused by:
      
      Unable to find a javac compiler;
      com.sun.tools.javac.Main is not on the classpath.
      Perhaps JAVA_HOME does not point to the JDK.
      It is currently set to "/usr/java/jdk1.7.0_65/jre"
      	at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:129)
      	at org.apache.tools.ant.taskdefs.Javac.findSupportedFileExtensions(Javac.java:979)
      	at org.apache.tools.ant.taskdefs.Javac.scanDir(Javac.java:956)
      	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:927)
      	at org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:220)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
      	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
      	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
      	at org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:503)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:326)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
      	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      
      

      Attachments

        1. HIVE-8525.1.patch
          1 kB
          Peter Slawski

        Issue Links

          Activity

            People

              Unassigned Unassigned
              petersla Peter Slawski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: