Uploaded image for project: 'Hadoop Distributed Data Store'
  1. Hadoop Distributed Data Store
  2. HDDS-1351

NoClassDefFoundError when running ozone genconf

    XMLWordPrintableJSON

    Details

    • Target Version/s:

      Description

      ozone genconf fails due to incomplete classpath.

      Steps to reproduce:

      1. build and run Ozone
      2. run ozone genconf in one of the containers:
      $ ozone genconf /tmp
      Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/xml/bind/v2/model/annotation/AnnotationReader
        at java.lang.ClassLoader.defineClass1(Native Method)
      ...
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:242)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:234)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:441)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:641)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
        at org.apache.hadoop.hdds.conf.OzoneConfiguration.readPropertyFromXml(OzoneConfiguration.java:57)
        at org.apache.hadoop.ozone.genconf.GenerateOzoneRequiredConfigurations.generateConfigurations(GenerateOzoneRequiredConfigurations.java:103)
        at org.apache.hadoop.ozone.genconf.GenerateOzoneRequiredConfigurations.call(GenerateOzoneRequiredConfigurations.java:73)
        at org.apache.hadoop.ozone.genconf.GenerateOzoneRequiredConfigurations.call(GenerateOzoneRequiredConfigurations.java:50)
        at picocli.CommandLine.execute(CommandLine.java:919)
      ...
        at org.apache.hadoop.ozone.genconf.GenerateOzoneRequiredConfigurations.main(GenerateOzoneRequiredConfigurations.java:68)
      Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.model.annotation.AnnotationReader
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 36 more
      

      AnnotationReader is in jaxb-core jar, which is not in the hadoop-ozone-tools classpath.

        Attachments

        1. HDDS-1351.001.patch
          0.6 kB
          Attila Doroszlai
        2. HDDS-1351.002.patch
          0.8 kB
          Attila Doroszlai

          Activity

            People

            • Assignee:
              adoroszlai Attila Doroszlai
              Reporter:
              adoroszlai Attila Doroszlai
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2.5h
                2.5h