Play 2.6.6 released!

859 views
Skip to first unread message

Greg Methvin

unread,
Oct 5, 2017, 8:18:50 PM10/5/17
to play-framework

The Play Team is pleased to announce the release of Play Framework 2.6.6. This is the latest stable release of Play.

Getting Play

  • To download Play, visit www.playframework.com/download.
  • To upgrade an existing Play 2.6 project, edit your project/plugins.sbt file and set the sbt-plugin to 2.6.6.
  • To update an older Play project, take a look at the Migration Guide.

Changelog

See the full list of changes and the 2.6.6 milestone on GitHub.

There are a number of documentation improvements, fixes, and backwards-compatible library updates.

sbt 1 support

The biggest change is that Play now has support for sbt 1. sbt 1 is a major version update for sbt. Here are the headline features:

  • sbt 1 is based on Scala 2.12, so we can use modern Scala in our builds!
  • sbt 1 reintroduces Zinc 1, a faster incremental compiler that uses class-based name hashing.
  • sbt 1 by default downloads artifacts in parallel.

This is the result of combined work from Play and sbt teams. The work involves not only the Play project itself, but a number of other sbt plugins, Twirl and sbt-web plugins.

To use Play with sbt 1, you need to update to 2.6.6 and change your project/build.properties like:

sbt.version=1.0.2

You may need to update other plugins. Check this page to see if the plugins used by your project already have support for sbt 1.

Credits

Thanks to the community for the detailed reports and invaluable help.

Special thanks to the following contributors who helped with this release: Greg Methvin, Marcos Pereira, Shruti Singh, Lousanna, Matthias Kurz, Rajesh Pitty, Toshiyuki Takahashi, Zack Grannan, kerami, Aristotelis Dossas, rmcloughlin, Ben Nelson and Derek Wickern.

Start contributing!

Play is involved with Hacktoberfest. So, if you want to start contributing to Play, check our issues tagged with "hacktoberfest". Our contributor guidelines are also a good place to start. And, of course, let us know if need any help to submit your first contribution.

--
Greg Methvin
Tech Lead - Play Framework

Enrico Morelli

unread,
Oct 6, 2017, 4:35:30 AM10/6/17
to Play Framework
Thanks for your wonderful work. I tried to update a project, but I receive some warnings:

[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]     * com.google.guava:guava:22.0 is selected over {19.0, 20.0}
[warn]         +- com.typesafe.play:play_2.12:2.6.6                  (depends on 22.0)
[warn]         +- org.reflections:reflections:0.9.11                 (depends on 20.0)
[warn]         +- com.google.inject:guice:4.1.0                      (depends on 19.0)
[warn]     * com.typesafe.akka:akka-stream_2.12:2.5.4 is selected over 2.4.19
[warn]         +- com.typesafe.play:play-streams_2.12:2.6.6          (depends on 2.5.4)
[warn]         +- com.typesafe.akka:akka-http-core_2.12:10.0.10      (depends on 2.4.19)
[warn]     * com.typesafe.akka:akka-actor_2.12:2.5.4 is selected over 2.4.19
[warn]         +- com.typesafe.akka:akka-slf4j_2.12:2.5.4            (depends on 2.5.4)
[warn]         +- com.typesafe.play:play_2.12:2.6.6                  (depends on 2.5.4)
[warn]         +- com.typesafe.akka:akka-stream_2.12:2.5.4           (depends on 2.5.4)
[warn]         +- com.typesafe.akka:akka-parsing_2.12:10.0.10        (depends on 2.4.19)
[warn] Run 'evicted' to see detailed eviction warnings

What' s mean?

Enrico Morelli

unread,
Oct 6, 2017, 5:09:00 AM10/6/17
to Play Framework
Another problem. If I try to update a project from 2.6.3 to 2.6.6 using sbt.version=0.13.15 I receive:

play.api.PlayException: Cannot load module[Module [SpringDataMongoModule] cannot be instantiated.]
    at play
.api.inject.Modules$.constructModule(Module.scala:164)
    at play
.api.inject.Modules$.$anonfun$locate$4(Module.scala:127)
    at scala
.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala
.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
    at scala
.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
    at scala
.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala
.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala
.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala
.collection.SetLike.map(SetLike.scala:101)
    at scala
.collection.SetLike.map$(SetLike.scala:101)
Caused by: java.lang.reflect.InvocationTargetException: null
    at sun
.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun
.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun
.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java
.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at play
.api.inject.Modules$.$anonfun$constructModule$2(Module.scala:143)
    at scala
.Option.map(Option.scala:146)
    at play
.api.inject.Modules$.tryConstruct$1(Module.scala:143)
    at play
.api.inject.Modules$.$anonfun$constructModule$5(Module.scala:153)
    at scala
.Option.orElse(Option.scala:289)
    at play
.api.inject.Modules$.constructModule(Module.scala:153)
Caused by: java.lang.NoClassDefFoundError: org/springframework/aop/TargetSource
    at org
.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationConfigUtils.java:154)
    at org
.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationConfigUtils.java:134)
    at org
.springframework.context.annotation.AnnotatedBeanDefinitionReader.<init>(AnnotatedBeanDefinitionReader.java:83)
    at org
.springframework.context.annotation.AnnotatedBeanDefinitionReader.<init>(AnnotatedBeanDefinitionReader.java:66)
    at org
.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:61)
    at org
.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:82)
    at
SpringDataMongoModule.<init>(SpringDataMongoModule.java:28)
    at sun
.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun
.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun
.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Caused by: java.lang.ClassNotFoundException: org.springframework.aop.TargetSource
    at java
.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java
.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java
.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org
.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationConfigUtils.java:154)
    at org
.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationConfigUtils.java:134)
    at org
.springframework.context.annotation.AnnotatedBeanDefinitionReader.<init>(AnnotatedBeanDefinitionReader.java:83)
    at org
.springframework.context.annotation.AnnotatedBeanDefinitionReader.<init>(AnnotatedBeanDefinitionReader.java:66)
    at org
.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:61)
    at org
.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:82)
    at
SpringDataMongoModule.<init>(SpringDataMongoModule.java:28)


It's Spring related, but with 2.6.3 works properly.

Marcos Pereira

unread,
Oct 6, 2017, 9:19:46 AM10/6/17
to play-fr...@googlegroups.com
Hey Enrico,

This is how sbt report evictions now:


You can add the following configuration in your build.sbt to silence these:


Best.

--
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-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/1c9e3598-5037-4682-aab3-ed68204a84e8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Marcos Pereira
Software Engineer, Lightbend.com

Marcos Pereira

unread,
Oct 6, 2017, 9:22:05 AM10/6/17
to play-fr...@googlegroups.com
It is possible that some transitive dependency is not being added anymore. Try to add the following dependency to your build.sbt:

libraryDependencies += "org.springframework" % "spring-aop" % "4.3.10.RELEASE"

HTH


--
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-framework+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Adam Lane

unread,
Oct 6, 2017, 5:18:28 PM10/6/17
to Play Framework
After updating to 2.6.6 and sbt 1.0.2, the compiler stops detecting changes to code if I make a change to a js file under my app/assets/javascripts and refresh browser. 
To reproduce: sbt, run, change a js file and reload, all change to js/twirl/scala after this will not trigger compile, browser just shows old content.  Hitting enter to get back to the sbt console and entering run again starts off with a compile of the changed files.
Rolling sbt back to sbt 0.13.16 but keeping play at 2.6.6 seems to work fine.   So I assume that for some reason compiling managed js with sbt 1.0.2 is crashing sbt change detection.  I see nothing in the logs though to indicate any problems when this happens.  

Anything I can do to debug this further? 

Greg Methvin

unread,
Oct 7, 2017, 8:05:26 AM10/7/17
to play-framework
Hi Adam,

That's interesting. There were some changes to the file watching code for the sbt 1.0 version. Are you using "run" or "~run"? What OS are you running on?

If you can provide sample project that demonstrates the problem I can take a look.

Greg

--
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-framework+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Adam Lane

unread,
Oct 7, 2017, 2:56:39 PM10/7/17
to Play Framework
I am using Windows 10 and I wouldn't be surprised if that had something to do with it.
I can reproduce using a fresh template so it is either something on my system or windows specific:

sbt new playframework/play-scala-seed.g8
 update project/build.properties to sbt.version=1.0.2
remove scaffold.sbt so it will compile with latest sbt
 run  (same problem confirmed also with ~run)
 Change index.scala.html so you know it is working
 Add any valid javascript to the existing blank public/javascripts/main.js, for ex:
   function testFunction() { return true; }
 Refresh browser at this point silently crashes file watching.
Make a change to index.scala.html and note that it no longer is detected.

Enrico Morelli

unread,
Oct 9, 2017, 2:42:26 AM10/9/17
to Play Framework
Thanks, it's working fine.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.

man...@bernhardt.io

unread,
Oct 12, 2017, 7:24:12 AM10/12/17
to Play Framework
I can confirm that something is off with regards to detecting changes. In my case, any change to a Twirl template (*.scala.html) will not trigger reload.
I am running on Linux (Ubuntu, with disk encryption)

The project is a vanilla project created off the template - the only thing I had to do to get the project to work was to manually replace a seed `maven()` value (that apparently did not get inlined) with SBT 1.0.2.

Manuel

Franz

unread,
Oct 18, 2017, 2:04:08 AM10/18/17
to Play Framework
It seems like Play 2.6.6 with SBT 1.0.2 does not work with your play-ebean plugin. I tried with both plugin version 4.0.2 and 4.0.3. The page you linked to containing the plugins that have support for does not mention play-ebean at all. 

[warn] module not found: com.typesafe.sbt#sbt-play-ebean;4.0.3
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-play-ebean/scala_2.12/sbt_1.0//4.0.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-play-ebean/scala_2.12/sbt_1.0//4.0.3/ivys/ivy.xml


Am I doing something wrong or is play-eban not supported with 2.6.6 and SBT 1.0.2?

Br,
Franz

Greg Methvin

unread,
Oct 18, 2017, 2:36:07 AM10/18/17
to play-framework
4.0.6 is the version to use. We updated the version matrix on the readme: https://github.com/playframework/play-ebean

--
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-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/4432a205-62f4-4b9d-b3df-eef2b2481ab1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Franz

unread,
Oct 18, 2017, 3:41:17 AM10/18/17
to Play Framework
Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.

Harvey Tjoe

unread,
Oct 23, 2017, 12:44:36 AM10/23/17
to Play Framework
Thanks for tips Greg. I was having the same issue (but with a much older version 3.0.0) as the latest document still recommending 3.0.0.

Cheers,
Harvey

Simon Jacobs

unread,
Oct 26, 2017, 4:20:07 AM10/26/17
to Play Framework

Thanks Greg!

We have a small issue to start the new server (MacOS Sierra or HighSierra).

We upgraded to 2.6.6 and sbt. 1.0. Compiles like a charm.

Unfortunately the server seems not to recognize environment variables like

sbt  ~run -Dconfig.file=./conf/local.conf -Dhttp.port=8080

port can be set via "PlayKeys.devSettings := Seq("play.server.http.port" -> "8080")" but only for Dev-Mode. The ignoring -Dconfig.file is more a problem.

Any advice? :).

Thanks and best regards
Simon

Joheinz

unread,
Oct 26, 2017, 4:33:17 AM10/26/17
to play-fr...@googlegroups.com
Simon,

have you tried sbt "~run -Dconfig.file=./conf/local.conf -Dhttp.port=8080" ?
Markus


2017-10-26 10:20 GMT+02:00 'Simon Jacobs' via Play Framework
<play-fr...@googlegroups.com>:
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/play-framework/841f3c9b-10cb-4407-a417-672fc033b0f4%40googlegroups.com.

Simon Jacobs

unread,
Oct 26, 2017, 4:42:54 AM10/26/17
to Play Framework
Hy Markus,

no I didn't - it is working :). Thanks!

Maybe it is a good idea to add this part to the official play documentation?

Best regards
Simon

Simon Jacobs

unread,
Oct 26, 2017, 7:40:10 AM10/26/17
to Play Framework
Do you have any idea how this cmd can be combined with the -jvm-debug flag?

sbt -jvm-debug  "~run -Dconfig.file=./conf/local.conf -Dhttp.port=8080"



==> will be ignored

And

sbt  "-jvm-debug ~run -Dconfig.file=./conf/local.conf -Dhttp.port=8080"



==> Will just stop the jvm.

simjac@Kartoffelsuppe-2 webapp (develop)*$ sbt "-jvm-debug ~run -Dconfig.file=./conf/local.conf -Dhttp.port=8080"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/simjac/10-Projekte/Kunden/s/webapp/project
[info] Loading settings from build.sbt ...
[info] Set current project to webapp (in build file:/Users/simjac/10-Projekte/Kunden/s/webapp/)
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[INFO] [10/26/2017 13:35:16.643] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook




Also setting the SBT_OPTS is not working:

export SBT_OPTS="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999" && sbt  "~run -Dconfig.file=./conf/local.conf -Dhttp.port=8080



Do you have any idea?


Thanks and best regards
Simon

Am Donnerstag, 26. Oktober 2017 10:33:17 UTC+2 schrieb Markus Klink:

Simon Jacobs

unread,
Oct 26, 2017, 9:26:52 AM10/26/17
to Play Framework
It is working if I set as JAVA_OPTS like in "sbt" shell script:

export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -Xms1536m -Xmx1536m -XX:MaxPermSize=384m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999 -XX:ReservedCodeCacheSize=192m -Dfile.encoding=UTF8" && sbt "~run -Dconfig.file=./conf/local.conf -Dhttp.port=8080"

But that seems not like the best possible way.
Reply all
Reply to author
Forward
0 new messages