hibimport noclassdeffounderror

bpzcxfmw  于 2021-06-01  发布在  Hadoop
关注(0)|答案(1)|浏览(411)

我使用的是hadoop2.9.1和github的最新hipi。它运行在带有openjdk 10的ubuntu18.04.3上。
安装成功了,我试着从hipi运行这个示例。下载了一组图像后,我试图将其转换为hipiimagebundle。结果如下:

hadoop@master:~/workspace/hipi$ tools/hibImport.sh ~/workspace/SampleImages ~/workspace/SampleImages/sampleimages.hib
Input image directory: /home/hadoop/workspace/SampleImages
Input FS: local FS
Output HIB: /home/hadoop/workspace/SampleImages/sampleimages.hib
Overwrite HIB if it exists: false
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/opt/hadoop/share/hadoop/common/lib/hadoop-auth-2.9.1.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.NoClassDefFoundError: org/hipi/imagebundle/HipiImageBundle
        at org.hipi.tools.HibImport.main(HibImport.java:124)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
Caused by: java.lang.ClassNotFoundException: org.hipi.imagebundle.HipiImageBundle
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 7 more
w8biq8rn

w8biq8rn1#

问题解决了。hipi中有一个bug。
在tools/build.gradle中,注解了错误的一行:

hadoop@master:/opt/hipi/tools$ cat build.gradle 
subprojects {

  dependencies {
    compile project(':core')
  }

  jar {
    manifest {
      # Uncomment this line
      attributes("Class-Path" : configurations.runtime.collect { it.getAbsolutePath() }.join(' '));
      # Comment this line out
  //    attributes("Class-Path" : configurations.runtime.collect { it.toURI() }.join(' '));
    }
  }
}

第二个问题是图像损坏的问题。当你加载它们时,你会得到一个nullpointerexception。

相关问题