While crawling NullPointerException appeared for testing the Java code.

I wrote a program to crawl a website. But when I am testing it with coutchbase it is throwing the following error:

13:03:12.561 [CESystem-akka.actor.default-dispatcher-8] DEBUG com.crayondata.ce.Crawler$ - Fetching request: Request(http://www.belk.com/products/bleu-rod-beattie-chain-reaction-shirred-one...,{revwCount=, rating=},-1,GET,null,null,true,false,true,false)
13:03:12.561 [CESystem-akka.actor.default-dispatcher-8] DEBUG com.crayondata.ce.client.AsyncHttp$ - Sending HttpStart for http://www.belk.com/products/bleu-rod-beattie-chain-reaction-shirred-one...
13:03:12.606 [CESystem-akka.actor.default-dispatcher-3] DEBUG com.crayondata.ce.client.Kafka$ - Publishing 1 urls to the queue
[ERROR] [02/21/2014 13:03:12.620] [CESystem-akka.actor.default-dispatcher-5] [akka://CESystem/user/extractingActor] null
java.lang.NullPointerException
at com.crayondata.ce.client.AwsS3$.getPath(AwsS3.scala:87)
at com.crayondata.ce.client.Couchbase$.getCachedTS(Couchbase.scala:53)
at com.crayondata.ce.client.Kafka$$anonfun$publish$2.apply(Kafka.scala:53)
at com.crayondata.ce.client.Kafka$$anonfun$publish$2.apply(Kafka.scala:52)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
at com.crayondata.ce.client.Kafka$.publish(Kafka.scala:52)
at com.crayondata.ce.Extractor$$anonfun$extract$1$$anonfun$apply$mcV$sp$1.apply(Extractor.scala:20)
at com.crayondata.ce.Extractor$$anonfun$extract$1$$anonfun$apply$mcV$sp$1.apply(Extractor.scala:19)
at scala.util.Success.foreach(Try.scala:205)
at com.crayondata.ce.Extractor$$anonfun$extract$1.apply$mcV$sp(Extractor.scala:19)
at com.crayondata.ce.Extractor$$anonfun$extract$1.apply(Extractor.scala:16)
at com.crayondata.ce.Extractor$$anonfun$extract$1.apply(Extractor.scala:16)
at com.yammer.metrics.scala.Timer.time(Timer.scala:17)
at com.crayondata.ce.Extractor$.extract(Extractor.scala:16)
at com.crayondata.ce.ExtractingActor$$anonfun$receive$2.applyOrElse(Actors.scala:66)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
at akka.actor.ActorCell.invoke(ActorCell.scala:456)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Thanks in advance for any kind of suggetions.

1 Answer

« Back to question.

From the stack trace posted, that does not appear to be happening in the Couchbase client.

We can probably help better if you can elaborate on the issue or share a simple test case that demonstrates the problem.