1 Reply Latest reply on Aug 16, 2016 11:31 AM by rareddy

    does teiid support connecting to kerberos enabled hive via jdbc?

    parth_anand

      I have a kerberos secured cloudera cluster. I am trying to connect to hive via jdbc using these jars

       

      commons-configuration-1.10.jar

      commons-logging-1.1.3.jar    

      hadoop-common-2.2.0.jar      

      hadoop-core-1.2.1.jar                              

      hive-common-0.13.1.jar       

      hive-contrib-0.13.1.jar      

      hive-exec-0.13.1.jar         

      hive-jdbc-0.14.0.jar         

      hive-metastore-0.13.1.jar    

      hive-service-0.13.1.jar      

      httpclient-4.2.5.jar         

      httpcore-4.2.5.jar           

      libfb303-0.9.0.jar           

      libthrift-0.9.0.jar          

      slf4j-api-1.7.7.jar          

       

      Getting exception:

       

      org.apache.cxf.interceptor.Fault

      at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)

      at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)

      at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)

      at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)

      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)

      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)

      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)

      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)

      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)

      at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)

      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)

      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)

      at com.pb.spectrum.platform.server.common.manager.service.soap.RemoteServerForwardingServlet.service(RemoteServerForwardingServlet.java:39)

      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:821)

      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1758)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)

      at com.g1.dcg.server.security.web.filters.SecurityContextFilter.doFilter(SecurityContextFilter.java:34)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

      at com.g1.dcg.server.security.web.filters.RequiresAuthenticationFilter.internalFilter(RequiresAuthenticationFilter.java:97)

      at com.g1.dcg.server.security.web.filters.AbstractClientNameAwareFilter.doFilter(AbstractClientNameAwareFilter.java:42)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

      at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

      at com.g1.dcg.server.security.web.filters.SecurityContextPersistenceFilter.internalFilter(SecurityContextPersistenceFilter.java:29)

      at com.g1.dcg.server.security.web.filters.AbstractClientNameAwareFilter.doFilter(AbstractClientNameAwareFilter.java:42)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

      at com.g1.dcg.server.security.web.filters.LoggingFilter.doFilter(LoggingFilter.java:36)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

      at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)

      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)

      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1741)

      at com.g1.dcg.server.security.web.filters.ClientNameFilter.doFilter(ClientNameFilter.java:52)

      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1741)

      at com.g1.dcg.server.security.web.filters.AuthenticationCookieFilter.internalFilter(AuthenticationCookieFilter.java:42)

      at com.g1.dcg.server.security.web.filters.AbstractClientNameAwareFilter.doFilter(AbstractClientNameAwareFilter.java:42)

      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1741)

      at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:125)

      at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:65)

      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1741)

      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)

      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)

      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)

      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)

      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)

      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)

      at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:318)

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)

      at org.eclipse.jetty.server.Server.handle(Server.java:517)

      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)

      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)

      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)

      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)

      at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)

      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)

      at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)

      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)

      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)

      at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.ExceptionInInitializerError

      at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion(ShimLoader.java:137)

      at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:113)

      at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:80)

      at org.apache.hadoop.hive.shims.ShimLoader.getHadoopThriftAuthBridge(ShimLoader.java:104)

      at org.apache.hive.service.auth.KerberosSaslHelper.getKerberosTransport(KerberosSaslHelper.java:72)

      at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:362)

      at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:187)

      at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:163)

      at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)

      at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)

      ... 68 more

      Caused by: java.lang.NullPointerException

      at java.util.Properties$LineReader.readLine(Properties.java:434)

      at java.util.Properties.load0(Properties.java:353)

      at java.util.Properties.load(Properties.java:341)

      at org.apache.hadoop.util.VersionInfo.<init>(VersionInfo.java:51)

      at org.apache.hadoop.util.VersionInfo.<clinit>(VersionInfo.java:97)

      ... 97 more