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

Switch to Plain View
Avro >> mail # user >> SnappyException even though the avro-tools JAR is present


+
Public Network Services 2013-02-01, 03:17
+
Terry Healy 2013-02-04, 16:58
Copy link to this message
-
Re: SnappyException even though the avro-tools JAR is present
It is actually also in the avro-tools-1.7.3 JAR (I checked before adding
it).

The problem was that there was another (older) Avro JAR somewhere in the
classpath of one of the projects loaded, so that did not have the Snappy
CODEC and, having taken priority, it caused the exception, while I had
added everything correctly in the code I was running.

Thanks for the advice! :-)
On Mon, Feb 4, 2013 at 8:58 AM, Terry Healy <[EMAIL PROTECTED]> wrote:

> Hi-
>
> This is within snappy-java-1.0.4.1.jar (version may vary - that's where
> I found it). You will need to add that .jar to your classpath.
>
> HTH,
>
> Terry
>
> On 01/31/2013 10:17 PM, Public Network Services wrote:
> > Hi...
> >
> > I am trying to run some sample code from the Avro 1.7.3 distribution
> > and, for the weather-snappy.avro file, the following exception occurs:
> >
> >     Exception in thread "main" java.lang.NoClassDefFoundError:
> >     org/xerial/snappy/SnappyException
> >     at
> >
> org.apache.avro.file.SnappyCodec$Option.createInstance(SnappyCodec.java:34)
> >     at
> >
> org.apache.avro.file.DataFileStream.resolveCodec(DataFileStream.java:139)
> >     at
> >
> org.apache.avro.file.DataFileStream.initialize(DataFileStream.java:125)
> >     at org.apache.avro.file.DataFileStream.<init>(DataFileStream.java:84)
> >
> >     . . .
> >
> >
> > The above message persists even after adding avro-tools-1.7.3.jar to the
> > project classpath.
> >
> > So, what is the easy way out of this? :-)
>