hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-8104) Inconsistent Jackson versions
Date Thu, 23 Feb 2012 01:25:49 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-8104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Colin Patrick McCabe updated HADOOP-8104:
-----------------------------------------

    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:
{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.

  was:
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.

    
> Inconsistent Jackson versions
> -----------------------------
>
>                 Key: HADOOP-8104
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8104
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message