[2.2] Stage or dist gives a java.lang.StringIndexOutOfBoundsException

135 views
Skip to first unread message

J

unread,
Oct 14, 2013, 3:56:26 AM10/14/13
to play-fr...@googlegroups.com
Hi,

Since upgrading to play 2.2 when I run stage (or dist) I get the following error

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1875)
    at play.Settings$$anonfun$defaultSettings$54$$anonfun$apply$3.apply(PlaySettings.scala:236)
    at play.Settings$$anonfun$defaultSettings$54$$anonfun$apply$3.apply(PlaySettings.scala:235)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at play.Settings$$anonfun$defaultSettings$54.apply(PlaySettings.scala:234)
    at play.Settings$$anonfun$defaultSettings$54.apply(PlaySettings.scala:231)
    at sbt.Scoped$RichInitialize$$anonfun$map$1$$anonfun$apply$3.apply(Structure.scala:130)
    at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:45)
    at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:45)
    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:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
[error] (public-website/universal:mappings) java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Does anyone have any ideas?

Johan Andren

unread,
Oct 14, 2013, 6:55:59 AM10/14/13
to play-fr...@googlegroups.com
Looking at line 236 in the play sbt plugin sources it seems to loop over files ending with 'routes', something special with the stuff in your conf directory?

J

unread,
Oct 14, 2013, 7:23:16 AM10/14/13
to play-fr...@googlegroups.com
Just the routes file and a few other conf files, some of which are symlinked

application.conf
cluster.xml
logconfig.xml
play.plugins
prod.conf
routes
shared.conf -> ../../shared_application.conf
shared_prod.conf -> ../../shared_prod.conf

Johan Andren

unread,
Oct 14, 2013, 2:22:25 PM10/14/13
to play-fr...@googlegroups.com
I can't see an obvious explanation from those files, maybe you could debug and put a breakpoint at PlaySettings.scala:236 and see what the respective strings contain?

J

unread,
Oct 15, 2013, 3:37:32 AM10/15/13
to play-fr...@googlegroups.com
Seems like the symlink files were causing it to fail, removing them allowed it to build.

KajMagnus

unread,
Jun 28, 2014, 8:04:23 AM6/28/14
to play-fr...@googlegroups.com
I think I've found a bug and a bugfix for those softlinks in conf/, see:  https://groups.google.com/d/msg/play-framework/s4NuYJPzjDg/hhvUt-PbL50J

Best regards, KajMagnus
Reply all
Reply to author
Forward
0 new messages