Guest User

Untitled

a guest
Nov 10th, 2017
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.28 KB | None | 0 0
  1. Caused by: java.lang.RuntimeException: java.lang.RuntimeException: class org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback not org.apache.hadoop.security.GroupMappingServiceProvider
  2. The complete error:
  3.  
  4. java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://l4284t.sss.se.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.COM;httpPath=cliservice: Could not establish connection to jdbc:hive2://l4284t.sss.se.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.COM;httpPath=cliservice: org.apache.hive.org.apache.http.client.ClientProtocolException
  5. at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:144)
  6. at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:73)
  7. at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1258)
  8. at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:204)
  9. at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$500(SnpsDialogTestConnet.java:62)
  10. at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$6.doInBackground(SnpsDialogTestConnet.java:402)
  11. at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$6.doInBackground(SnpsDialogTestConnet.java:398)
  12. at oracle.odi.ui.framework.AbsUIRunnableTask.run(AbsUIRunnableTask.java:258)
  13. at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:961)
  14. at java.lang.Thread.run(Thread.java:745)
  15. Caused by: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://l4284t.sss.se.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.COM;httpPath=cliservice: Could not establish connection to jdbc:hive2://l4284t.sss.se.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.COM;httpPath=cliservice: org.apache.hive.org.apache.http.client.ClientProtocolException
  16. at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:144)
  17. at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:73)
  18. at oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter.getConnection(OnConnectOnDisconnectDataSourceAdapter.java:87)
  19. at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter$ConnectionProcessor.run(LoginTimeoutDatasourceAdapter.java:228)
  20. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  21. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  22. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  23. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  24. ... 1 more
  25. Caused by: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://l4284t.sss.se.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.COM;httpPath=cliservice: Could not establish connection to jdbc:hive2://l4284t.sss.se.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.COM;httpPath=cliservice: org.apache.hive.org.apache.http.client.ClientProtocolException
  26. at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:211)
  27. at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
  28. at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:412)
  29. at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:385)
  30. at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:352)
  31. at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:331)
  32. ... 6 more
  33. Caused by: java.sql.SQLException: Could not establish connection to jdbc:hive2://l4284t.sss.se.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.COM;httpPath=cliservice: org.apache.hive.org.apache.http.client.ClientProtocolException
  34. at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:589)
  35. at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:188)
  36. ... 11 more
  37. Caused by: org.apache.hive.org.apache.thrift.transport.TTransportException: org.apache.hive.org.apache.http.client.ClientProtocolException
  38. at org.apache.hive.org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:297)
  39. at org.apache.hive.org.apache.thrift.transport.THttpClient.flush(THttpClient.java:313)
  40. at org.apache.hive.org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)
  41. at org.apache.hive.org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
  42. at org.apache.hive.service.rpc.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:162)
  43. at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:154)
  44. at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:578)
  45. ... 12 more
  46. Caused by: org.apache.hive.org.apache.http.client.ClientProtocolException
  47. at org.apache.hive.org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
  48. at org.apache.hive.org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117)
  49. at org.apache.hive.org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
  50. at org.apache.hive.org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:251)
  51. ... 18 more
  52. Caused by: org.apache.hive.org.apache.http.HttpException: java.lang.RuntimeException: class org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback not org.apache.hadoop.security.GroupMappingServiceProvider
  53. at org.apache.hive.jdbc.HttpRequestInterceptorBase.process(HttpRequestInterceptorBase.java:86)
  54. at org.apache.hive.org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:132)
  55. at org.apache.hive.org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:182)
  56. at org.apache.hive.org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
  57. at org.apache.hive.org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
  58. at org.apache.hive.org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:84)
  59. at org.apache.hive.org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
  60. ... 21 more
  61. Caused by: org.apache.hive.org.apache.http.HttpException: java.lang.RuntimeException: class org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback not org.apache.hadoop.security.GroupMappingServiceProvider
  62. at org.apache.hive.jdbc.HttpKerberosRequestInterceptor.addHttpAuthHeader(HttpKerberosRequestInterceptor.java:68)
  63. at org.apache.hive.jdbc.HttpRequestInterceptorBase.process(HttpRequestInterceptorBase.java:74)
  64. ... 27 more
  65. Caused by: java.lang.RuntimeException: java.lang.RuntimeException: class org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback not org.apache.hadoop.security.GroupMappingServiceProvider
  66. at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2273)
  67. at org.apache.hadoop.security.Groups.<init>(Groups.java:99)
  68. at org.apache.hadoop.security.Groups.<init>(Groups.java:95)
  69. at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:420)
  70. at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:324)
  71. at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:291)
  72. at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:846)
  73. at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:816)
  74. at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:689)
  75. at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge.getCurrentUGIWithConf(HadoopThriftAuthBridge.java:122)
  76. at org.apache.hive.service.auth.HttpAuthUtils.getKerberosServiceTicket(HttpAuthUtils.java:81)
  77. at org.apache.hive.jdbc.HttpKerberosRequestInterceptor.addHttpAuthHeader(HttpKerberosRequestInterceptor.java:62)
  78. ... 28 more
  79. Caused by: java.lang.RuntimeException: class org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback not org.apache.hadoop.security.GroupMappingServiceProvider
  80. at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2267)
  81. ... 39 more<br>
  82.  
  83. AddVMOption -Djava.security.krb5.conf=C:OracleMiddlewareOracle_Homeoracle_commonmodulesdatadirectkerb5.conf
  84. AddVMOption -Djavax.security.auth.useSubjectCredsOnly=false
  85.  
  86. public class App
  87. {
  88. public static void main( String[] args ) throws ClassNotFoundException, SQLException {
  89. System.out.println( "Hello World!" );
  90.  
  91. System.setProperty("javax.security.auth.useSubjectCredsOnly","false");
  92. System.setProperty("java.security.krb5.conf","C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\datadirect\kerb5.conf");
  93. //System.setProperty("sun.security.krb5.debug","true");Class.forName("org.apache.hive.jdbc.HiveDriver");
  94. System.out.println("getting connection");
  95. Connection con = DriverManager.getConnection("jdbc:hive2://l4284t.sss.se.scania.com:10501/;transportMode=http;principal=hive/_HOST@GLOBAL.SCD.SCANIA.COM;httpPath=cliservice");
  96. System.out.println("Connected");
  97.  
  98. Statement stmt = con.createStatement();
  99. ResultSet rs = stmt.executeQuery("show tables");
  100. while (rs.next()){
  101. System.out.println("table name : "+rs.getString(1));
  102. }
  103. stmt.close();
  104. con.close();
  105. }
  106. }
Add Comment
Please, Sign In to add comment