Thanks for sending around the workaround ! -Neha
On Thu, Aug 2, 2012 at 7:12 PM, Patricio Echagüe <patric...@gmail.com> wrote: > for those of you that run into the same issue, there is a way to tell jetty > to load only once snappy jar and that is by placing the jar in > <JETTY_HOME/lib/ext/... > > Make sure start.config has an entry to that directory and if you use maven, > define Snappy as <scope>provided</scope>. > > and... problem solved. > > On Thu, Aug 2, 2012 at 4:00 PM, Patricio Echagüe <patric...@gmail.com>wrote: > >> Hi folks, I wanted to post this error out here in case it looks familiar. >> I'm been struggling a bit trying to make Kafka snappy compressor work under >> Jetty6. >> >> I'm getting: >> >> Caused by: java.lang.UnsatisfiedLinkError: >> org.xerial.snappy.SnappyNative.maxCompressedLength(I)I >> at org.xerial.snappy.SnappyNative.maxCompressedLength(Native >> Method) >> at org.xerial.snappy.Snappy.maxCompressedLength(Snappy.java:316) >> at >> org.xerial.snappy.SnappyOutputStream.<init>(SnappyOutputStream.java:79) >> at >> org.xerial.snappy.SnappyOutputStream.<init>(SnappyOutputStream.java:66) >> at >> kafka.message.SnappyCompression.<init>(CompressionUtils.scala:61) >> at >> kafka.message.CompressionFactory$.apply(CompressionUtils.scala:82) >> at >> kafka.message.CompressionUtils$.compress(CompressionUtils.scala:109) >> at kafka.message.MessageSet$.createByteBuffer(MessageSet.scala:71) >> at >> kafka.message.ByteBufferMessageSet.<init>(ByteBufferMessageSet.scala:44) >> at >> kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:106) >> at >> kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:105) >> at >> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) >> at >> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) >> at >> scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57) >> at >> scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43) >> at >> scala.collection.TraversableLike$class.map(TraversableLike.scala:206) >> at scala.collection.mutable.ArrayBuffer.map(ArrayBuffer.scala:43) >> at >> kafka.producer.ProducerPool$$anonfun$send$1.apply$mcVI$sp(ProducerPool.scala:105) >> at >> kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100) >> at >> kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100) >> at >> scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57) >> at >> scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43) >> at kafka.producer.ProducerPool.send(ProducerPool.scala:100) >> at kafka.producer.Producer.zkSend(Producer.scala:137) >> at kafka.producer.Producer.send(Producer.scala:99) >> at kafka.javaapi.producer.Producer.send(Producer.scala:103) >> at >> com.lucid.dao.queue.impl.kafka.KafkaProducer.send(KafkaProducer.java:70) >> at >> com.lucid.dao.RemoteDataSourceController.refreshDataSource(RemoteDataSourceController.java:506) >> >> AFAIK the error above occurs when Snappy is initialized multiple times: >> http://code.google.com/p/snappy-java/issues/detail?id=21 >> >> I also tried to declare Snappy as "provided" scope in my maven project and >> placing the jar manually in jetty/lib directory. But this throws a >> ClassNotFoundError. >> >> Does anyone have any advice on what else to try ? >> >> Thanks in advance. >> Patricio >>