delving / narthex

Performs bulk dataset-processing for the Delving platform.
Apache License 2.0
3 stars 1 forks source link

"next on empty iterator" #118

Open hanswesterbeek opened 8 years ago

hanswesterbeek commented 8 years ago

In the words of @kiivihal:

that could very well by a mapping or harvesting issue. It happens when you run a process on something that has no content

Reproduction:

  1. Upload a sipzip
  2. Process, analyze and save it. This works
  3. Enter OAI-PMH url
  4. Press 'Harvest'. The dataset then appears as 'sourced'.
  5. Press 'Process'. This appears to work but is so fast that I suspect nothing is actually done.
  6. Press 'analyze'. This fails with the following stacktrace:
[error] d.DatasetActor - next on empty iterator
java.util.NoSuchElementException: next on empty iterator
    at scala.collection.Iterator$$anon$2.next(Iterator.scala:39)
    at scala.collection.Iterator$$anon$2.next(Iterator.scala:37)
    at scala.collection.MapLike$$anon$2.next(MapLike.scala:216)
    at scala.collection.IterableLike$class.head(IterableLike.scala:107)
    at scala.collection.AbstractIterable.head(Iterable.scala:54)
    at analysis.TreeNode$.apply(TreeNode.scala:90)
    at analysis.Analyzer$$anonfun$receive$1$$anonfun$applyOrElse$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(Analyzer.scala:82)
    at analysis.Analyzer$$anonfun$receive$1$$anonfun$applyOrElse$1$$anonfun$apply$mcV$sp$1.apply(Analyzer.scala:76)
    at analysis.Analyzer$$anonfun$receive$1$$anonfun$applyOrElse$1$$anonfun$apply$mcV$sp$1.apply(Analyzer.scala:76)
    at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
hanswesterbeek commented 8 years ago

This happens when the file NarthexFiles/devorg/datasets/enb-40-beeldmateriaal/processed/00000.xml is empty. Said file is the result of the 'process' step.

hanswesterbeek commented 8 years ago

Discuss this with Sjoerd to come up with a correct solution, not just fight symptoms.