我是 Hbase & phoenix 的新手。我正在尝试使用 Squirrel 客户端通过 Phoenix JDBC 驱动程序连接到 HBASE。不知何故,我似乎遇到了一个奇怪的错误,运行时抱怨 NoSuchMethod 异常。我已经在Squirrel的lib文件夹中包含了相关的客户端jar phoenix-4.4.0-HBase-1.0-client ,并且已经成功注册了驱动。当我尝试连接时,我得到了这个似乎有点奇怪的异常。我已经提取了 jar 并看到方法getCurrentUser()确实存在于 org/apache/hadoop/security/UserGroupInformation.class 文件中。
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.hadoop.security.UserGroupInformation.getCurrentUser()Lorg/apache/hadoop/security/UserGroupInformation;
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:202)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)