Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro, mail # user - Java MapReduce Avro Jackson Error


+
Deepak Nettem 2012-03-19, 22:48
+
Deepak Nettem 2012-03-19, 23:20
+
Tatu Saloranta 2012-03-19, 23:27
+
Deepak Nettem 2012-03-20, 00:05
+
Deepak Nettem 2012-03-20, 00:06
+
Scott Carey 2012-03-20, 01:06
+
Tatu Saloranta 2012-03-20, 01:12
+
Deepak Nettem 2012-03-20, 01:23
+
Tatu Saloranta 2012-03-20, 01:34
+
Something Something 2012-03-20, 01:43
+
Scott Carey 2012-03-20, 03:25
+
Deepak Nettem 2012-03-27, 02:58
Copy link to this message
-
Re: Java MapReduce Avro Jackson Error
Scott Carey 2012-03-27, 03:25
What happens if you remove avro-tools entirely?

What in there are you using?  It is all command-line tools, if there is
anything in there you need, you can use the equivalent Java API instead.  If
there is something in there of use that is not a command line tool, we
should make it available in the other modules.

What is the stack trace in full, not just the top error?  What code (Avro or
Hadoop) is triggering it?

"Error:
org.codehaus.jackson.JsonFactory.enable(Lorg/codehaus/jackson/JsonParser$Fea
ture;)Lorg/codehaus/jackson/JsonFactory;"

is not enough info if the basic things are not working.

On 3/26/12 7:58 PM, "Deepak Nettem" <[EMAIL PROTECTED]> wrote:

> Hi Folks,
>
> This issue is still not resolved :( Any other ideas?
>
> Best,
> Deepak
>
> On Mon, Mar 19, 2012 at 11:25 PM, Scott Carey <[EMAIL PROTECTED]> wrote:
>> If you are using avro-tools, beware it is a shaded jar with all dependencies
>> inside of it for use as a command line tool (java ­jar
>> avro-tools-VERSION.jar).
>>
>> If you are using avro-tools in your project for some reason (there is really
>> only command line utilities in it) use the nodeps classifier:
>>
>> <classifier>nodeps</classifier>
>>
>> http://repo1.maven.org/maven2/org/apache/avro/avro-tools/1.6.3/
>>
>> Note the nodeps jar is 47K, while the default jar is 10MB.
>>
>>
>> For what it is worth, I removed the Jackson jar from our hadoop install long
>> ago.  It is used to dump configuration files to JSON there, a peripheral
>> feature we don't use.
>>
>> Another thing that you may want to do is change your Hadoop dependency scope
>> to
>> <scope>provided</scope> since hadoop will be put on your classpath by the
>> hadoop environment.   Short of this, excluding the chained Hadoop
>> dependencies you aren't using (most likely: jetty,  kfs, and the
>> tomcat:jasper and eclipse:jdt stuff) may help.
>>
>> On 3/19/12 6:23 PM, "Deepak Nettem" <[EMAIL PROTECTED]> wrote:
>>
>>> Hi Tatu / Scott,
>>>
>>> Thanks for your replies. I replaced the earlier dependencies with these:
>>>
>>>    <dependency>
>>>     <groupId>org.apache.avro</groupId>
>>>     <artifactId>avro-tools</artifactId>
>>>     <version>1.6.3</version>
>>>     </dependency>
>>>    
>>>     <dependency>
>>>     <groupId>org.apache.avro</groupId>
>>>     <artifactId>avro</artifactId>
>>>     <version>1.6.3</version>
>>>     </dependency>
>>>
>>>     <dependency>
>>>     <groupId>org.codehaus.jackson</groupId>
>>>       <artifactId>jackson-mapper-asl</artifactId>
>>>       <version>1.8.8</version>
>>>       <scope>compile</scope>
>>>     </dependency>
>>>
>>>     <dependency>
>>>     <groupId>org.codehaus.jackson</groupId>
>>>       <artifactId>jackson-core-asl</artifactId>
>>>       <version>1.8.8</version>
>>>       <scope>compile</scope>
>>>     </dependency>
>>>
>>> And this is my app dependency tree:
>>>
>>> [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ AvroTest ---
>>> [INFO] org.avrotest:AvroTest:jar:1.0-SNAPSHOT
>>> [INFO] +- junit:junit:jar:3.8.1:test (scope not updated to compile)
>>> [INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.8.8:compile
>>> [INFO] +- org.codehaus.jackson:jackson-core-asl:jar:1.8.8:compile
>>> [INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.3:compile
>>> [INFO] |  +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
>>> [INFO] |  +- commons-collections:commons-collections:jar:3.2.1:compile
>>> [INFO] |  +- commons-lang:commons-lang:jar:2.4:compile
>>> [INFO] |  +- commons-logging:commons-logging:jar:1.1.1:compile
>>> [INFO] |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
>>> [INFO] +- org.apache.avro:avro-tools:jar:1.6.3:compile
>>> [INFO] |  \- org.slf4j:slf4j-api:jar:1.6.4:compile
>>> [INFO] +- org.apache.avro:avro:jar:1.6.3:compile
>>> [INFO] |  +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
>>> [INFO] |  \- org.xerial.snappy:snappy-java:jar:1.0.4.1:compile
>>> [INFO] \- org.apache.hadoop:hadoop-core:jar:0.20.2:compile
>>> [INFO]    +- commons-cli:commons-cli:jar:1.2:compile
+
Deepak Nettem 2012-03-29, 14:28
+
Ken Krugler 2012-03-20, 02:51
+
Deepak Nettem 2012-03-20, 03:04