Scaldi-play for play 2.5-M2

52 views
Skip to first unread message

Maxim Valyanskiy

unread,
Feb 12, 2016, 7:51:06 AM2/12/16
to scaldi
Hello!

Are you planning to release Scaldi build for play 2.5 milestones? We would like to try port our application to Play 2.5 and lack of scaldi-play for it stops us.

Maxim

Oleg Ilyenko

unread,
Feb 12, 2016, 1:44:41 PM2/12/16
to scaldi
Hi Maxim,

Thanks for reminding me! I just released scaldi-play 0.5.13-play-2.5.0-M2 with play 2.5.0-M2 dependency:

"org.scaldi" %% "scaldi-play" % "0.5.13-play-2.5.0-M2"

Everything looks good so far. The only incompatible change was around logging, which I fixed in this version. Please let me know if experience any issues, so that I can address them before final 2.5.0 release. I would appreciate it.

Cheers,
Oleg

Maxim Valyanskiy

unread,
Feb 18, 2016, 5:29:53 AM2/18/16
to scaldi
I see stack overflow exception on application initialization, here is the part of stack trace:

2016-02-18 12:18:48.412109500   at scaldi.Binding$$anon$1.get(Binding.scala:66)
2016-02-18 12:18:48.412163500   at scaldi.jsr330.AnnotationBinding$$anonfun$scaldi$jsr330$AnnotationBinding$$injectSymbol$2.apply(AnnotationBinding.scala:171)
2016-02-18 12:18:48.412228500   at scaldi.jsr330.AnnotationBinding$$anonfun$scaldi$jsr330$AnnotationBinding$$injectSymbol$2.apply(AnnotationBinding.scala:171)
2016-02-18 12:18:48.412299500   at scala.Option.flatMap(Option.scala:171)
2016-02-18 12:18:48.412594500   at scaldi.jsr330.AnnotationBinding.scaldi$jsr330$AnnotationBinding$$injectSymbol(AnnotationBinding.scala:171)
2016-02-18 12:18:48.412652500   at scaldi.jsr330.AnnotationBinding$$anonfun$22.apply(AnnotationBinding.scala:132)
2016-02-18 12:18:48.412720500   at scaldi.jsr330.AnnotationBinding$$anonfun$22.apply(AnnotationBinding.scala:132)
2016-02-18 12:18:48.412789500   at scala.collection.immutable.List.map(List.scala:277)
2016-02-18 12:18:48.412859500   at scaldi.jsr330.AnnotationBinding.scaldi$jsr330$AnnotationBinding$$createNewInstance(AnnotationBinding.scala:132)
2016-02-18 12:18:48.413538500   at scaldi.jsr330.AnnotationBinding$$anonfun$2$$anonfun$apply$2.apply(AnnotationBinding.scala:41)
2016-02-18 12:18:48.413614500   at scaldi.jsr330.AnnotationBinding$$anonfun$2$$anonfun$apply$2.apply(AnnotationBinding.scala:41)
2016-02-18 12:18:48.413679500   at scaldi.jsr330.AnnotationBinding.initNewInstance(AnnotationBinding.scala:119)
2016-02-18 12:18:48.413735500   at scaldi.jsr330.AnnotationBinding.getInstance(AnnotationBinding.scala:111)
2016-02-18 12:18:48.413800500   at scaldi.jsr330.AnnotationBinding.get(AnnotationBinding.scala:85)
2016-02-18 12:18:48.413857500   at scaldi.Binding$$anon$1.get(Binding.scala:66)
2016-02-18 12:18:48.413917500   at scaldi.Injectable$$anonfun$injectWithDefault$1.apply(Injectable.scala:152)
2016-02-18 12:18:48.414001500   at scaldi.Injectable$$anonfun$injectWithDefault$1.apply(Injectable.scala:152)
2016-02-18 12:18:48.414091500   at scala.Option.flatMap(Option.scala:171)
2016-02-18 12:18:48.414176500   at scaldi.Injectable$class.injectWithDefault(Injectable.scala:152)
2016-02-18 12:18:48.414249500   at scaldi.play.ScaldiBuilder$.injectWithDefault(ScaldiBuilder.scala:128)
2016-02-18 12:18:48.414319500   at scaldi.play.ScaldiBuilder$$anonfun$6$$anonfun$apply$1$$anonfun$apply$18.apply(ScaldiBuilder.scala:240)
2016-02-18 12:18:48.414398500   at scaldi.ProviderBinding.target(Binding.scala:217)
2016-02-18 12:18:48.414534500   at scaldi.ProviderBinding.get(Binding.scala:223)
2016-02-18 12:18:48.414613500   at scaldi.ProviderBinding.get(Binding.scala:213)
2016-02-18 12:18:48.414669500   at scaldi.Binding$$anon$1.get(Binding.scala:66)
2016-02-18 12:18:48.414830500   at scaldi.play.ScaldiInjector$$anonfun$scaldi$play$ScaldiInjector$$getActualBinding$1$$anonfun$apply$2.apply(ScaldiInjector.scala:42)
2016-02-18 12:18:48.414903500   at scaldi.play.ScaldiInjector$$anonfun$scaldi$play$ScaldiInjector$$getActualBinding$1$$anonfun$apply$2.apply(ScaldiInjector.scala:42)
2016-02-18 12:18:48.415366500   at scala.Option.map(Option.scala:146)
2016-02-18 12:18:48.415525500   at scaldi.play.ScaldiInjector$$anonfun$scaldi$play$ScaldiInjector$$getActualBinding$1.apply(ScaldiInjector.scala:42)
2016-02-18 12:18:48.415611500   at scaldi.play.ScaldiInjector$$anonfun$scaldi$play$ScaldiInjector$$getActualBinding$1.apply(ScaldiInjector.scala:38)
2016-02-18 12:18:48.415691500   at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
2016-02-18 12:18:48.415746500   at scaldi.play.ScaldiInjector.scaldi$play$ScaldiInjector$$getActualBinding(ScaldiInjector.scala:38)
2016-02-18 12:18:48.415801500   at scaldi.play.ScaldiInjector$$anonfun$instanceOf$1.apply(ScaldiInjector.scala:23)
2016-02-18 12:18:48.415856500   at scaldi.play.ScaldiInjector$$anonfun$instanceOf$1.apply(ScaldiInjector.scala:22)
2016-02-18 12:18:48.415935500   at scala.Option.getOrElse(Option.scala:121)
2016-02-18 12:18:48.415993500   at scaldi.play.ScaldiInjector.instanceOf(ScaldiInjector.scala:22)
2016-02-18 12:18:48.416047500   at scaldi.play.ScaldiInjector.instanceOf(ScaldiInjector.scala:18)
2016-02-18 12:18:48.416101500   at scaldi.play.ScaldiInjector.instanceOf(ScaldiInjector.scala:15)
2016-02-18 12:18:48.416195500   at scaldi.play.ScaldiApplicationBuilder.build(ScaldiApplicationBuilder.scala:88)
2016-02-18 12:18:48.416256500   at scaldi.play.ScaldiApplicationLoader.load(ScaldiApplicationLoader.scala:19)
2016-02-18 12:18:48.416312500   at play.core.server.ProdServerStart$.start(ProdServerStart.scala:52)
2016-02-18 12:18:48.416531500   at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
2016-02-18 12:18:48.417435500   at play.core.server.ProdServerStart.main(ProdServerStart.scala)

Play 2.5.0-RC1. I'm not sure if it is a problem in Scaldi or in my configuration.

Maxim

пятница, 12 февраля 2016 г., 21:44:41 UTC+3 пользователь Oleg Ilyenko написал:

Maxim Valyanskiy

unread,
Feb 18, 2016, 6:02:48 AM2/18/16
to scaldi
I see similar problem when I try to run "sbt test" in scaldi-play sources after update to play 2.5.0-RC1.

четверг, 18 февраля 2016 г., 13:29:53 UTC+3 пользователь Maxim Valyanskiy написал:

Oleg Ilyenko

unread,
Feb 18, 2016, 5:27:28 PM2/18/16
to scaldi
Hi Maxim,

thanks for reporting this! I was able to reproduce it with  2.5.0-RC1 (or at least I also got stack overflow - it may or may not be the same error as you are facing, it's hard to tell at this point). I analyzed it a bit and discovered a circular dependencies withing play infrastructure. On a first sight it's hard to tell whether it's a scaldi bug or an issue within play itself, so I will investigate it further (and probably get in touch with play team as well).

I will keep you updated.

Cheers,
Oleg

Maxim Valyanskiy

unread,
Feb 19, 2016, 6:42:18 AM2/19/16
to scaldi
Maybe this merge request is related to our problem: https://github.com/playframework/playframework/pull/5694

пятница, 19 февраля 2016 г., 1:27:28 UTC+3 пользователь Oleg Ilyenko написал:

Oleg Ilyenko

unread,
Feb 19, 2016, 7:19:29 AM2/19/16
to scaldi
Yeah, this came up from our discussion:

Maxim Valyanskiy

unread,
Feb 19, 2016, 10:47:17 AM2/19/16
to scaldi
Hello!

Thank you! I copied that HttpRequestHandlerActionCreator.java into my project and run it without any major problem.

However, there is some problem with logging, I'm not sure is it related to Scaldi or not. I used "application.home" variable in my logback.xml, and this reference is not defined on start. I switched to "user.dir" variable that exists.

Maxim

пятница, 19 февраля 2016 г., 15:19:29 UTC+3 пользователь Oleg Ilyenko написал:

Maxim Valyanskiy

unread,
Mar 9, 2016, 2:51:19 AM3/9/16
to scaldi
Hello!

Play Framework 2.5 was released. I updated my application to Play 2.5.0 and found that scaldi-play version 0.5.13-play-2.5.0-M2 works fine with it. However, it would be good to release scaldi-play artifact with 2.5.0 in dependencies.  

Maxim

пятница, 19 февраля 2016 г., 15:19:29 UTC+3 пользователь Oleg Ilyenko написал:

Oleg Ilyenko

unread,
Mar 10, 2016, 4:38:15 PM3/10/16
to scaldi
Done. Just released v0.5.14 with Play 2.5.0 dependency. Thanks a lot for helping me with this release!
Reply all
Reply to author
Forward
0 new messages