{"action":"opened","issue":{"url":"https://api.github.com/repos/klarna/HiveRunner/issues/80","repository_url":"https://api.github.com/repos/klarna/HiveRunner","labels_url":"https://api.github.com/repos/klarna/HiveRunner/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/klarna/HiveRunner/issues/80/comments","events_url":"https://api.github.com/repos/klarna/HiveRunner/issues/80/events","html_url":"https://github.com/klarna/HiveRunner/issues/80","id":299383985,"number":80,"title":"HiveRunner confuse by multiple HiveConf on the classpath","user":{"login":"labbedaine","id":1533999,"avatar_url":"https://avatars3.githubusercontent.com/u/1533999?v=4","gravatar_id":"","url":"https://api.github.com/users/labbedaine","html_url":"https://github.com/labbedaine","followers_url":"https://api.github.com/users/labbedaine/followers","following_url":"https://api.github.com/users/labbedaine/following{/other_user}","gists_url":"https://api.github.com/users/labbedaine/gists{/gist_id}","starred_url":"https://api.github.com/users/labbedaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labbedaine/subscriptions","organizations_url":"https://api.github.com/users/labbedaine/orgs","repos_url":"https://api.github.com/users/labbedaine/repos","events_url":"https://api.github.com/users/labbedaine/events{/privacy}","received_events_url":"https://api.github.com/users/labbedaine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T14:55:34Z","updated_at":"2018-02-22T14:55:34Z","closed_at":null,"author_association":"NONE","body":"I would like to unit test my Hive scripts in the project where I run the production java code.  HiveRunner works well when isolated but doesn't play very nicely when hive-jdbc is on the classpath.  If I understand the Hive source code, it looks for a class HiveConf and use it for instanciation.  Right now I have 2 HiveConf on the classpath, one from **hive-exec** and another one from **hive-common**.  If I remove the hive-jdbc depedency from my project the unit test pass.\r\n\r\nThe error is the following.  Could you please help.\r\n\r\n`java.lang.IllegalStateException: Failed to create HiveServer :Error applying authorization policy on hive configuration: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient\r\n\tat com.klarna.hiverunner.HiveServerContainer.init(HiveServerContainer.java:102)\r\n\tat com.klarna.hiverunner.builder.HiveShellBase.start(HiveShellBase.java:150)\r\n\tat com.klarna.hiverunner.StandaloneHiveRunner.createHiveServerContainer(StandaloneHiveRunner.java:224)\r\n\tat com.klarna.hiverunner.StandaloneHiveRunner.evaluateStatement(StandaloneHiveRunner.java:176)\r\n\tat com.klarna.hiverunner.StandaloneHiveRunner.access$000(StandaloneHiveRunner.java:65)\r\n\tat com.klarna.hiverunner.StandaloneHiveRunner$1$1.evaluate(StandaloneHiveRunner.java:92)\r\n\tat org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)\r\n\tat com.klarna.hiverunner.ThrowOnTimeout$1.run(ThrowOnTimeout.java:42)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.lang.RuntimeException: Error applying authorization policy on hive configuration: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient\r\n\tat org.apache.hive.service.cli.CLIService.init(CLIService.java:114)\r\n\tat org.apache.hive.service.CompositeService.init(CompositeService.java:59)\r\n\tat org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:100)\r\n\tat com.klarna.hiverunner.HiveServerContainer.init(HiveServerContainer.java:85)\r\n\t... 8 more\r\nCaused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient\r\n\tat org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)\r\n\tat org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:127)\r\n\tat org.apache.hive.service.cli.CLIService.init(CLIService.java:112)\r\n\t... 11 more\r\nCaused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient\r\n\tat org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1550)\r\n\tat org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:86)\r\n\tat org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:132)\r\n\tat org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)\r\n\tat org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3005)\r\n\tat org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3024)\r\n\tat org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:503)\r\n\t... 13 more\r\nCaused by: java.lang.reflect.InvocationTargetException\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\r\n\tat org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1548)\r\n\t... 19 more\r\nCaused by: java.lang.NoSuchFieldError: METASTORE_BATCH_RETRIEVE_OBJECTS_MAX\r\n\tat org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:207)\r\n\tat org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:74)\r\n\t... 24 more\r\n\r\n`"}}
{"actor":{"display_login":"labbedaine"}}