Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8104

Inconsistent Jackson versions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.23.3
    • 0.23.3, 2.0.2-alpha
    • None
    • None
    • Reviewed

    Description

      This is a maven build issue.

      Jersey 1.8 is pulling in version 1.7.1 of Jackson. Meanwhile, we are manually specifying that we want version 1.8 of Jackson in the POM files. This causes a conflict where Jackson produces unexpected results when serializing Map objects.

      How to reproduce: try this code:

      ObjectMapper mapper = new ObjectMapper();
      Map<String, Object> m = new HashMap<String, Object>();
      mapper.writeValue(new File("foo"), m);

      You will get an exception:

      Exception in thread "main" java.lang.NoSuchMethodError: org.codehaus.jackson.type.JavaType.isMapLikeType()Z
      at org.codehaus.jackson.map.ser.BasicSerializerFactory.buildContainerSerializer(BasicSerializerFactory.java:396)
      at org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:267)

      Basically the inconsistent versions of various Jackson components are causing this NoSuchMethod error.

      As far as I know, this only occurs when serializing maps-- that's why it hasn't been found and fixed yet.

      Attachments

        1. HADOOP-8104.patch
          0.9 kB
          Alejandro Abdelnur
        2. HADOOP-7470.patch
          0.9 kB
          Alejandro Abdelnur
        3. dependency-tree-old.txt
          315 kB
          Colin McCabe
        4. HADOOP-8104.patch
          2 kB
          Colin McCabe

        Activity

          People

            tucu00 Alejandro Abdelnur
            cmccabe Colin McCabe
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: