Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.3
    • Fix Version/s: 0.23.3, 2.0.2-alpha
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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.

      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 Patrick McCabe
      4. HADOOP-8104.patch
        2 kB
        Colin Patrick McCabe

        Activity

        Colin Patrick McCabe created issue -
        Colin Patrick McCabe made changes -
        Field Original Value New Value
        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:
        <code>
        ObjectMapper mapper = new ObjectMapper();
         Map<String, Object> m = new HashMap<String, Object>();
        mapper.writeValue(new File("foo"), m);
        </code>

        You will get an exception:
        <code>
        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)
        </code>

        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.
        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:
        {quote}
        ObjectMapper mapper = new ObjectMapper();
         Map<String, Object> m = new HashMap<String, Object>();
        mapper.writeValue(new File("foo"), m);
        {quote}

        You will get an exception:
        {quote}
        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)
        {quote}

        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.
        Colin Patrick McCabe made changes -
        Attachment HADOOP-8104.patch [ 12515674 ]
        Colin Patrick McCabe made changes -
        Attachment dependency-tree-old.txt [ 12515775 ]
        Alejandro Abdelnur made changes -
        Attachment HADOOP-7470.patch [ 12515822 ]
        Eli Collins made changes -
        Assignee Colin Patrick McCabe [ cmccabe ] Alejandro Abdelnur [ tucu00 ]
        Alejandro Abdelnur made changes -
        Attachment HADOOP-8104.patch [ 12516373 ]
        Alejandro Abdelnur made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags Reviewed [ 10343 ]
        Affects Version/s 0.23.3 [ 12320059 ]
        Fix Version/s 0.23.3 [ 12320059 ]
        Alejandro Abdelnur made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Arun C Murthy made changes -
        Fix Version/s 2.0.0 [ 12320352 ]
        Fix Version/s 0.23.3 [ 12320059 ]
        Robert Joseph Evans made changes -
        Fix Version/s 0.23.3 [ 12320059 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Arun C Murthy made changes -
        Fix Version/s 2.0.2-alpha [ 12322473 ]
        Fix Version/s 2.0.0-alpha [ 12320352 ]

          People

          • Assignee:
            Alejandro Abdelnur
            Reporter:
            Colin Patrick McCabe
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development