Migrating from 1.0 to 2.0 has been fairly painful, but I now have my app compiling. I still need some help though because I don't understand why I'm getting this error at runtime:
application -
! @6nm419d0e - Internal server error, for (GET) [/] ->
play.api.Configuration$$anon$1: Configuration error[Cannot initialize the custom Global object (app.Global) (perhaps it's a wrong reference?)]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:94) ~[play_2.11-2.3.10.jar:2.3.10]
at play.api.Configuration.reportError(Configuration.scala:743) ~[play_2.11-2.3.10.jar:2.3.10]
at play.api.WithDefaultGlobal$class.play$api$WithDefaultGlobal$$scalaGlobal(Application.scala:42) ~[play_2.11-2.3.10.jar:2.3.10]
at play.api.DefaultApplication.play$api$WithDefaultGlobal$$scalaGlobal$lzycompute(Application.scala:402) ~[play_2.11-2.3.10.jar:2.3.10]
at play.api.DefaultApplication.play$api$WithDefaultGlobal$$scalaGlobal(Application.scala:402) ~[play_2.11-2.3.10.jar:2.3.10]
Caused by: java.lang.ExceptionInInitializerError: null
at sun.misc.Unsafe.ensureClassInitialized(Native Method) ~[na:1.8.0_60]
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43) ~[na:1.8.0_60]
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:142) ~[na:1.8.0_60]
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088) ~[na:1.8.0_60]
at java.lang.reflect.Field.getFieldAccessor(Field.java:1069) ~[na:1.8.0_60]
Caused by: com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Could not find a suitable constructor in play.api.Configuration. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
at play.api.Configuration.class(Configuration.scala:113)
at utils.di.SilhouetteModule.provideAuthenticatorService(SilhouetteModule.scala:91)
2) No implementation for com.mohiva.play.silhouette.api.util.FingerprintGenerator was bound.
at utils.di.SilhouetteModule.provideAuthenticatorService(SilhouetteModule.scala:91)
3) No implementation for com.mohiva.play.silhouette.api.util.Clock was bound.
at utils.di.SilhouetteModule.provideAuthenticatorService(SilhouetteModule.scala:91)
3 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448) ~[guice-4.0-beta5.jar:na]
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155) ~[guice-4.0-beta5.jar:na]
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107) ~[guice-4.0-beta5.jar:na]
at com.google.inject.Guice.createInjector(Guice.java:96) ~[guice-4.0-beta5.jar:na]
at com.google.inject.Guice.createInjector(Guice.java:73) ~[guice-4.0-beta5.jar:na]
play - No application found at invoker init
I have not changed my conf/application.conf, it still contains this line:
application.global=app.Global
My Application.scala still has this (only thing that changed was using CookieAuthenticator rather than CachedCookieAuthenticator)
and I cut-n-paste the Global.scala file directly from the seed (by looking at github and selecting the 2.0 tag), only change was the name ApplicationController -> Application