找不到HBASeComontestingUtility类
我正在尝试为我们的hbase设置设置unittests。但是,测试失败,错误消息为“java.lang.NoClassDefFoundError:org/apache/hadoop/hbase/hbaseCommonteStinguility” 我尝试将各种包添加到gradle文件中(希望找到这个难以捉摸的类)。我的gradle文件如下所示: compile 'org.apache.hbase:hbase-client:1.1.2' testCompile 'org.apache.hbase:hbase-testing-util:1.1.2' testCompile 'org.apache.hbase:hbase-common:1.1.2' testCompile 'org.apache.hbase:hbase:1.1.2' testCompile 'org.apache.hbase:hbase-server:1.1.2' testCompile 'org.apache.hbase:hbase-hadoop-compat:1.1.2' testCompile 'org.apache.hbase:hbase-hadoop2-compat:1.1.2' testCompile 'org.apache.hbase:hbase-annotations:1.1.2' 编译“org.apache.hbase:hbase客户端:1.1.2” testCompile'org.apache.hbase:hbase testing util:1.1.2' testCompile'org.apache.hbase:hbase common:1.1.2' testCompile'org.apache.hbase:hbase:1.1.2' testCompile'org.apache.hbase:hbase服务器:1.1.2' testCompile'org.apache.hbase:hbase-hadoop-compat:1.1.2' testCompile'org.apache.hbase:hbase-hadoop2-compat:1.1.2' testCompile'org.apache.hbase:hbase注释:1.1.2' 任何关于包含HBASeCommonteStinguility的magic软件包的输入。找不到HBASeComontestingUtility类,hbase,Hbase,我正在尝试为我们的hbase设置设置unittests。但是,测试失败,错误消息为“java.lang.NoClassDefFoundError:org/apache/hadoop/hbase/hbaseCommonteStinguility” 我尝试将各种包添加到gradle文件中(希望找到这个难以捉摸的类)。我的gradle文件如下所示: compile 'org.apache.hbase:hbase-client:1.1.2' testCompile 'org.apache.hba
谢谢您需要hbase-common-1.1.2-tests.jar。在maven中,您将此依赖项指定为(注意测试分类器):
org.apache.hbase
hbase通用
1.1.2
测验
试验
我不能100%确定这是如何翻译成格拉德尔的。尝试org.apache.hbase:hbase common:1.1.2:tests
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-common</artifactId>
<version>1.1.2</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>