[2.3.1-Scala] java.util.NoSuchElementException: key not found on compilation

1,876 views
Skip to first unread message

Marius Soutier

unread,
Jun 26, 2014, 4:27:44 PM6/26/14
to play-fr...@googlegroups.com
Hi guys,

I’m seeing a strange error with Play 2.3.1. I have multi-project setup where each project enables PlayScala, with some inter-project dependencies. No matter which project I compile, it’s always failing on one specific template with the following error:

[sub-project] $ last Common/compile:compile
[debug]
[debug] Initial source changes:
[debug]     removed:Set()
[debug]     added: Set()
[debug]     modified: Set()
[debug] Removed products: Set()
[debug] External API changes: API Changes: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug]
[debug] Sources indirectly invalidated by:
[debug]     product: Set()
[debug]     binary dep: Set()
[debug]     external source: Set()
[debug] All initially invalidated sources: Set()
java.util.NoSuchElementException: key not found: /.../Common/target/scala-2.10/src_managed/main/com/.../.../views/html/admin.template.scala
Any ideas?

Cheers
- Marius

Mike Bryant

unread,
Jun 26, 2014, 6:09:46 PM6/26/14
to play-fr...@googlegroups.com
I'd like to know the cause of this too. I experienced it recently during an update from 2.2 to 2.3. It seemed to get resolved by fixing an issue with sub-project aggregation that was causing things to not be properly cleaned.

Marius Soutier

unread,
Jun 27, 2014, 2:32:00 AM6/27/14
to play-fr...@googlegroups.com
Yes, after deleting all target folders it seems to work.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lars Hupel

unread,
Jul 19, 2014, 8:21:43 AM7/19/14
to play-fr...@googlegroups.com, hu...@in.tum.de
I have the same issue. Here's the stack trace:

java.util.NoSuchElementException: key not found: /home/lars/worktime-app/target/scala-2.10/src_managed/main/views/html/main.template.scala
        at scala.collection.MapLike$class.default(MapLike.scala:228)
        at scala.collection.AbstractMap.default(Map.scala:58)
        at scala.collection.MapLike$class.apply(MapLike.scala:141)
        at scala.collection.AbstractMap.apply(Map.scala:58)
        at play.PlayCommands$$anonfun$PostCompile$1$$anonfun$7.apply(PlayCommands.scala:90)
        at play.PlayCommands$$anonfun$PostCompile$1$$anonfun$7.apply(PlayCommands.scala:89)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
        at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
        at play.PlayCommands$$anonfun$PostCompile$1.apply(PlayCommands.scala:89)
        at play.PlayCommands$$anonfun$PostCompile$1.apply(PlayCommands.scala:76)
        at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:35)
        at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:34)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
        at sbt.std.Transform$$anon$4.work(System.scala:64)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:244)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:701)

As Marius said, a simple `sbt clean` seems to "fix" it though.
Reply all
Reply to author
Forward
0 new messages